Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
π
π
π
Powered by
Hall
Inactive
Updated 3 months ago
0
Follow
Agent
Agent
Inactive
0
Follow
B
Bhavya Giri
5 months ago
Β·
read_code_file_tool = FunctionTool.from_defaults(fn=read_code_file)
query_engine_tools = [
QueryEngineTool(
query_engine=query_engine,
metadata=ToolMetadata(
name="codebase",
description=(
"Provides the entine code base."
"Use a detailed plain text question as input to the tool."
),
),
)
]
agent = OpenAIAgent.from_tools(tools=[query_engine_tools, read_code_file_tool],
llm=OpenAI(model="gpt-3.5-turbo-1106",temperature=0.1,api_key=str(config.OPENAI_API_KEY) ),
system_prompt=SYSTEM_PROMPT,
max_function_calls=10,
verbose=True)
gives this error: 2024-07-13 15:10:55.659 | DEBUG | core.engine.query:query_agent:34 - Error querying agent: 'list' object has no attribute 'metadata'
2024-07-13 15:10:55.706 | ERROR | core.routes.query:user_input:19 - Error processing request: too many values to unpack (expected 2)
L
B
7 comments
Share
Open in Discord
L
Logan M
5 months ago
Pretty hard to debug without an actual traceback. Seems like it could be an issue anywhere in your code
B
Bhavya Giri
5 months ago
adding both the tools in OpenAI Agent gives these errors
L
Logan M
5 months ago
Sorry, I meant the full traceback if you have it π you might have to remove the try excepts in your code
B
Bhavya Giri
5 months ago
@Logan M this works?
B
Bhavya Giri
5 months ago
Another question can using query_engine_tool and a function tool with Anthropic agent with function agent?
L
Logan M
5 months ago
Seems like you passed in tools as lists of lists? Rather than a single flat list of tools? That's what the error is saying
L
Logan M
5 months ago
Also yea, anthropic works as a function calling agent
Add a reply
Sign up and join the conversation on Discord
Join on Discord