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

Module behaviour on OpenAI request content is to large #2024

Closed
bobvanluijt opened this issue Jul 9, 2022 · 3 comments
Closed

Module behaviour on OpenAI request content is to large #2024

bobvanluijt opened this issue Jul 9, 2022 · 3 comments
Labels
autoclosed Closed by the bot. We still want this, but it didn't quite make the latest prioritization round Bad UX Issues that frustrate our Users Module System

Comments

@bobvanluijt
Copy link
Member

Currently, the OpenAI module might return:

{
    'error': [
        {
            'message': "failed with status: 400 error: This model's maximum context length is 2046 tokens, however, you requested 142471 tokens (142471 in your prompt; 0 for the completion). Please reduce your prompt; or completion length."
        }
    ]
}

Can this be handled in the module? E.g., for this specific example that the 142471 token string is split into (142471/2046) 70 snippets, and a centroid is calculated and stored?

@bobvanluijt bobvanluijt added Bad UX Issues that frustrate our Users Module System labels Jul 9, 2022
@etiennedi
Copy link
Member

Great find! Indeed the other modules are handling this as part of the inference, I'm surprised OpenAI does not handle this server-side. Do we know if the 2046 is a global limit that we can hard-code or does this depend on the model selected?

@bobvanluijt
Copy link
Member Author

Asked it here

@stale
Copy link

stale bot commented Sep 20, 2022

Thank you for your contribution to Weaviate. This issue has not received any activity in a while and has therefore been marked as stale. Stale issues will eventually be autoclosed. This does not mean that we are ruling out to work on this issue, but it most likely has not been prioritized high enough in the last months.
If you believe that this issue should remain open, please leave a short reply. This lets us know that the issue is not abandoned and acts as a reminder for our team to consider prioritizing this again.
Please also consider if you can make a contribution to help with the solution of this issue. If you are willing to contribute, but don't know where to start, please leave a quick message and we'll try to help you.
Thank you, The Weaviate Team

@stale stale bot added the autoclosed Closed by the bot. We still want this, but it didn't quite make the latest prioritization round label Sep 20, 2022
@stale stale bot closed this as completed Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autoclosed Closed by the bot. We still want this, but it didn't quite make the latest prioritization round Bad UX Issues that frustrate our Users Module System
Projects
None yet
Development

No branches or pull requests

2 participants