Skip to content

Commit

Permalink
Change default temperature of GPT to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
basicthinker committed May 19, 2023
1 parent 5b3d4d0 commit c9fcf60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions devchat/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def init_dir() -> Tuple[dict, Store]:
'model': 'gpt-3.5-turbo',
'provider': 'OpenAI',
'OpenAI': {
'temperature': 0.2
'temperature': 0
}
}

Expand Down Expand Up @@ -106,7 +106,7 @@ def prompt(content: Optional[str], parent: Optional[str], reference: Optional[Li
"tokens-per-prompt": 3000,
"provider": "OpenAI",
"OpenAI": {
"temperature": 0.2
"temperature": 0
}
}
```
Expand All @@ -119,7 +119,7 @@ def prompt(content: Optional[str], parent: Optional[str], reference: Optional[Li
"tokens-per-prompt": 6000,
"provider": "OpenAI",
"OpenAI": {
"temperature": 0.2,
"temperature": 0,
"stream": true
}
}
Expand Down
2 changes: 1 addition & 1 deletion devchat/openai/openai_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class OpenAIChatConfig(BaseModel):
Configuration object for the OpenAIChat class.
"""
model: str
temperature: Optional[float] = Field(None, ge=0, le=2)
temperature: Optional[float] = Field(0, ge=0, le=2)
top_p: Optional[float] = Field(None, ge=0, le=1)
n: Optional[int] = Field(None, ge=1)
stream: Optional[bool] = Field(None)
Expand Down

0 comments on commit c9fcf60

Please sign in to comment.