Skip to content

Dev#83

Merged
dcloud347 merged 5 commits into
mainfrom
dev
Jul 2, 2025
Merged

Dev#83
dcloud347 merged 5 commits into
mainfrom
dev

Conversation

@dcloud347

Copy link
Copy Markdown
Contributor

This pull request introduces significant updates to the handling of LLM (Large Language Model) API integrations, including a shift to using openai_format keys and base URLs, removal of support for certain providers, and enhancements to configuration and testing. The changes streamline the codebase, improve clarity, and ensure proper testing of the updated functionality.

Updates to LLM API Integrations:

  • Replaced PROMETHEUS_OPENAI_API_KEY with PROMETHEUS_OPENAI_FORMAT_API_KEY and added PROMETHEUS_OPENAI_FORMAT_BASE_URL in multiple configuration files (.github/workflows/pytest_and_coverage.yml, docker-compose.yml, docker-compose.win_mac.yml, example.env) to support the new OpenAI integration format. Removed keys for openrouter and deepseek. [1] [2] [3] [4]

  • Updated the LLMService class in prometheus/app/services/llm_service.py to use openai_format_api_key and openai_format_base_url instead of the older openai_api_key. Removed support for openrouter and deepseek models, simplifying the get_model function. [1] [2]

Configuration Improvements:

  • Removed unused superuser credentials (PROMETHEUS_SUPERUSER_USERNAME, PROMETHEUS_SUPERUSER_PASSWORD, PROMETHEUS_SUPERUSER_EMAIL) from .github/workflows/pytest_and_coverage.yml and example.env. [1] [2]

  • Improved organization of environment variables in docker-compose.yml and docker-compose.win_mac.yml by grouping them under relevant sections (e.g., Logging, Neo4j, Knowledge Graph, LLM model settings). [1] [2]

Testing Enhancements:

  • Added a new script, prometheus/script/test_llm_service.py, to manually test the LLM service's response for both base and advanced models.

  • Updated unit tests in tests/app/services/test_llm_service.py to reflect the new openai_format keys and base URL. Removed tests for deprecated providers (openrouter, deepseek) and unknown model handling. [1] [2] [3] [4]

Dependency Updates:

  • Updated the initialize_services function in prometheus/app/dependencies.py to pass the new openai_format_api_key and openai_format_base_url to the LLMService.

@dcloud347 dcloud347 merged commit 94cb35b into main Jul 2, 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.

1 participant