Skip to content

Commit

Permalink
passes flake8, chore: removed trailspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
MostlyKIGuess committed Feb 21, 2025
1 parent fe0cb17 commit 7bb5a74
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions rag_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down

0 comments on commit 7bb5a74

Please sign in to comment.