-
Notifications
You must be signed in to change notification settings - Fork 11
Feat/mcp interface #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/mcp interface #260
Conversation
| """Main entry point for the HTTP server.""" | ||
| import uvicorn | ||
|
|
||
| uvicorn.run( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно потом добавить пример как запускать с fastapi run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а зачем это может быть полезно? я никогда так не запускал, не шарю
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Альтернатива такому запуску https://fastapi.tiangolo.com/deployment/manually/. Тут можно поменять на uvicorn.run(app)
| from autointent.schemas import Intent | ||
|
|
||
|
|
||
| class Settings(BaseSettings): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мб вынести все модели куда-нибудь?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
пока что хочу держать все это изолировано от остальной части библиотеки
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мб разные паппки разделить http/mcp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
зачем если все в одном файле пока что? когда файлов будет больше тогда и сделаем папки
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Модели запросов/настроек в отдельные файлы выделить
| samples_list.append(sample) | ||
|
|
||
| # Apply class filtering if specified | ||
| if class_filter is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мб сначала отфильтровать, а потом добавлять?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да как будто без разницы
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если датасет большой будет, то наверное будет
|
|
||
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| host: str = "127.0.0.1" | |
| host: str = "0.0.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| path: str = Field(..., description="Path to the optimized pipeline assets") | |
| path: Path = Field(..., description="Path to the optimized pipeline assets") |
с помощью энвов и команды
autointent-http/autointent-mcpможно запустить сервер для обращения к автоинтенту