Merge pull request #3433 from BerriAI/litellm_timeout_fix

fix(bedrock.py): convert httpx.timeout to boto3 valid timeout
This commit is contained in:
Krish Dholakia 2024-05-03 18:53:59 -07:00 committed by GitHub
commit 7d2aa2f645
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 146 additions and 89 deletions

View file

@ -4453,7 +4453,19 @@ def completion_cost(
raise e
def supports_function_calling(model: str):
def supports_httpx_timeout(custom_llm_provider: str) -> bool:
"""
Helper function to know if a provider implementation supports httpx timeout
"""
supported_providers = ["openai", "azure", "bedrock"]
if custom_llm_provider in supported_providers:
return True
return False
def supports_function_calling(model: str) -> bool:
"""
Check if the given model supports function calling and return a boolean value.