Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions backend/ai_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ def __init__(self, api_key: str, model: str):
self.model = model

# Pre-build base API parameters
# Sonnet 5 rejects non-default sampling params, and runs adaptive
# thinking when `thinking` is omitted - disabled here to keep answers
# fast and to leave the full max_tokens budget for the response.
self.base_params = {
"model": self.model,
"temperature": 0,
"max_tokens": 800
"max_tokens": 800,
"thinking": {"type": "disabled"}
}

def generate_response(self, query: str,
Expand Down
2 changes: 1 addition & 1 deletion backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Config:
"""Configuration settings for the RAG system"""
# Anthropic API settings
ANTHROPIC_API_KEY: str = os.getenv("ANTHROPIC_API_KEY", "")
ANTHROPIC_MODEL: str = "claude-sonnet-4-20250514"
ANTHROPIC_MODEL: str = "claude-sonnet-5"

# Embedding model settings
EMBEDDING_MODEL: str = "all-MiniLM-L6-v2"
Expand Down