fix: wire AgentGraph to YAML config #150
Closed
bhavyakeerthi3 wants to merge 3 commits intoreactome:mainfrom
Closed
fix: wire AgentGraph to YAML config #150bhavyakeerthi3 wants to merge 3 commits intoreactome:mainfrom
bhavyakeerthi3 wants to merge 3 commits intoreactome:mainfrom
Conversation
Updated the Config Pydantic model and YAML schema to include llm and embedding fields. Modified AgentGraph constructor to accept these configurations and updated the chat-chainlit.py entry point to pass them from the loaded configuration. This removes hardcoded 'gpt-4o-mini' and 'text-embedding-3-large' references, making the agent models fully configurable.
4d6f8f5 to
4384475
Compare
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.
Description
This PR addresses the long-standing issue where
AgentGraphhardcoded the LLM and embedding models, ignoring any settings inconfig.yml.First reported in #108, this completes the YAML configurability work by extending it to the most critical parameters.
Closes #108, Closes #148
Changes
llmandembeddingfields to theConfigclass insrc/util/config_yml/__init__.py..config.schema.yamlandconfig_default.ymlto support these fields with safe defaults (gpt-4o-mini,text-embedding-3-large).AgentGraphconstructor to accept and use these configurations instead of hardcoded strings.chat-chainlit.pyto correctly pass the YAML-loaded configurations to the agent during startup.Impact
The chatbot is now fully configurable. Users can switch to Claude, Gemini, or local Ollama models via
config.ymlwithout touching Python source code — making the project significantly more accessible to contributors and deployers.Tests Added
Added
test_config_loads_llm_and_embeddingtotests/test_config.py:Verification
Verified that
AgentGraphcorrectly receives and uses parameters fromconfig_default.ymlon startup.Files Affected
src/util/config_yml/__init__.pyconfig_default.yml.config.schema.yamlsrc/agent/graph.pybin/chat-chainlit.pytests/test_config.pyRelation to Other PRs
Completes configurability work started in #112 by AaryanCode69, extending it to cover LLM and embedding model parameters which were not included in that PR.