File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ class Settings(BaseSettings):
1919
2020 model_config = SettingsConfigDict (env_file = ".env" , env_prefix = "AUTOINTENT_" )
2121 path : str = Field (..., description = "Path to the optimized pipeline assets" )
22+ host : str = "127.0.0.1"
23+ port : int = 8013
2224
2325
2426class PredictRequest (BaseModel ):
@@ -98,3 +100,15 @@ async def predict(request: PredictRequest) -> PredictResponse:
98100 predictions = current_pipeline .predict (request .utterances )
99101
100102 return PredictResponse (predictions = predictions )
103+
104+
105+ def main () -> None :
106+ """Main entry point for the HTTP server."""
107+ import uvicorn
108+
109+ uvicorn .run (
110+ "autointent.server.http:app" ,
111+ host = settings .host ,
112+ port = settings .port ,
113+ reload = False ,
114+ )
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ Documentation = "https://deeppavlov.github.io/AutoIntent/"
117117"basic-aug" = " autointent.generation.utterances.basic.cli:main"
118118"evolution-aug" = " autointent.generation.utterances.evolution.cli:main"
119119"autointent-mcp" = " autointent.server.mcp:main"
120+ "autointent-http" = " autointent.server.http:main"
120121
121122[tool .ruff ]
122123line-length = 120
You can’t perform that action at this time.
0 commit comments