Skip to content

Conversation

@nikazzio
Copy link
Member

@nikazzio nikazzio commented Jun 6, 2025

This PR adds a new config parameter to customizable LLM configurations in both completion and chat endpoints. The changes include:

  • Adding a new config field in ChatBody, CompletionBody, CompletionParams, and ChatParams.
  • Updating chain functions in query.py and completions.py to check for and use the provided configuration.

@stefanorosanelli stefanorosanelli requested a review from Copilot June 10, 2025 13:25

This comment was marked as outdated.

@stefanorosanelli stefanorosanelli changed the title feat: add config parameter to completion and chat parameters Add config parameter to /completion and /chat endpoints Jun 13, 2025
@stefanorosanelli stefanorosanelli requested a review from Copilot June 13, 2025 14:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new config parameter to customizable LLM configurations for both completion and chat endpoints.

  • Adds a config field to ChatBody and CompletionBody.
  • Refactors chain functions and LLM configuration handling to use get_model_config.
  • Introduces tests for the new get_model_config function.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_completions.py Added tests for get_model_config functionality
brevia/routers/qa_router.py Added config field to ChatBody
brevia/routers/completion_router.py Added config field to CompletionBody
brevia/query.py Updated LLM configuration retrieval to use get_model_config
brevia/models.py Introduced get_model_config and added glom support
brevia/completions.py Updated simple_completion_chain to use get_model_config
Comments suppressed due to low confidence (1)

brevia/models.py:51

  • The get_settings function is used without being imported. Please add 'from brevia.settings import get_settings' at the top of the file to ensure it is available.
    settings = get_settings()

@stefanorosanelli stefanorosanelli merged commit 42c145e into main Jun 13, 2025
20 checks passed
@stefanorosanelli stefanorosanelli deleted the feat/238-config-param branch June 13, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants