Conversation
| """Main entry point for the HTTP server.""" | ||
| import uvicorn | ||
|
|
||
| uvicorn.run( |
There was a problem hiding this comment.
Можно потом добавить пример как запускать с fastapi run
There was a problem hiding this comment.
а зачем это может быть полезно? я никогда так не запускал, не шарю
There was a problem hiding this comment.
Альтернатива такому запуску https://fastapi.tiangolo.com/deployment/manually/. Тут можно поменять на uvicorn.run(app)
| from autointent.schemas import Intent | ||
|
|
||
|
|
||
| class Settings(BaseSettings): |
There was a problem hiding this comment.
Мб вынести все модели куда-нибудь?
There was a problem hiding this comment.
пока что хочу держать все это изолировано от остальной части библиотеки
There was a problem hiding this comment.
Мб разные паппки разделить http/mcp?
There was a problem hiding this comment.
зачем если все в одном файле пока что? когда файлов будет больше тогда и сделаем папки
There was a problem hiding this comment.
Модели запросов/настроек в отдельные файлы выделить
| samples_list.append(sample) | ||
|
|
||
| # Apply class filtering if specified | ||
| if class_filter is not None: |
There was a problem hiding this comment.
Мб сначала отфильтровать, а потом добавлять?
There was a problem hiding this comment.
да как будто без разницы
There was a problem hiding this comment.
Если датасет большой будет, то наверное будет
|
|
||
| model_config = SettingsConfigDict(env_file=".env", env_prefix="AUTOINTENT_") | ||
| path: str = Field(..., description="Path to the optimized pipeline assets") | ||
| host: str = "127.0.0.1" |
There was a problem hiding this comment.
| host: str = "127.0.0.1" | |
| host: str = "0.0.0.0" |
There was a problem hiding this comment.
ruff ругается на это
| """Application settings loaded from environment variables.""" | ||
|
|
||
| model_config = SettingsConfigDict(env_file=".env", env_prefix="AUTOINTENT_") | ||
| path: str = Field(..., description="Path to the optimized pipeline assets") |
There was a problem hiding this comment.
| path: str = Field(..., description="Path to the optimized pipeline assets") | |
| path: Path = Field(..., description="Path to the optimized pipeline assets") |
с помощью энвов и команды
autointent-http/autointent-mcpможно запустить сервер для обращения к автоинтенту