forked from opendatahub-io/ogx-distribution
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
280 lines (280 loc) · 9.58 KB
/
Copy pathconfig.yaml
File metadata and controls
280 lines (280 loc) · 9.58 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# This file is automatically generated from build.yaml
# by build/gen_config.py - do not edit manually.
#
# Stripped provider types (dependency only - available via custom config.yaml):
# - inline::docling
# - inline::faiss
# - inline::markitdown
# - inline::milvus
# - inline::pypdf
# - inline::sentence-transformers
# - remote::docling-serve
version: 2
image_name: rh
apis:
- responses
- messages
- batches
- inference
- tool_runtime
- vector_io
- files
- file_processors
providers:
inference:
- provider_id: ${env.VLLM_URL:+vllm-inference}
provider_type: remote::vllm
config:
base_url: ${env.VLLM_URL:=}
max_tokens: ${env.VLLM_MAX_TOKENS:=4096}
api_token: ${env.VLLM_API_TOKEN:=fake}
tls_verify: ${env.VLLM_TLS_VERIFY:=true}
refresh_models: ${env.VLLM_REFRESH_MODELS:=false}
- provider_id: ${env.VLLM_EMBEDDING_URL:+vllm-embedding}
provider_type: remote::vllm
config:
base_url: ${env.VLLM_EMBEDDING_URL:=}
max_tokens: ${env.VLLM_EMBEDDING_MAX_TOKENS:=4096}
api_token: ${env.VLLM_EMBEDDING_API_TOKEN:=fake}
tls_verify: ${env.VLLM_EMBEDDING_TLS_VERIFY:=true}
refresh_models: ${env.VLLM_EMBEDDING_REFRESH_MODELS:=false}
- provider_id: ${env.ENABLE_BEDROCK:+bedrock}
provider_type: remote::bedrock
config:
aws_bedrock_bearer_token: ${env.AWS_BEDROCK_BEARER_TOKEN:=}
region_name: ${env.AWS_DEFAULT_REGION:=us-east-2}
aws_role_arn: ${env.AWS_ROLE_ARN:=}
aws_web_identity_token_file: ${env.AWS_WEB_IDENTITY_TOKEN_FILE:=}
- provider_id: ${env.WATSONX_API_KEY:+watsonx}
provider_type: remote::watsonx
config:
base_url: ${env.WATSONX_BASE_URL:=https://us-south.ml.cloud.ibm.com}
api_key: ${env.WATSONX_API_KEY:=}
project_id: ${env.WATSONX_PROJECT_ID:=}
- provider_id: ${env.AZURE_API_KEY:+azure}
provider_type: remote::azure
config:
api_key: ${env.AZURE_API_KEY:=}
api_base: ${env.AZURE_API_BASE:=}
api_version: ${env.AZURE_API_VERSION:=}
api_type: ${env.AZURE_API_TYPE:=}
- provider_id: ${env.VERTEX_AI_PROJECT:+vertexai}
provider_type: remote::vertexai
config:
project: ${env.VERTEX_AI_PROJECT:=}
location: ${env.VERTEX_AI_LOCATION:=global}
- provider_id: ${env.OPENAI_API_KEY:+openai}
provider_type: remote::openai
config:
api_key: ${env.OPENAI_API_KEY:=}
base_url: ${env.OPENAI_BASE_URL:=https://api.openai.com/v1}
- provider_id: ${env.ENABLE_GEMINI:+gemini}
provider_type: remote::gemini
config:
api_key: ${env.GEMINI_API_KEY:=}
access_token: ${env.GEMINI_ACCESS_TOKEN:=}
project: ${env.GEMINI_AI_PROJECT:=}
- provider_id: ${env.ANTHROPIC_API_KEY:+anthropic}
provider_type: remote::anthropic
config:
api_key: ${env.ANTHROPIC_API_KEY:=}
vector_io:
- provider_id: ${env.MILVUS_ENDPOINT:+milvus-remote}
provider_type: remote::milvus
config:
uri: ${env.MILVUS_ENDPOINT:=}
token: ${env.MILVUS_TOKEN:=}
secure: ${env.MILVUS_SECURE:=}
consistency_level: ${env.MILVUS_CONSISTENCY_LEVEL:=}
ca_pem_path: ${env.MILVUS_CA_PEM_PATH:=}
client_pem_path: ${env.MILVUS_CLIENT_PEM_PATH:=}
client_key_path: ${env.MILVUS_CLIENT_KEY_PATH:=}
persistence:
backend: kv_default
namespace: vector_io::milvus_remote
- provider_id: ${env.ENABLE_PGVECTOR:+pgvector}
provider_type: remote::pgvector
config:
host: ${env.PGVECTOR_HOST:=localhost}
port: ${env.PGVECTOR_PORT:=5432}
db: ${env.PGVECTOR_DB:=}
user: ${env.PGVECTOR_USER:=}
password: ${env.PGVECTOR_PASSWORD:=}
persistence:
backend: kv_default
namespace: vector_io::pgvector
- provider_id: ${env.ENABLE_QDRANT:+qdrant-remote}
provider_type: remote::qdrant
config:
location: ${env.QDRANT_LOCATION:=}
url: ${env.QDRANT_URL:=}
port: ${env.QDRANT_PORT:=6333}
grpc_port: ${env.QDRANT_GRPC_PORT:=6334}
prefer_grpc: ${env.QDRANT_PREFER_GRPC:=false}
https: ${env.QDRANT_HTTPS:=}
api_key: ${env.QDRANT_API_KEY:=}
prefix: ${env.QDRANT_PREFIX:=}
timeout: ${env.QDRANT_TIMEOUT:=}
host: ${env.QDRANT_HOST:=}
persistence:
backend: kv_default
namespace: vector_io::qdrant_remote
responses:
- provider_id: meta-reference
provider_type: inline::builtin
config:
persistence:
agent_state:
backend: kv_default
namespace: agents::meta_reference
responses:
backend: sql_default
table_name: agents_responses
max_write_queue_size: 10000
num_writers: 4
messages:
# Implements the Anthropic Messages API (/v1/messages). Native passthrough for
# providers that support it (e.g. vLLM); translates Anthropic <-> OpenAI Chat
# Completions for all other providers. Depends on the inference API.
- provider_id: builtin
provider_type: inline::builtin
config:
kvstore:
backend: kv_default
namespace: message_batches
tool_runtime:
# NOTE: inline::file-search requires a 'files' provider at runtime
# (currently inline::localfs). Do not add inline::localfs to
# STRIPPED_PROVIDER_TYPES in gen_config.py without also removing
# inline::file-search here.
- provider_id: brave-search
provider_type: remote::brave-search
config:
api_key: ${env.BRAVE_SEARCH_API_KEY:=}
max_results: 3
- provider_id: tavily-search
provider_type: remote::tavily-search
config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3
- provider_id: file-search
provider_type: inline::file-search
config: {}
- provider_id: model-context-protocol
provider_type: remote::model-context-protocol
config: {}
files:
# Required at runtime by inline::file-search (see tool_runtime above).
- provider_id: meta-reference-files
provider_type: inline::localfs
config:
storage_dir: /opt/app-root/src/.ogx/distributions/rh/files
metadata_store:
backend: sql_default
table_name: files_metadata
- provider_id: ${env.ENABLE_S3:+s3}
provider_type: remote::s3
config:
bucket_name: ${env.S3_BUCKET_NAME:=}
region: ${env.AWS_DEFAULT_REGION:=us-east-1}
aws_access_key_id: ${env.AWS_ACCESS_KEY_ID:=}
aws_secret_access_key: ${env.AWS_SECRET_ACCESS_KEY:=}
endpoint_url: ${env.S3_ENDPOINT_URL:=}
auto_create_bucket: ${env.S3_AUTO_CREATE_BUCKET:=false}
metadata_store:
backend: sql_default
table_name: files_metadata
file_processors:
- provider_id: auto
provider_type: inline::auto
config: {}
batches:
- provider_id: reference
provider_type: inline::reference
config:
sqlstore:
table_name: batches
backend: sql_default
storage:
backends:
kv_default:
type: kv_postgres
host: ${env.POSTGRES_HOST:=localhost}
port: ${env.POSTGRES_PORT:=5432}
db: ${env.POSTGRES_DB:=}
user: ${env.POSTGRES_USER:=}
password: ${env.POSTGRES_PASSWORD:=}
table_name: ${env.POSTGRES_TABLE_NAME:=ogx_kvstore}
sql_default:
type: sql_postgres
host: ${env.POSTGRES_HOST:=localhost}
port: ${env.POSTGRES_PORT:=5432}
db: ${env.POSTGRES_DB:=}
user: ${env.POSTGRES_USER:=}
password: ${env.POSTGRES_PASSWORD:=}
stores:
metadata:
backend: kv_default
namespace: registry
inference:
table_name: inference_store
backend: sql_default
max_write_queue_size: 10000
num_writers: 4
conversations:
table_name: openai_conversations
backend: sql_default
prompts:
namespace: prompts
backend: kv_default
connectors:
table_name: connectors
backend: sql_default
vector_stores:
backend: sql_default
table_name: vector_store_metadata
registered_resources:
models:
- metadata:
embedding_dimension: ${env.EMBEDDING_DIMENSION:=768}
model_id: ${env.EMBEDDING_MODEL:=}
provider_id: ${env.EMBEDDING_PROVIDER:=vllm-embedding}
provider_model_id: ${env.EMBEDDING_PROVIDER_MODEL_ID:=ibm-granite/granite-embedding-125m-english}
model_type: embedding
vector_dbs: []
tool_groups:
- toolgroup_id: builtin::websearch
provider_id: tavily-search
- toolgroup_id: builtin::rag
provider_id: file-search
vector_stores:
annotation_prompt_params:
enable_annotations: true
annotation_instruction_template: "Cite sources immediately at the end of sentences using <|file-id|> format."
telemetry:
enabled: true
server:
port: 8321
registry_refresh_interval_seconds: ${env.REGISTRY_REFRESH_INTERVAL_SECONDS:=300}
auth:
provider_config:
type: ${env.AUTH_ISSUER:+oauth2_token}
audience: ${env.AUTH_AUDIENCE:=ogx}
issuer: ${env.AUTH_ISSUER:=}
jwks:
uri: ${env.AUTH_JWKS_URI:=}
key_recheck_period: ${env.AUTH_JWKS_RECHECK_PERIOD:=3600}
verify_tls: ${env.AUTH_VERIFY_TLS:=true}
tls_cafile: ${env.AUTH_TLS_CAFILE:=}
access_policy:
- permit:
actions: [read]
when: resource is unowned
description: "All users can read system resources"
- permit:
actions: [create]
description: "Authenticated users can create resources"
- permit:
actions: [read, update, delete]
when: user is owner
description: "Owners can manage their own resources"