Update environment variables, Docker configuration, and dependencies; refactor token management and chat agent logic. Added FastAPI server setup and improved message handling in GigaChat client.
This commit is contained in:
@@ -41,9 +41,9 @@ class GigaChatUsage(BaseModel):
|
||||
class GigaChatResponse(BaseModel):
|
||||
"""Ответ от GigaChat API."""
|
||||
|
||||
id: str
|
||||
object: str
|
||||
created: int
|
||||
id: Optional[str] = None
|
||||
object: Optional[str] = None
|
||||
created: Optional[int] = None
|
||||
model: str
|
||||
choices: List[GigaChatChoice]
|
||||
usage: GigaChatUsage
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
"""Pydantic модели для расписаний."""
|
||||
from datetime import date
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import date as date_type
|
||||
from typing import List, Optional
|
||||
from uuid import UUID
|
||||
|
||||
@@ -24,7 +26,7 @@ class Schedule(BaseModel):
|
||||
|
||||
id: Optional[UUID] = None
|
||||
title: str = Field(..., description="Название расписания")
|
||||
date: date = Field(..., description="Дата расписания")
|
||||
date: date_type = Field(..., description="Дата расписания")
|
||||
tasks: List[Task] = Field(default_factory=list, description="Список заданий")
|
||||
user_id: Optional[UUID] = None
|
||||
created_at: Optional[str] = None
|
||||
@@ -35,6 +37,6 @@ class ScheduleGenerateRequest(BaseModel):
|
||||
|
||||
child_age: int = Field(..., ge=1, le=18, description="Возраст ребенка")
|
||||
preferences: List[str] = Field(default_factory=list, description="Предпочтения ребенка")
|
||||
date: date = Field(..., description="Дата расписания")
|
||||
date: date_type = Field(..., description="Дата расписания")
|
||||
existing_tasks: Optional[List[str]] = Field(None, description="Существующие задания для учета")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user