-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclaude_types.py
More file actions
25 lines (22 loc) · 793 Bytes
/
claude_types.py
File metadata and controls
25 lines (22 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from typing import List, Optional, Union, Dict, Any, Literal
from pydantic import BaseModel, Field, AliasChoices
class ClaudeMessage(BaseModel):
role: str
content: Union[str, List[Dict[str, Any]]]
class ClaudeTool(BaseModel):
name: str
description: Optional[str] = ""
input_schema: Dict[str, Any]
class ClaudeRequest(BaseModel):
model: str
messages: List[ClaudeMessage]
max_tokens: int = 4096
temperature: Optional[float] = None
tools: Optional[List[ClaudeTool]] = None
stream: bool = False
system: Optional[Union[str, List[Dict[str, Any]]]] = None
thinking: Optional[Dict[str, Any]] = None
conversation_id: Optional[str] = Field(
default=None,
validation_alias=AliasChoices("conversation_id", "conversationId")
)