Find answers from the community

Updated 9 months ago

Hi, I have an exception ""ABCMeta object

Hi, I have an exception ""ABCMeta object got multiple values for keyword argument 'callback_manager'"" when trying to pass the callback_manager:

Plain Text
query_engine = index.as_chat_engine(chat_mode='condense_plus_context', 
                                                similarity_top_k=similarity_top_k, 
                                                llm=llm_engine,
                                                system_prompt=prepared_system_prompt,
                                                callback_manager=callback_manager)

I was trying to pass it to the llm_engine but the problem was when it passed to different functions the counter didn't update. For example:

Plain Text
llm_engine = OpenAI(temperature=0, model=model_name, api_key=openai_key, max_tokens=response_limit, callback_manager=callback_manager)
response = llm.predict(prompt) # Count A
...
query_engine = index.as_chat_engine(chat_mode='condense_plus_context', 
                                                similarity_top_k=similarity_top_k, 
                                                llm=llm_engine,
                                                system_prompt=prepared_system_prompt)
response = query_engine.chat(query_text, chat_history=chat_history) # <=== Counter didn't update and still have value A
a
1 comment
I think the callback_manager keyword argument is being passed multiple times to a constructor or method somewhere

https://www.phorm.ai/query?projectId=c5863b56-6703-4a5d-87b6-7e6031bf16b6&threadId=b8bf2c87-9462-4544-9b47-3f1b618bc027
Add a reply
Sign up and join the conversation on Discord