-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Describe the bug
While exploring the haystack documentation, I began by executing the code on the Get Started page. When executing the code, OpenAI returned an error indicating that I don't have enough quota to run this query.
Error message
haystack.core.errors.PipelineRuntimeError: The following component failed to run:
Component name: 'llm'
Component type: 'OpenAIChatGenerator'
Error: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}
Expected behavior
The code should run without errors, especially because this is the Hello World of haystack, and not all the people who are trying it for the first time have a quota on OpenAI, or want to spend it on the Hello World script of a platform they are still discovering.
Additional context
A solution could be to update the documentation by using another free cloud provider available in haystack, so that the code runs smoothly and users can get the expected responses without hitting OpenAI’s quota limits.
I tried HuggingFaceAPIChatGenerator from the documentation, and it worked, but I had to install "huggingface_hub[inference]>=0.27.0
To Reproduce
Run the code with an OPEN_API_KEY of a free-tier account on OpenAI.
FAQ Check
- [Yes] Have you had a look at our new FAQ page?
System:
- OS: WSL2 Ubuntu on Windows 11
- GPU/CPU: Not necessary
- Haystack version (commit or version number): 2.19.0
- DocumentStore: InMemoryDocumentStore
- Reader: Doesn't exist in the code
- Retriever: InMemoryBM25Retriever