Closed benzntech closed 1 year ago
Thanks for the suggestion! Yes, this is in the todo list for the extension
Use the official OpenAI API to generate code or natural language responses from OpenAI's GPT3/GPT3.5 to your questions, right within the editor
Limitation on API :
OpenAI has some rate limits on their API access:
20 requests per minute for free access 60 rpm in pay as you go initially, then it ramps up to 3000 later see https://help.openai.com/en/articles/5955598-is-api-usage-subject-to-any-rate-limits for details.
Describe the solution you'd like I see 3 solutions:
get paid plan and wait a bit (3000 requests per minute should be fine for most cases) hack a time.sleep(X) in here haystack implements an optional rate limit in the eval methods
This request queries the Davinci model to complete the text starting with a prompt of "Say this is a test". The max_tokens parameter sets an upper bound on how many tokens the API will return. You should get a response back that resembles the following:
@benzntech please check V3. OpenAI GPT3 integration is now available. And yes, there are rate-limits and I suspect the APIs will get more restrictive in the future. But I added it as a method for people to experiment with their personal or organizational API Keys.
API is not working. Ask to reset the session not working as expected.
Allow us to use the API key which is consistent and how we are supposed to use the ChatGPT API.
Example of curl using the api
REFERENCE: https://beta.openai.com/docs/api-reference/authentication
Use the official OpenAI API to generate code or natural language responses from OpenAI's GPT3/GPT3.5 to your questions, right within the editor