-
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
In general, I typically utilize a 4K context. However, there are cases where I require a longer context of 16 tokens. In such cases, I have two options:
- Opt for a model with a larger context limit (16K) without the need to change the model name every time. This ensures I can consistently send/receive longer outputs, albeit at a higher cost.
- Stick with the 4K context and switch to a different model when a longer context is needed. While this option is more cost-effective, it does require a bit of additional time to make the model change.
The system provides an error message indicating the context limit (e.g., "Error: This model's maximum context length is 4097 tokens. However, you requested X tokens (Y in the messages, Z in the completion). Please reduce the length of the messages or completion.").
Based on this message or through automated calculation, the system can select the alternative model automatically.
Metadata
Metadata
Assignees
Labels
No labels
