Open maciejmajek opened 1 day ago
@coderabbit full review
The pull request introduces updates to the config.toml
file by adding two parameters, base_url
and api_key
, under the [openai]
section. Additionally, it implements a new data class, OpenAIConfig
, in the model_initialization.py
file, which extends ModelConfig
to include the new attributes. The RAIConfig
class is modified to utilize OpenAIConfig
, enhancing the handling of OpenAI configurations and improving error handling for the API key.
File | Change Summary |
---|---|
config.toml | Added base_url and api_key parameters under the [openai] section. |
src/rai/rai/utils/model_initialization.py | Introduced OpenAIConfig class with base_url and api_key . Updated RAIConfig to use OpenAIConfig . Modified load_config to instantiate OpenAIConfig . Enhanced get_llm_model to handle api_key retrieval and error management. |
config.toml
file in the main PR, specifically regarding the handling of OpenAI configurations.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Purpose
Some local model vendors support OpenAI api.
Proposed Changes
This Pr introduces changes that allow user to specify both
Issues
Testing
config.toml
Summary by CodeRabbit
New Features
base_url
andapi_key
.Bug Fixes
api_key
is not set, ensuring better user feedback.