Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the rate limit issue for openai embedder #470

Conversation

mmassime
Copy link
Contributor

Description

Previously there was no check to make sure that the openai key used when setting up an openai embedder was not expired. I added two checks:

  1. When inserting the key: an error will be shown and the user will have to insert a new key.
  2. Every time the cat is instantiated: this is done becuase the user can still insert a valid key which could expire in the following days and this could cause problems when the cat is launched. To avoid this, the check is re-executed at any instantiation of the cat and if a non-valid key is detected then the embedder is set to DumbEmbedder and a warning is logged in the console.

Related to issue #461

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@pieroit
Copy link
Member

pieroit commented Nov 3, 2023

Closing this to work on a more general, non openai-specific solution.
Thanks for this anyway :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants