Skip to content

Commit

Permalink
Add timeout to OpenAI requests
Browse files Browse the repository at this point in the history
  • Loading branch information
basicthinker committed May 27, 2023
1 parent cd6945c commit f631677
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions devchat/openai/openai_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class OpenAIChatConfig(BaseModel):
frequency_penalty: Optional[float] = Field(None, ge=-2.0, le=2.0)
logit_bias: Optional[Dict[int, float]] = Field(None)
user: Optional[str] = Field(None)
request_timeout: Optional[int] = Field(12, ge=3)

class Config:
"""
Expand Down

0 comments on commit f631677

Please sign in to comment.