Skip to content

Conversation

@voorhs
Copy link
Collaborator

@voorhs voorhs commented Aug 15, 2025

с помощью энвов и команды autointent-http/autointent-mcp можно запустить сервер для обращения к автоинтенту

@voorhs voorhs requested a review from Samoed August 15, 2025 09:22
"""Main entry point for the HTTP server."""
import uvicorn

uvicorn.run(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно потом добавить пример как запускать с fastapi run

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а зачем это может быть полезно? я никогда так не запускал, не шарю

Copy link
Member

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мб вынести все модели куда-нибудь?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пока что хочу держать все это изолировано от остальной части библиотеки

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мб разные паппки разделить http/mcp?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

зачем если все в одном файле пока что? когда файлов будет больше тогда и сделаем папки

Copy link
Member

@Samoed Samoed Aug 18, 2025

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мб сначала отфильтровать, а потом добавлять?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да как будто без разницы

Copy link
Member

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
host: str = "127.0.0.1"
host: str = "0.0.0.0"

Copy link
Collaborator Author

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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: str = Field(..., description="Path to the optimized pipeline assets")
path: Path = Field(..., description="Path to the optimized pipeline assets")

@voorhs voorhs merged commit ee655bb into dev Aug 18, 2025
18 of 22 checks passed
@voorhs voorhs deleted the feat/mcp-interface branch August 18, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants