Find answers from the community

Updated 4 months ago

Please help below error appeared when I

At a glance

The community member is experiencing an error when evaluating RAG using LlamaDataset from LlamaHub, specifically an "Illegal header value b'Bearer '" and an "APIConnectionError". The comments suggest that this is likely due to the API key not being set correctly, particularly the OpenAI key. One community member notes that the key works fine for fetching activities, while another suggests ensuring the right ServiceContext class is used and that the set_global_service_context function can be helpful. There is no explicitly marked answer in the comments.

Please help below error appeared when I was evaluating RAG using LlamaDataset from LlamaHub raise mapped_exc(message) from exc
httpx.LocalProtocolError: Illegal header value b'Bearer '

During handling of the above exception, another exception occurred: raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
Attachment
image.png
L
A
C
3 comments
This usually means an API key is not set (like your openai key)
The key works fine for fetching activities
I had the same issue until i made sure the right ServiceContext class is used. There is a set_global_service_context function thats useful as well
Add a reply
Sign up and join the conversation on Discord