Fix issue 126#127
Merged
Merged
Conversation
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.
This pull request removes the configuration and code related to the
*_MAX_INPUT_TOKENSparameters for both advanced and base LLM models. This affects environment files, service initialization, model construction, and related tests. Additionally, the utility functions for token counting using tiktoken have been removed, and some tool descriptions have been clarified.Model configuration and initialization cleanup:
PROMETHEUS_ADVANCED_MODEL_MAX_INPUT_TOKENSandPROMETHEUS_BASE_MODEL_MAX_INPUT_TOKENSfrom environment files (example.env), Docker Compose files (docker-compose.yml,docker-compose.win_mac.yml), and the GitHub Actions workflow (.github/workflows/pytest_and_coverage.yml). [1] [2] [3] [4]Settingsclass inprometheus/configuration/config.pyto remove the*_MAX_INPUT_TOKENSfields.LLMServiceand related initialization to no longer accept or pass*_max_input_tokensparameters, and updated theget_modelfunction andCustomChatOpenAIclass accordingly. [1] [2] [3] [4] [5] [6] [7] [8]Test updates:
*_max_input_tokensintests/app/services/test_llm_service.pyandtests/utils/test_lang_graph_util.py. [1] [2] [3] [4] [5] [6] [7]Utility and documentation updates:
prometheus/utils/llm_util.pymodule, removing thestr_token_counterandtiktoken_counterutility functions.TextNodeand these tools are only for text files and documentation.