Merge pull request #2750 from danswer-ai/hotfix/v0.7-bedrock

backport Update litellm to fix bedrock models (#2649)
This commit is contained in:
rkuo-danswer 2024-10-09 14:47:24 -07:00 committed by GitHub
commit 7f9fdbdcfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View File

@ -290,10 +290,12 @@ class DefaultMultiLLM(LLM):
return litellm.completion(
# model choice
model=f"{self.config.model_provider}/{self.config.model_name}",
api_key=self._api_key,
base_url=self._api_base,
api_version=self._api_version,
custom_llm_provider=self._custom_llm_provider,
# NOTE: have to pass in None instead of empty string for these
# otherwise litellm can have some issues with bedrock
api_key=self._api_key or None,
base_url=self._api_base or None,
api_version=self._api_version or None,
custom_llm_provider=self._custom_llm_provider or None,
# actual input
messages=prompt,
tools=tools,

View File

@ -28,7 +28,7 @@ jsonref==1.1.0
langchain==0.1.17
langchain-core==0.1.50
langchain-text-splitters==0.0.1
litellm==1.47.1
litellm==1.48.7
llama-index==0.9.45
Mako==1.2.4
msal==1.28.0