forked from onamfc/rag-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
152 lines (122 loc) · 3.68 KB
/
config.yaml
File metadata and controls
152 lines (122 loc) · 3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Xantus Configuration File
# Configure your LLM, embeddings, vector store, and RAG settings
# ===== LLM Configuration =====
llm:
# Provider: ollama, openai, or anthropic
provider: anthropic
# Model name (depends on provider)
# Ollama: llama3.2, mistral, etc.
# OpenAI: gpt-4, gpt-3.5-turbo, etc.
# Anthropic: claude-sonnet-4-20250514, claude-3-5-sonnet-20241022, etc.
model: claude-sonnet-4-20250514
# Temperature for sampling (0.0 to 2.0)
temperature: 0.7
# Maximum tokens to generate
max_tokens: 2048
# API key (required for OpenAI and Anthropic)
# Can also be set via environment variable: XANTUS_LLM_API_KEY
api_key: null
# API base URL (optional, for custom endpoints)
# For Ollama, defaults to http://localhost:11434
api_base: null
# ===== Embedding Configuration =====
embedding:
# Provider: huggingface, ollama, or openai
provider: huggingface
# Model name
# HuggingFace: BAAI/bge-small-en-v1.5, sentence-transformers/all-MiniLM-L6-v2
# Ollama: nomic-embed-text, mxbai-embed-large
# OpenAI: text-embedding-3-small, text-embedding-ada-002
model: BAAI/bge-small-en-v1.5
# Batch size for embedding generation
embed_batch_size: 10
# API key (required for OpenAI)
api_key: null
# ===== Vector Store Configuration =====
vector_store:
# Provider: chroma or qdrant
provider: chroma
# Path to persist vector store data
persist_path: ./data/vector_store
# Collection name
collection_name: xantus_documents
# ===== RAG Configuration =====
rag:
# Number of similar chunks to retrieve
similarity_top_k: 5
# Size of text chunks for indexing (in characters)
chunk_size: 1024
# Overlap between chunks (in characters)
chunk_overlap: 200
# Enable reranking of retrieved chunks (requires additional setup)
enable_reranking: false
# ===== Server Configuration =====
server:
# Host to bind the server to
host: 127.0.0.1
# Port to bind the server to
port: 8000
# Enable CORS
cors_enabled: true
# Allowed CORS origins
cors_origins:
- "*"
# ===== Example Configurations =====
# Example 1: Local setup with Ollama
# llm:
# provider: ollama
# model: llama3.2
# api_base: http://localhost:11434
# embedding:
# provider: ollama
# model: nomic-embed-text
# Example 2: Cloud setup with OpenAI
# llm:
# provider: openai
# model: gpt-4
# api_key: sk-your-api-key-here
# embedding:
# provider: openai
# model: text-embedding-3-small
# api_key: sk-your-api-key-here
# Example 3: Hybrid setup - Anthropic LLM with local embeddings
# llm:
# provider: anthropic
# model: claude-3-5-sonnet-20241022
# api_key: sk-ant-your-api-key-here
# embedding:
# provider: huggingface
# model: BAAI/bge-small-en-v1.5
# Example 4: All local with Ollama
# llm:
# provider: ollama
# model: mistral
# embedding:
# provider: ollama
# model: nomic-embed-text
# vector_store:
# provider: chroma
# persist_path: ./data/vector_store
# ===== MCP Configuration =====
# Enable MCP to connect external tools (calculator, file system, etc.)
mcp:
# Set to true to enable MCP integration
enabled: true
# List of MCP servers to connect to
servers:
- name: "mcp-starter-template"
command: "node"
args: ["mcp-servers/mcp-starter-template-ts/dist/start.js"]
# Example: Using absolute path (for external MCP servers)
# servers:
# - name: "external-mcp-server"
# command: "node"
# args: ["/absolute/path/to/server/index.js"]
# Example: Multiple MCP servers
# servers:
# - name: "my-tools"
# command: "node"
# args: ["/path/to/mcp-server/index.js"]
# - name: "database-tools"
# command: "npx"
# args: ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]