Skip to content

Commit

Permalink
Update LangChain versions in RAG operations
Browse files Browse the repository at this point in the history
Also prevent LiteLLM failures if a parameter is not recognized.
  • Loading branch information
petermuller committed Oct 2, 2024
1 parent 35dfeed commit d9ac66b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/rag/layer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
boto3>=1.34.131
botocore>=1.34.131
langchain==0.2.10
langchain-community==0.2.9
langchain-openai==0.1.8
langchain==0.2.16
langchain-community==0.2.17
langchain-openai==0.1.25
opensearch-py==2.6.0
pgvector==0.2.5
psycopg2-binary==2.9.9
Expand Down
5 changes: 4 additions & 1 deletion lib/serve/rest-api/src/utils/generate_litellm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def generate_config(filepath: str) -> None:
config_models = config_contents["model_list"] or [] # ensure config_models is a list and not None
config_models.extend(litellm_model_params)
config_contents["model_list"] = config_models
config_contents["litellm_settings"] = {"request_timeout": 600}
config_contents["litellm_settings"] = {
"drop_params": True, # drop unrecognized param instead of failing the request on it
"request_timeout": 600,
}

# Get database connection info
db_param_response = ssm_client.get_parameter(Name=os.environ["LITELLM_DB_INFO_PS_NAME"])
Expand Down

0 comments on commit d9ac66b

Please sign in to comment.