fix: correct template path resolution in render function to use absolute project root

This commit is contained in:
retoor 2024-12-31 19:56:05 +00:00
parent bd1d31ec55
commit 62a7a3b785

View File

@ -149,14 +149,14 @@ class Agent:
while run.status != "completed": while run.status != "completed":
outputs = [] outputs = []
for tool in run.required_action.submit_tool_outputs.tool_calls: #for tool in run.required_action.submit_tool_outputs.tool_calls:
tool_handler = self.tool_handlers[tool.name] # tool_handler = self.tool_handlers[tool.name]
output = await tool_handler(tool.arguments) # output = await tool_handler(tool.arguments)
outputs.append({"tool_call_id": tool.id, "output": output}) # outputs.append({"tool_call_id": tool.id, "output": output})
if outputs: #if outputs:
run = client.beta.threads.runs.submit_tool_outputs_and_poll( # run = client.beta.threads.runs.submit_tool_outputs_and_poll(
thread_id=self.thread.id, run_id=run.id, tool_outputs=outputs # thread_id=self.thread.id, run_id=run.id, tool_outputs=outputs
) # )
run = self.client.beta.threads.runs.retrieve( run = self.client.beta.threads.runs.retrieve(
thread_id=self.thread.id, run_id=run.id thread_id=self.thread.id, run_id=run.id
) )