diff --git a/server/intelligence-service/app/main.py b/server/intelligence-service/app/main.py index 27f9c1a8..83ff6309 100644 --- a/server/intelligence-service/app/main.py +++ b/server/intelligence-service/app/main.py @@ -29,7 +29,7 @@ async def chat(request: ChatRequest): state = {"messages": []} result = send_message( - thread_id=request.session_id, input_message=request.message_content, state=state + session_id=request.session_id, input_message=request.message_content, state=state ) response_message = result["response"]["messages"][-1].content diff --git a/server/intelligence-service/app/model.py b/server/intelligence-service/app/model.py index 10c9f9a7..5a39f72e 100644 --- a/server/intelligence-service/app/model.py +++ b/server/intelligence-service/app/model.py @@ -79,8 +79,8 @@ def call_model(state: State): app = workflow.compile(checkpointer=memory) -def send_message(thread_id: str, input_message: str, state: State): - config = {"configurable": {"thread_id": thread_id}} +def send_message(session_id: str, input_message: str, state: State): + config = {"configurable": {"thread_id": session_id}} state["messages"] += [HumanMessage(input_message)] output = app.invoke(