Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

[Feature] Default max_prompt_tokens should be LLM dependent #223

Open
1 of 2 tasks
igiloh-pinecone opened this issue Dec 13, 2023 · 0 comments
Open
1 of 2 tasks

[Feature] Default max_prompt_tokens should be LLM dependent #223

igiloh-pinecone opened this issue Dec 13, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@igiloh-pinecone
Copy link
Contributor

Is this your first time submitting a feature request?

  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing functionality

Describe the feature

The ChatEngine takes a max_prompt_tokens argument, which allows limiting the prompt size (message history + system prompt + retrieved context).
Currently, this argument has an arbitrary hard-coded default value of 4096. However - the real default value should be LLM dependent, as different LLMs have different context windows.

Describe alternatives you've considered

Each LLM class should have a context_window cached property (the value may change, according to model_name).
If the user hasn't specified max_prompt_tokens (the default should be None) - the ChatEngine will use llm.context_window.

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

@igiloh-pinecone igiloh-pinecone added enhancement New feature or request good first issue Good for newcomers labels Dec 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant