semantic-router
semantic-router copied to clipboard
Rolling Window Splitter error
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.