Add comprehensive GPT model support - Fix issue #475 - #478
Open
Likheet wants to merge 1 commit into
Open
Conversation
- Add support for 5 new GPT model variants: * GPT-3.5 Turbo: gpt-3.5-turbo-0125 (16K tokens) * GPT-4 Turbo: gpt-4-turbo-2024-04-09 (128K tokens) * GPT-4o variants: gpt-4o-2024-05-13, gpt-4o-2024-08-06 (128K tokens each) * GPT-4o Mini: gpt-4o-mini, gpt-4o-mini-2024-07-18 (128K tokens each) - Create robust helper functions in Models class: * is_gpt4_model() - Detects any GPT-4 variant including GPT-4o * is_high_context_model() - Identifies models with >8K token support * get_max_tokens() - Centralized token limit retrieval - Replace hardcoded model checks across 7 files with centralized functions - Update model collections with proper token mappings - Fix type annotations and syntax errors Resolves Kav-K#475: '/index chat' command now works with gpt-4o and other new models
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for 5 new GPT model variants:
Create robust helper functions in Models class:
Replace hardcoded model checks across 7 files with centralized functions
Update model collections with proper token mappings
Fix type annotations and syntax errors
Resolves #475: '/index chat' command now works with gpt-4o and other new models