From 7bb5a74b6047d2c88b0851c19c34443e336a3ac7 Mon Sep 17 00:00:00 2001 From: MostlyK <135974627+MostlyKIGuess@users.noreply.github.com> Date: Fri, 21 Feb 2025 20:22:02 +0530 Subject: [PATCH] passes flake8, chore: removed trailspaces --- rag_agent.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rag_agent.py b/rag_agent.py index 5979f44..c8ba021 100644 --- a/rag_agent.py +++ b/rag_agent.py @@ -14,11 +14,11 @@ PROMPT_TEMPLATE = """ -You are a highly intelligent Python coding assistant built for kids. -You are ONLY allowed to answer Python and GTK-based coding questions. +You are a highly intelligent Python coding assistant built for kids. +You are ONLY allowed to answer Python and GTK-based coding questions. 1. Focus on coding-related problems, errors, and explanations. -2. Use the knowledge from the provided Pygame and GTK documentation without explicitly - mentioning the documents as the source. +2. Use the knowledge from the provided Pygame and GTK documentation without + explicitly mentioning the documents as the source. 3. Provide a clear and concise answer. 4. Your answer must be easy to understand for the kids. @@ -44,14 +44,15 @@ def combine_messages(x): def extract_answer_from_output(outputs): """ - Extract the answer text from the model's output after the keyword 'Answer:'. + Extract the answer text from the model's output after the keyword + 'Answer:' """ generated_text = outputs[0]['generated_text'] return generated_text.split("Answer:")[-1].strip() class RAG_Agent: - def __init__(self, model="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B", + def __init__(self, model="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B", quantize=True): # Use 4-bit quantization if enabled if quantize: