-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile.example
More file actions
73 lines (64 loc) · 1.46 KB
/
Caddyfile.example
File metadata and controls
73 lines (64 loc) · 1.46 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
# Caddy Agent Gateway
# Caddy App module ID: "agent_gateway"
# HTTP handler module IDs:
# - "http.handlers.agent_route_dispatcher" (Caddyfile directive: "agent_route_dispatcher")
# Dispatcher LLM API module IDs:
# - "agent_route_dispatcher.llm_apis.openai"
# - "agent_route_dispatcher.llm_apis.anthropic"
# - "http.handlers.agent_gateway_admin" (Caddyfile directive: "agent_gateway_admin")
{
admin localhost:2019
agent_gateway {
config_store sqlite {
path ./data/configstore.db
}
provider zhipu-main {
provider_name zhipuac
api_key {$ZHIPU_API_KEY}
base_url https://open.bigmodel.cn/api/anthropic
default_model glm-4.7
option debug_request true
}
localapikey test-key {
user_id local-test
name "Local Python test key"
allowed_route zhipu-anthropic-chat
}
route zhipu-anthropic-chat {
llm_api anthropic
path_prefix /
require_local_api_key
allowed_model glm-4.7
target provider zhipu-main
}
}
}
http://127.0.0.1:8081 {
# Admin routes
route /admin/* {
agent_gateway_admin {
admin_user default
admin_password_hash $2a$14$Qxwz94t//fcaF.lyVzsIee0ZZuSNgS841WmLUo/NKGN5LlQzNg5Me # dummy
}
}
}
http://127.0.0.1:8082 {
log {
output stderr
format console
}
# LLM API routes
agent_route_dispatcher {
llm_api openai
llm_api anthropic
}
}
http://127.0.0.1:8070 {
# Block Syntax
route /news/graphql {
pgrest_graphql {
db_url "postgres://user:passwd@localhost:5432/graphqldb"
table_name "news"
}
}
}