simonw / simonw/llm

Error: This model's maximum context length is 4097 tokens. However, your messages resulted in 8285 tokens. Please reduce the length of the messages.

Open
#392 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
3d 13h
Merged PRs (30d)
10

Description

Hi, I'm seeing the following error when using the default model, 3.5:

Error: This model's maximum context length is 4097 tokens. However, your messages resulted in 8285 tokens. Please reduce the length of the messages.

Does the llm function default to using the new chatgpt-3.5-turbo-1106 model? I've noticed that in the models section of the configuration file, there are separate entries for gpt-4 and gpt-4-1106-preview, but there is only one entry for gpt-3.5-turbo. Does this mean I need to add the 1106 model to the openai models YAML file?

Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the llm function and the models section of the configuration, then inspect the openai models YAML file mentioned in the report. Determine which model the default gpt-3.5-turbo entry selects and whether chatgpt-3.5-turbo-1106 needs its own entry; done means the default model's context limit matches the documented behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.