From 9952e2ee5cc6a19f10b8d9ef4ab083952162937d Mon Sep 17 00:00:00 2001 From: Adam Nolte Date: Wed, 28 Feb 2024 10:41:43 -0600 Subject: [PATCH] Use all params --- .../my_project/tasks/flashcard_generator.py | 4 ++++ .../my_project/tasks/study_guide_outline.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Python/testing-sdk-with-prompt-sdk/my_project/tasks/flashcard_generator.py b/Python/testing-sdk-with-prompt-sdk/my_project/tasks/flashcard_generator.py index 582f2129..e3c09ddd 100644 --- a/Python/testing-sdk-with-prompt-sdk/my_project/tasks/flashcard_generator.py +++ b/Python/testing-sdk-with-prompt-sdk/my_project/tasks/flashcard_generator.py @@ -29,6 +29,10 @@ def gen_flashcards_from_notes(notes: str) -> List[Flashcard]: response = openai_client.chat.completions.create( model=prompt.params.model, temperature=prompt.params.temperature, + max_tokens=prompt.params.max_tokens, + top_p=prompt.params.top_p, + presence_penalty=prompt.params.presence_penalty, + frequency_penalty=prompt.params.frequency_penalty, response_format=ResponseFormat(type="json_object"), messages=[ dict( diff --git a/Python/testing-sdk-with-prompt-sdk/my_project/tasks/study_guide_outline.py b/Python/testing-sdk-with-prompt-sdk/my_project/tasks/study_guide_outline.py index f9cbc9b9..63ecfa83 100644 --- a/Python/testing-sdk-with-prompt-sdk/my_project/tasks/study_guide_outline.py +++ b/Python/testing-sdk-with-prompt-sdk/my_project/tasks/study_guide_outline.py @@ -27,6 +27,9 @@ def gen_study_guide_outline(topic: str) -> str: model=prompt.params.model, temperature=prompt.params.temperature, max_tokens=prompt.params.max_tokens, + top_p=prompt.params.top_p, + presence_penalty=prompt.params.presence_penalty, + frequency_penalty=prompt.params.frequency_penalty, n=1, messages=[ dict(