这是我们组的项目
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class AIChatRequest(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid", str_strip_whitespace=True)
|
||||
question: str = Field(min_length=1, max_length=2000)
|
||||
|
||||
|
||||
class AIChatResponse(BaseModel):
|
||||
answer: str
|
||||
sources: list[str] = Field(default_factory=list)
|
||||
data: dict | None = None
|
||||
Reference in New Issue
Block a user