Find answers from the community

Updated 5 months ago

Update

@Logan M i keep running into this:

Plain Text
TypeError: Can't instantiate abstract class Anthropic with abstract method _prepare_chat_with_tools


Plain Text
TypeError: Can't instantiate abstract class MistralAI with abstract method _prepare_chat_with_tools


It's strange because i'm importing them correctly:

Plain Text
from llama_index.llms.anthropic import Anthropic
from llama_index.llms.mistralai import MistralAI
L
t
22 comments
Try updating
pip install -U llama-index-llms-anthropic
@Logan M here's what i have:

Plain Text
llama-index==0.10.57
llama-index-llms-anthropic==0.1.15
llama-index-llms-mistralai==0.1.17
llama-index-llms-ollama==0.1.5
llama-index-llms-openai==0.1.27
llama-index-vector-stores-chroma==0.1.10
llama-index-vector-stores-pinecone==0.1.8
Latest anthropic is 0.1.16
Update and all is well
ok thanks, are the dependencies not "locked"
@Logan M still getting it
Are you in a notebook? You'll have to restart it
now using:

Plain Text
llama-index==0.10.59
llama-index-llms-anthropic==0.1.16
llama-index-llms-mistralai==0.1.19
llama-index-llms-ollama==0.2.2
llama-index-llms-openai==0.1.27
llama-index-vector-stores-chroma==0.1.10
llama-index-vector-stores-pinecone==0.1.8
no i'm in pycharm but i uninstalled all deps and reinstalled
(If it's another llm besides anthropic giving the error, you'll have to update that one as well)
still anthropic
That method it's complaining about is 100% implemented in the source code on github. Maybe the latest version failed to publish, maybe you still have venv issues

Can figure it out in a bit when I have my laptop
oh it was my setup.py that needed updating
@Logan M just curious, is there a way to create a query engine from the Anthropic llm? i'm trying to replicate this multi agent scenario but each agent will use a different llm - https://docs.llamaindex.ai/en/stable/examples/agent/multi_document_agents/#building-multi-document-agents
because i'm getting this and i wasn't before:

Plain Text
Observation: Error: 'Anthropic' object has no attribute 'aquery'
You definitely can, but it sounds like you are calling aquery on an llm instead of on a query engine/agent πŸ‘€ probably a small setup bug
that was it. my issue is i'm trying to work around the Settings.llm which keeps overriding the specific llm i want to use
You can always pass in the llm locally to the modules you are using

.as_query_engine(llm=llm, ..)
.as_chat_engine(llm=llm, ...)
.from_tools(..., llm=llm, ....)
would it be possible to have a quick call or i can send you the code i'm having issues with
probably easier to send the code, its like 9pm here πŸ˜…
ok just sent a friend req
Add a reply
Sign up and join the conversation on Discord