Skip to content

Commit 13969b7

Browse files
authored
Merge pull request #5 from vtramo/fix/handle-init-server
fix: correctly construct SingleServerInitRequest before calling handler
2 parents de5a1b3 + 3edcddf commit 13969b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from fastapi import FastAPI, Query, HTTPException, Body, status, Path
66
from fastapi_mcp import FastApiMCP
7+
from lib.endpoints.server_endpoints import SingleServerInitRequest
78

89
from lib.models import (
910
ModelEnum,
@@ -164,14 +165,15 @@ async def initialize_server(
164165
- `500 Internal Server Error`: If the server binary is not found or fails to start for other reasons.
165166
"""
166167
try:
167-
return await handle_initialize_server(
168+
single_server_init_request = SingleServerInitRequest(
168169
threads=threads,
169170
ctx_size=ctx_size,
170171
port=port,
171172
system_prompt=system_prompt,
172173
n_predict=n_predict,
173174
temperature=temperature
174175
)
176+
return await handle_initialize_server(single_server_init_request)
175177
except Exception as e:
176178
logger.error(f"Error in /initialize-server endpoint: {str(e)}", exc_info=True)
177179
raise HTTPException(status_code=500, detail=str(e))

0 commit comments

Comments
 (0)