-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodels.py
More file actions
62 lines (54 loc) · 1.88 KB
/
models.py
File metadata and controls
62 lines (54 loc) · 1.88 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
from enum import Enum
from typing import List, Optional
from pydantic import BaseModel
from pydantic.fields import Field
from datetime import datetime
class SupportedModelProvider(str, Enum):
GEMINI = "gemini"
OPENAI = "openai"
DEEPSEEK = "deepseek"
GROQ = "groq"
class AgentResponse(BaseModel):
requestId: str
success: bool = False
en: str | None = None
cn: str | None = None
links: List[str] | None = None
isControversial: bool = False
isVideo: bool = False
isAccessBlocked: bool = False
totalTimeTaken: float | None = None
report: str | None = None
errorMessage: str | None = None
agentTrace: List[dict] | None = None
class CommunityNoteRequest(BaseModel):
text: Optional[str] = Field(
default=None, description="Text content for generating a community note"
)
image_url: Optional[str] = Field(
default=None, description="Image URL for generating a community note"
)
caption: Optional[str] = Field(
default=None, description="Caption for the image (optional)"
)
addPlanning: Optional[bool] = Field(
default=False,
description="Whether or not to include zero-shot planning step between each agent step",
)
class SavedAgentCall(AgentResponse):
text: Optional[str] = Field(
default=None, description="Input text content for the agent call"
)
image_url: Optional[str] = Field(
default=None, description="Input image URL for the agent call"
)
caption: Optional[str] = Field(
default=None, description="Caption provided with the input"
)
timestamp: datetime = Field(description="Timestamp of when the call was made")
model: SupportedModelProvider = Field(
description="Model provider used for the call"
)
environment: str = Field(
default=None, description="Environment in which the call was made"
)