composio.client.exceptions.ComposioClientError: Action CODEINTERPRETER_RUN_TERMINAL_CMD not found

Hi for the sql agent plotter, I am getting the following error when trying to run it recently. Was wondering what it was due to? Thanks!
5 Replies
Soham
Soham4w ago
can you run pip install composio-core -U pip install composio-framework -U composio apps update replace framework with whatever framework you are using @snkewl let me know if this worked. Thanks.
correct-apricot
correct-apricot4w ago
ValueError: Tool description exceeds maximum length of 1024 characters. Please shorten your description or move it to the prompt. for the llama index plotter I got the following error: import dotenv dotenv.load_dotenv() import os from composio_llamaindex import App, ComposioToolSet from llama_index.core.agent import FunctionCallingAgentWorker from llama_index.core.llms import ChatMessage from llama_index.llms.openai import OpenAI import sys import subprocess subprocess.run(["composio", "apps", "update"]) from composio.tools.local import filetool, sqltool toolset = ComposioToolSet(api_key=os.environ["COMPOSIO_API_KEY"]) sql_tool = toolset.get_tools(apps=[App.SQLTOOL]) file_tool = toolset.get_tools(apps=[App.FILETOOL]) code_interpretor_tool = toolset.get_tools(apps=[App.CODEINTERPRETER]) tools = toolset.get_tools(apps=[App.SQLTOOL, App.FILETOOL, App.CODEINTERPRETER]) llm = OpenAI(model="gpt-4o-2024-05-13", api_key=os.environ["OPENAI_API_KEY"]) prefix_messages = [ ChatMessage( role="system", content=( "You are now a integration agent, and what ever you are requested, you will try to execute utilizing your toools." ), ) ] agent = FunctionCallingAgentWorker( tools=tools, llm=llm, prefix_messages=prefix_messages, max_function_calls=10, allow_parallel_tool_calls=False, verbose=True, ).as_agent() db_file_path = 'example_db/company.db' print(db_file_path) human_description = f"""The database to use is {db_file_path}""" human_input = "Query the table MOCK_DATA for all rows and plot a graph between first names and salary by using code interpretor" response = agent.chat( "Database description ="+ human_description +"Task to perform:" + human_input ) print("Response:", response) After trying to upgrade
Soham
Soham4w ago
Checking. So I found the error. Llamaindex limits the char length of a tool by 1024 chars. In the recent enhancement of filetool, we exceeded 1024 chars for the action edit_file. This resulted in the error. We are solving it by modifying edit file action back to change it to 1024.
correct-apricot
correct-apricot4w ago
Ah I see thanks!
Soham
Soham4w ago
import dotenv
from composio_llamaindex import App, ComposioToolSet
from llama_index.core.agent import FunctionCallingAgentWorker
from llama_index.core.llms import ChatMessage
from llama_index.llms.openai import OpenAI

from composio.tools.local import filetool, sqltool

dotenv.load_dotenv()
toolset = ComposioToolSet()
sql_tool = toolset.get_tools(apps=[App.SQLTOOL])
code_interpretor_tool = toolset.get_tools(apps=[App.CODEINTERPRETER])
tools = toolset.get_tools(apps=[App.SQLTOOL, App.CODEINTERPRETER])

llm = OpenAI(model="gpt-4o")

prefix_messages = [
ChatMessage(
role="system",
content=(
"You are now a integration agent, and what ever you are requested, you will try to execute utilizing your toools."
),
)
]

agent = FunctionCallingAgentWorker(
tools=tools,
llm=llm,
prefix_messages=prefix_messages,
max_function_calls=10,
allow_parallel_tool_calls=False,
verbose=True,
).as_agent()

human_description = "The database to use is company.db"
human_input = "Query the table MOCK_DATA for all rows and plot a graph between first names and salary by using code interpretor"
response = agent.chat(
"Database description =" + human_description + "Task to perform:" + human_input
)
print("Response:", response)
import dotenv
from composio_llamaindex import App, ComposioToolSet
from llama_index.core.agent import FunctionCallingAgentWorker
from llama_index.core.llms import ChatMessage
from llama_index.llms.openai import OpenAI

from composio.tools.local import filetool, sqltool

dotenv.load_dotenv()
toolset = ComposioToolSet()
sql_tool = toolset.get_tools(apps=[App.SQLTOOL])
code_interpretor_tool = toolset.get_tools(apps=[App.CODEINTERPRETER])
tools = toolset.get_tools(apps=[App.SQLTOOL, App.CODEINTERPRETER])

llm = OpenAI(model="gpt-4o")

prefix_messages = [
ChatMessage(
role="system",
content=(
"You are now a integration agent, and what ever you are requested, you will try to execute utilizing your toools."
),
)
]

agent = FunctionCallingAgentWorker(
tools=tools,
llm=llm,
prefix_messages=prefix_messages,
max_function_calls=10,
allow_parallel_tool_calls=False,
verbose=True,
).as_agent()

human_description = "The database to use is company.db"
human_input = "Query the table MOCK_DATA for all rows and plot a graph between first names and salary by using code interpretor"
response = agent.chat(
"Database description =" + human_description + "Task to perform:" + human_input
)
print("Response:", response)