Skip to content

Commit

Permalink
Fix in check embedding model in startup (#45)
Browse files Browse the repository at this point in the history
* top_p/check_hybrid

* check embed model fails at startup
  • Loading branch information
corradodebari authored Nov 19, 2024
1 parent 0b6ed97 commit cec3d87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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

0 comments on commit cec3d87

Please sign in to comment.