Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix in check embedding model in startup #45

Merged
merged 3 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ spring_ai/create_user.sql
spring_ai/drop.sql
start.sh
spring_ai/env.sh
temp/rag_agent.ipynb
temp/tools.ipynb
temp/tools.py
temp/json-dual.sql
7 changes: 6 additions & 1 deletion app/src/modules/st_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,13 @@ def create_zip(state_dict_filt, provider):
def check_hybrid_conf(session_state_json):

chatModel = state.ll_model_config.get(session_state_json["ll_model"])
embModel = state.embed_model_config.get(state.rag_params["model"])

if "rag_params" in state and "model" in state.rag_params:
embModel = state.embed_model_config.get(state.rag_params["model"])
else:
# Handle the case where rag_params or "model" key does not exist
embModel = None # or some default value

logger.info("Model: %s",session_state_json["ll_model"])
logger.info("Embedding Model embModel: %s",embModel)
logger.info("Chat Model: %s",chatModel)
Expand Down