From b92e316941375997dd9adf341a2aba26a5cd1fc6 Mon Sep 17 00:00:00 2001 From: = Enea_Gore Date: Wed, 9 Oct 2024 20:41:49 +0200 Subject: [PATCH] refactor predict and parse --- .../module_text_llm/module_text_llm/generate_evaluation.py | 3 ++- .../module_text_llm/module_text_llm/generate_suggestions.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/text/module_text_llm/module_text_llm/generate_evaluation.py b/modules/text/module_text_llm/module_text_llm/generate_evaluation.py index 73c24c65..50473dd3 100644 --- a/modules/text/module_text_llm/module_text_llm/generate_evaluation.py +++ b/modules/text/module_text_llm/module_text_llm/generate_evaluation.py @@ -9,8 +9,9 @@ from llm_core.utils.llm_utils import ( get_chat_prompt_with_formatting_instructions, check_prompt_length_and_omit_features_if_necessary, - predict_and_parse ) +from llm_core.utils.predict_and_parse import predict_and_parse + from module_text_llm.helpers.utils import add_sentence_numbers, get_line_range_from_index_range from module_text_llm.prompts.generate_evaluation import system_message, human_message diff --git a/modules/text/module_text_llm/module_text_llm/generate_suggestions.py b/modules/text/module_text_llm/module_text_llm/generate_suggestions.py index 42379991..be928dc2 100644 --- a/modules/text/module_text_llm/module_text_llm/generate_suggestions.py +++ b/modules/text/module_text_llm/module_text_llm/generate_suggestions.py @@ -10,8 +10,9 @@ get_chat_prompt_with_formatting_instructions, check_prompt_length_and_omit_features_if_necessary, num_tokens_from_prompt, - predict_and_parse ) +from llm_core.utils.predict_and_parse import predict_and_parse + from module_text_llm.helpers.utils import add_sentence_numbers, get_index_range_from_line_range, format_grading_instructions class FeedbackModel(BaseModel):