fix: type of temperature param and adjust defaults for OpenAIAnswerGenerator (#3073)

* fix: type of temperature param and adjust defaults

* update schema

* update api docs
This commit is contained in:
Malte Pietsch 2022-09-16 14:11:33 +02:00 committed by GitHub
parent 4ddeb7b14b
commit 3134b0d679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -370,9 +370,9 @@ on the [OpenAI API website](https://openai.com/api/).
```python
def __init__(api_key: str,
model: str = "text-curie-001",
max_tokens: int = 7,
max_tokens: int = 13,
top_k: int = 5,
temperature: int = 0,
temperature: float = 0.2,
presence_penalty: float = -2.0,
frequency_penalty: float = -2.0,
examples_context: Optional[str] = None,

View File

@ -3908,7 +3908,7 @@
},
"max_tokens": {
"title": "Max Tokens",
"default": 7,
"default": 13,
"type": "integer"
},
"top_k": {
@ -3918,8 +3918,8 @@
},
"temperature": {
"title": "Temperature",
"default": 0,
"type": "integer"
"default": 0.2,
"type": "number"
},
"presence_penalty": {
"title": "Presence Penalty",

View File

@ -28,9 +28,9 @@ class OpenAIAnswerGenerator(BaseGenerator):
self,
api_key: str,
model: str = "text-curie-001",
max_tokens: int = 7,
max_tokens: int = 13,
top_k: int = 5,
temperature: int = 0,
temperature: float = 0.2,
presence_penalty: float = -2.0,
frequency_penalty: float = -2.0,
examples_context: Optional[str] = None,