diff --git a/docs/_src/api/api/generator.md b/docs/_src/api/api/generator.md index 6d2353d18..bda1b192b 100644 --- a/docs/_src/api/api/generator.md +++ b/docs/_src/api/api/generator.md @@ -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, diff --git a/haystack/json-schemas/haystack-pipeline-main.schema.json b/haystack/json-schemas/haystack-pipeline-main.schema.json index 54c077915..b274b3f17 100644 --- a/haystack/json-schemas/haystack-pipeline-main.schema.json +++ b/haystack/json-schemas/haystack-pipeline-main.schema.json @@ -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", diff --git a/haystack/nodes/answer_generator/openai.py b/haystack/nodes/answer_generator/openai.py index 192154f73..42d091507 100644 --- a/haystack/nodes/answer_generator/openai.py +++ b/haystack/nodes/answer_generator/openai.py @@ -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,