-
-
Notifications
You must be signed in to change notification settings - Fork 586
Features/refactor llm cost #1024
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
Conversation
…atures/refactor-llm-cost
|
Auto Review Result: Code Review SummaryChange Overview: The code changes are aimed at enhancing the TokenStatsModel by incorporating more detailed input and output token tracking, including separate accounting for text and audio tokens. This improves accuracy in determining token usage costs for various input/output types in a machine learning context. Issues FoundIssue 1: Consistency Issue
Issue 2: Potential Null Reference
Overall EvaluationThe changes enhance the token management system by differentiating between text and audio tokens accurately. While the logic seems sound, particular attention should be paid to code consistency and avoiding potential null reference issues. Consider refactoring or encapsulating repetitive null handling code to improve readability and maintainability. |
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
PR Type
Enhancement, Bug fix
Description
Refactored LLM token and cost tracking for multimodal support
Updated all LLM provider plugins to use new token/cost fields
Adjusted configuration to new cost schema in
appsettings.jsonImproved statistics and reporting logic for LLM usage and costs
Changes walkthrough 📝
17 files
Refactor token stats model for multimodal supportRedesign LLM cost model for detailed input/outputUpdate statistics logic for new token/cost fieldsUpdate token stats usage to new fieldsUse granular token fields for Azure OpenAI chatUse new token fields for text completionsUpdate DeepSeekAI chat to new token/cost modelUse new token fields for DeepSeekAI text completionsUpdate Gemini chat to new token/cost fieldsUse new token fields for Gemini text completionsUpdate LangChain provider to new token statsUse new token fields for MetaGLM chat completionsAdd detailed input/output token structures for OpenAIUpdate OpenAI chat to use granular token fieldsUse detailed token stats in real-time OpenAI completionsUse new token fields for OpenAI text completionsUpdate SparkDesk provider to new token fields1 files
Rename variable for audio data clarity1 files
Migrate LLM model cost config to nested Cost object