Find answers from the community

Updated 9 months ago

```

Plain Text
ValueError                                Traceback (most recent call last)
<ipython-input-10-28019d5fbb7c> in <cell line: 63>()
     61 
     62 # pass wandb_callback to the service context
---> 63 Settings.callback_manager = CallbackManager([llama_debug, wandb_callback])
     64 Settings.llm = OpenAI(model="gpt-3.5-turbo")
     65 # Settings.embed_model = OpenAIEmbedding(model="text-embedding-3-small")

/usr/local/lib/python3.10/dist-packages/llama_index/core/callbacks/base.py in __init__(self, handlers)
     63             for existing_handler in handlers:
     64                 if isinstance(existing_handler, type(new_handler)):
---> 65                     raise ValueError(
     66                         "Cannot add two handlers of the same type "
     67                         f"{type(new_handler)} to the callback manager."

ValueError: Cannot add two handlers of the same type <class 'llama_index.callbacks.wandb.base.WandbCallbackHandler'> to the callback manager.
L
a
3 comments
i did:
Plain Text
from llama_index.core import set_global_handler
Works now, after restarting. Thanks @Logan M
Add a reply
Sign up and join the conversation on Discord