Commit 049b3136 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac

parent 3d6f5f41
...@@ -284,6 +284,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware): ...@@ -284,6 +284,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
context = "" context = ""
for tool_id in data["tool_ids"]: for tool_id in data["tool_ids"]:
print(tool_id)
response = await get_function_call_response( response = await get_function_call_response(
prompt=prompt, prompt=prompt,
tool_id=tool_id, tool_id=tool_id,
...@@ -291,10 +292,9 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware): ...@@ -291,10 +292,9 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
task_model_id=task_model_id, task_model_id=task_model_id,
user=user, user=user,
) )
print(response)
if response: if response:
context = ("\n" if context != "" else "") + response context += ("\n" if context != "" else "") + response
if context != "": if context != "":
system_prompt = rag_template( system_prompt = rag_template(
......
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 to comment