SurfSense/surfsense_backend/app/config/global_llm_config.example.yaml

110 lines
4 KiB
YAML
Raw Normal View History

2025-11-14 21:53:46 -08:00
# Global LLM Configuration
#
# SETUP INSTRUCTIONS:
# 1. For production: Copy this file to global_llm_config.yaml and add your real API keys
# 2. For testing: The system will use this example file automatically if global_llm_config.yaml doesn't exist
#
# NOTE: The example API keys below are placeholders and won't work.
# Replace them with your actual API keys to enable global configurations.
#
# These configurations will be available to all users as a convenient option
# Users can choose to use these global configs or add their own
2025-12-23 01:16:25 -08:00
#
# Structure matches NewLLMConfig:
# - LLM model configuration (provider, model_name, api_key, etc.)
# - Prompt configuration (system_instructions, citations_enabled)
2025-11-14 21:53:46 -08:00
global_llm_configs:
2025-12-23 01:16:25 -08:00
# Example: OpenAI GPT-4 Turbo with citations enabled
2025-11-14 21:53:46 -08:00
- id: -1
name: "Global GPT-4 Turbo"
2025-12-23 01:16:25 -08:00
description: "OpenAI's GPT-4 Turbo with default prompts and citations"
2025-11-14 21:53:46 -08:00
provider: "OPENAI"
model_name: "gpt-4-turbo-preview"
api_key: "sk-your-openai-api-key-here"
api_base: ""
litellm_params:
temperature: 0.7
max_tokens: 4000
2025-12-23 01:16:25 -08:00
# Prompt Configuration
system_instructions: "" # Empty = use default SURFSENSE_SYSTEM_INSTRUCTIONS
use_default_system_instructions: true
citations_enabled: true
2025-11-14 21:53:46 -08:00
# Example: Anthropic Claude 3 Opus
- id: -2
name: "Global Claude 3 Opus"
2025-12-23 01:16:25 -08:00
description: "Anthropic's most capable model with citations"
2025-11-14 21:53:46 -08:00
provider: "ANTHROPIC"
model_name: "claude-3-opus-20240229"
api_key: "sk-ant-your-anthropic-api-key-here"
api_base: ""
litellm_params:
temperature: 0.7
max_tokens: 4000
2025-12-23 01:16:25 -08:00
system_instructions: ""
use_default_system_instructions: true
citations_enabled: true
2025-11-14 21:53:46 -08:00
2025-12-23 01:16:25 -08:00
# Example: Fast model - GPT-3.5 Turbo (citations disabled for speed)
2025-11-14 21:53:46 -08:00
- id: -3
2025-12-23 01:16:25 -08:00
name: "Global GPT-3.5 Turbo (Fast)"
description: "Fast responses without citations for quick queries"
2025-11-14 21:53:46 -08:00
provider: "OPENAI"
model_name: "gpt-3.5-turbo"
api_key: "sk-your-openai-api-key-here"
api_base: ""
litellm_params:
temperature: 0.5
max_tokens: 2000
2025-12-23 01:16:25 -08:00
system_instructions: ""
use_default_system_instructions: true
citations_enabled: false # Disabled for faster responses
2025-11-14 21:53:46 -08:00
2025-12-23 01:16:25 -08:00
# Example: Chinese LLM - DeepSeek with custom instructions
2025-11-14 21:53:46 -08:00
- id: -4
2025-12-23 01:16:25 -08:00
name: "Global DeepSeek Chat (Chinese)"
description: "DeepSeek optimized for Chinese language responses"
2025-11-14 21:53:46 -08:00
provider: "DEEPSEEK"
model_name: "deepseek-chat"
api_key: "your-deepseek-api-key-here"
api_base: "https://api.deepseek.com/v1"
litellm_params:
temperature: 0.7
max_tokens: 4000
2025-12-23 01:16:25 -08:00
# Custom system instructions for Chinese responses
system_instructions: |
<system_instruction>
You are SurfSense, a reasoning and acting AI agent designed to answer user questions using the user's personal knowledge base.
Today's date (UTC): {resolved_today}
IMPORTANT: Please respond in Chinese (简体中文) unless the user specifically requests another language.
</system_instruction>
use_default_system_instructions: false
citations_enabled: true
2025-11-14 21:53:46 -08:00
# Example: Groq - Fast inference
- id: -5
name: "Global Groq Llama 3"
2025-12-23 01:16:25 -08:00
description: "Ultra-fast Llama 3 70B via Groq"
2025-11-14 21:53:46 -08:00
provider: "GROQ"
model_name: "llama3-70b-8192"
api_key: "your-groq-api-key-here"
api_base: ""
litellm_params:
temperature: 0.7
max_tokens: 8000
2025-12-23 01:16:25 -08:00
system_instructions: ""
use_default_system_instructions: true
citations_enabled: true
2025-11-14 21:53:46 -08:00
# Notes:
2025-12-23 01:16:25 -08:00
# - Use negative IDs to distinguish global configs from user configs (NewLLMConfig in DB)
2025-11-14 21:53:46 -08:00
# - IDs should be unique and sequential (e.g., -1, -2, -3, etc.)
# - The 'api_key' field will not be exposed to users via API
2025-12-23 01:16:25 -08:00
# - system_instructions: Custom prompt or empty string to use defaults
# - use_default_system_instructions: true = use SURFSENSE_SYSTEM_INSTRUCTIONS when system_instructions is empty
# - citations_enabled: true = include citation instructions, false = include anti-citation instructions
2025-11-14 21:53:46 -08:00
# - All standard LiteLLM providers are supported