Commit 1e76bf63 by ccran

feat: update nanobot results;

parent a810c5a0
...@@ -67,7 +67,7 @@ class NanobotLLMChatRequest(BaseModel): ...@@ -67,7 +67,7 @@ class NanobotLLMChatRequest(BaseModel):
class NanobotLLMChatResponse(BaseModel): class NanobotLLMChatResponse(BaseModel):
resuts: str result: str
@app.post("/nanobot_llm_chat", response_model=NanobotLLMChatResponse) @app.post("/nanobot_llm_chat", response_model=NanobotLLMChatResponse)
...@@ -79,11 +79,11 @@ async def nanobot_llm_chat(payload: NanobotLLMChatRequest) -> NanobotLLMChatResp ...@@ -79,11 +79,11 @@ async def nanobot_llm_chat(payload: NanobotLLMChatRequest) -> NanobotLLMChatResp
if not user_message: if not user_message:
raise HTTPException(status_code=400, detail="user_message cannot be empty") raise HTTPException(status_code=400, detail="user_message cannot be empty")
results = await nanobot_llm_tool.chat_async( result = await nanobot_llm_tool.chat_async(
nanobot_llm_tool.build_messages(user_message), nanobot_llm_tool.build_messages(user_message),
session_id=session_id, session_id=session_id,
) )
return NanobotLLMChatResponse(resuts=results) return NanobotLLMChatResponse(result=result)
######################################################################################################################## ########################################################################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment