diff --git a/topicgpt_python/assignment.py b/topicgpt_python/assignment.py index 46373de..d9a519a 100644 --- a/topicgpt_python/assignment.py +++ b/topicgpt_python/assignment.py @@ -199,7 +199,7 @@ def assign_topics(api, model, data, prompt_file, out_file, topic_file, verbose): - verbose (bool): Whether to print out results """ api_client = APIClient(api=api, model=model) - max_tokens, temperature, top_p = 1000, 0.0, 1.0 + max_tokens, temperature, top_p = 1000, 1.0, 1.0 if verbose: print("-------------------") diff --git a/topicgpt_python/correction.py b/topicgpt_python/correction.py index 00fd31b..f5b83f4 100644 --- a/topicgpt_python/correction.py +++ b/topicgpt_python/correction.py @@ -198,7 +198,7 @@ def correct_topics( - verbose: Print verbose output """ api_client = APIClient(api=api, model=model) - max_tokens, temperature, top_p = 1000, 0.6, 0.9 + max_tokens, temperature, top_p = 1000, 1.0, 0.9 context_len = ( 128000 if model not in ["gpt-3.5-turbo", "gpt-4"] diff --git a/topicgpt_python/generation_1.py b/topicgpt_python/generation_1.py index e81d8ba..00cadc3 100644 --- a/topicgpt_python/generation_1.py +++ b/topicgpt_python/generation_1.py @@ -170,7 +170,7 @@ def generate_topic_lvl1( - topics_root (TopicTree): Root node of the topic tree """ api_client = APIClient(api=api, model=model) - max_tokens, temperature, top_p = 1000, 0.0, 1.0 + max_tokens, temperature, top_p = 1000, 1.0, 1.0 if verbose: print("-------------------") diff --git a/topicgpt_python/generation_2.py b/topicgpt_python/generation_2.py index 69294a3..0d41eeb 100644 --- a/topicgpt_python/generation_2.py +++ b/topicgpt_python/generation_2.py @@ -254,7 +254,7 @@ def generate_topic_lvl2( Returns: Root node of the topic tree """ api_client = APIClient(api=api, model=model) - max_tokens, temperature, top_p = 1000, 0.0, 1.0 + max_tokens, temperature, top_p = 1000, 1.0, 1.0 if verbose: print("-------------------") diff --git a/topicgpt_python/refinement.py b/topicgpt_python/refinement.py index 7681615..c21a7b3 100644 --- a/topicgpt_python/refinement.py +++ b/topicgpt_python/refinement.py @@ -261,7 +261,7 @@ def refine_topics( - None """ api_client = APIClient(api=api, model=model) - max_tokens, temperature, top_p = 1000, 0.0, 1.0 + max_tokens, temperature, top_p = 1000, 1.0, 1.0 topics_root = TopicTree().from_topic_list(topic_file, from_file=True) if verbose: print("-------------------") diff --git a/topicgpt_python/utils.py b/topicgpt_python/utils.py index 2712864..250798a 100644 --- a/topicgpt_python/utils.py +++ b/topicgpt_python/utils.py @@ -159,7 +159,7 @@ def iterative_prompt( completion = self.client.chat.completions.create( model=self.model, messages=message, - max_tokens=max_tokens, + max_completion_tokens=max_tokens, temperature=temperature, top_p=top_p, )