mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-01 18:20:06 +00:00
Set 5 min timeout for LLM calls (#358)
This commit is contained in:
parent
df2aee3c79
commit
753bac3174
2 changed files with 3 additions and 0 deletions
|
@ -64,6 +64,7 @@ class Settings(BaseSettings):
|
|||
# ACTIVE LLM PROVIDER
|
||||
LLM_KEY: str = "OPENAI_GPT4O"
|
||||
# COMMON
|
||||
LLM_CONFIG_TIMEOUT: int = 300
|
||||
LLM_CONFIG_MAX_TOKENS: int = 4096
|
||||
LLM_CONFIG_TEMPERATURE: float = 0
|
||||
# LLM PROVIDER SPECIFIC
|
||||
|
|
|
@ -190,8 +190,10 @@ class LLMAPIHandlerFactory:
|
|||
response = await litellm.acompletion(
|
||||
model=llm_config.model_name,
|
||||
messages=messages,
|
||||
timeout=SettingsManager.get_settings().LLM_CONFIG_TIMEOUT,
|
||||
**active_parameters,
|
||||
)
|
||||
LOG.info("LLM API call successful", llm_key=llm_key, model=llm_config.model_name)
|
||||
except openai.OpenAIError as e:
|
||||
raise LLMProviderError(llm_key) from e
|
||||
except Exception as e:
|
||||
|
|
Loading…
Add table
Reference in a new issue