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

[Bug]: Trying to run the vectorizer on a large number of new documents results in "Requested 629204 tokens, max 600000 tokens per request" from openai #481

Open
kolaente opened this issue Feb 14, 2025 · 2 comments · May be fixed by #482
Labels
bug Something isn't working community pgai

Comments

@kolaente
Copy link
Contributor

What happened?

I'm running the vectorizer on a new large dataset and get this error from openai:

unexpected error: Error code: 400 - {'error': {'message': 'Requested 629204 tokens, max 600000 tokens per request', 'type': 'max_tokens_per_request', 'param': None, 'code': 'max_tokens_per_request'}}

I wonder if that's a configuration error?

pgai extension affected

0.7.0

pgai library affected

No response

PostgreSQL version used

17

What operating system did you use?

latest timescale/timescaledb-ha:pg17

What installation method did you use?

Docker

What platform did you run on?

On prem/Self-hosted

Relevant log output and stack trace

How can we reproduce the bug?

1. Have a large amount of data
2. Create a vectorizer
3. Run the worker

(I can't really pin it down, will try to see if I can reproduce it better)

Are you going to work on the bugfix?

None

@kolaente
Copy link
Contributor Author

PR with a fix: #482

@cevian
Copy link
Collaborator

cevian commented Feb 14, 2025

@kolaente does reducing batch_size in the processing configuration (docs) help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community pgai
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants