From bb92a995373b60f43a259b3e573cc383f5006461 Mon Sep 17 00:00:00 2001 From: Johannes Hagemann Date: Sat, 11 Nov 2023 18:46:09 +0100 Subject: [PATCH] one line fix for wrapping of custom function tools to create OpenAI assistant (#8855) --- llama_index/agent/openai_assistant_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_index/agent/openai_assistant_agent.py b/llama_index/agent/openai_assistant_agent.py index c07abaf165a85..4e7e8a29d8572 100644 --- a/llama_index/agent/openai_assistant_agent.py +++ b/llama_index/agent/openai_assistant_agent.py @@ -173,7 +173,7 @@ def from_new( openai_tools = openai_tools or [] tools = tools or [] tool_fns = [ - {"type": "function", "function": t.metadata.to_openai_function()} + t.metadata.to_openai_function() for t in tools ] all_openai_tools = openai_tools + tool_fns