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

Code: 1001, Text = openai embedding request error #86

Open
elvin-du opened this issue Oct 16, 2023 · 3 comments
Open

Code: 1001, Text = openai embedding request error #86

elvin-du opened this issue Oct 16, 2023 · 3 comments

Comments

@elvin-du
Copy link

when I run ./target/release/askbend -c askbend.toml --rebuild cmd , I got the error as blow. how to fix this?

[2023-10-16T02:07:41Z INFO ] embedding 605/1936,  time: 513.095121ms
Error: APIError: ResponseError with 1001: openai embedding request error:Internal. Code: 1001, Text = openai embedding request error: ApiError("{\"error\":{\"message\":\"This model's maximum context length is 8191 tokens, however you requested 8916 tokens (8916 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.\",\"type\":\"invalid_request_error\",\"param\":null,\"code\":null}}").
@BohuTANG
Copy link
Contributor

context length is 8191 tokens please split your content to more small piece.

@elvin-du
Copy link
Author

content means the content of one file? I just put 390 files on the path which set in config file.

@BohuTANG
Copy link
Contributor

One of your file length is larger than 8191(prompts length + content length = 8916).
We should split this file into two parts, make sure not near 8191.

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

2 participants