Find answers from the community

Updated 3 months ago

@Logan M I'm trying to use a CoA agent

I'm trying to use a CoA agent but the method .as_agent() results in an error "AttributeError: 'CoAAgentWorker' object has no attribute 'as_agent'":

worker = CoAAgentWorker.from_tools(
tools=query_engine_tools,
llm=Settings.llm,
verbose=True,
)

agent = worker.as_agent()

I have already tried using the current version 0.10.49 and the version 0.10.33 for llama index and llama index core where the as_agent() method was added and both give the same error. as_agent() wasn't reported to be deprecated in the changelogs
L
h
7 comments
its not deprecated? It works fine for me in the latest versions of llama-index-core
If you are running in a notebook, you'll need to restart after changing versions
I'm using vsc and I've already tried restarting both the computer and ide between versions
Is there supposed to be an as_agent() method defined in CoAAgentWorker? I can't see it in the sourcecode but it is present in BaseAgentWorker
CoAAgentWorker inherits from BaseAgentWorker
You can see in the colab above it works fine
Add a reply
Sign up and join the conversation on Discord