Skip to content

Conversation

dcloud347
Copy link
Contributor

This pull request removes the configuration and code related to the *_MAX_INPUT_TOKENS parameters 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:

  • Removed all references to PROMETHEUS_ADVANCED_MODEL_MAX_INPUT_TOKENS and PROMETHEUS_BASE_MODEL_MAX_INPUT_TOKENS from 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]
  • Updated the Settings class in prometheus/configuration/config.py to remove the *_MAX_INPUT_TOKENS fields.
  • Refactored LLMService and related initialization to no longer accept or pass *_max_input_tokens parameters, and updated the get_model function and CustomChatOpenAI class accordingly. [1] [2] [3] [4] [5] [6] [7] [8]

Test updates:

  • Removed all test code and mocks related to *_max_input_tokens in tests/app/services/test_llm_service.py and tests/utils/test_lang_graph_util.py. [1] [2] [3] [4] [5] [6] [7]

Utility and documentation updates:

  • Deleted the prometheus/utils/llm_util.py module, removing the str_token_counter and tiktoken_counter utility functions.
  • Clarified descriptions for several graph traversal tools to note that code snippets are not included in TextNode and these tools are only for text files and documentation.

@dcloud347 dcloud347 linked an issue Sep 8, 2025 that may be closed by this pull request
@dcloud347 dcloud347 merged commit 28a329c into main Sep 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable Message Trim Function

1 participant