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

Rolling Window Splitter error #260

Open
jamescalam opened this issue Apr 28, 2024 · 0 comments
Open

Rolling Window Splitter error #260

jamescalam opened this issue Apr 28, 2024 · 0 comments

Comments

@jamescalam
Copy link
Member

Seeing this error:

BadRequestError                           Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/semantic_router/encoders/openai.py](https://localhost:8080/#) in __call__(self, docs)
     56             try:
---> 57                 embeds = self.client.embeddings.create(
     58                     input=docs,

7 frames
BadRequestError: Error code: 400 - {'error': {'message': "This model's maximum context length is 8192 tokens, however you requested 8861 tokens (8861 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.", 'type': 'invalid_request_error', 'param': None, 'code': None}}

During handling of the above exception, another exception occurred:

KeyboardInterrupt                         Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/semantic_router/encoders/openai.py](https://localhost:8080/#) in __call__(self, docs)
     63                     break
     64             except OpenAIError as e:
---> 65                 sleep(2**j)
     66                 error_message = str(e)
     67                 logger.warning(f"Retrying in {2**j} seconds...")

KeyboardInterrupt:

When trying to encode this file.

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

No branches or pull requests

1 participant