-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathconfig.d.ts
More file actions
142 lines (141 loc) · 4.28 KB
/
Copy pathconfig.d.ts
File metadata and controls
142 lines (141 loc) · 4.28 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
/*
* Copyright Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface Config {
/**
* Configuration required for using intelligent-assistant
* @visibility frontend
*/
'intelligent-assistant'?: {
/**
* configure the port number for the lightspeed service.
* @visibility backend
*/
servicePort?: number;
/**
* customize system prompt for the lightspeed service.
* @visibility backend
*/
systemPrompt?: string;
/**
* configure the MCP server for the lightspeed service.
* @visibility backend
*/
mcpServers?: Array<{
/**
* The name of the MCP server. Must match the name registered in LCS config.
* The URL is fetched from LCS (GET /v1/mcp-servers) at startup.
* @visibility backend
*/
name: string;
/**
* The default access token for authenticating with this MCP server.
* Optional — if omitted, users must provide their own token via the UI.
* Users can also override this with a personal token via PATCH /mcp-servers/:name.
* @visibility secret
*/
token?: string;
/**
* Authentication mode for this MCP server.
* Set to 'dcr' for Dynamic Client Registration (user-bound tokens minted per-request).
* When omitted, falls back to static-token mode.
* @visibility frontend
*/
auth?: 'dcr';
}>;
/**
* Per-user rate limiting for Lightspeed API endpoints.
* @visibility backend
*/
rateLimit?: {
/**
* Limits for expensive endpoints (LLM queries, document uploads).
* @visibility backend
*/
expensive?: {
/**
* Maximum requests per minute per user.
* Set to 0 to disable rate limiting for this tier.
* @default 25
* @visibility backend
*/
max?: number;
};
/**
* Limits for all other authenticated endpoints.
* @visibility backend
*/
general?: {
/**
* Maximum requests per minute per user.
* Set to 0 to disable rate limiting for this tier.
* @default 200
* @visibility backend
*/
max?: number;
};
};
/**
* Configuration for AI Notebooks (Developer Preview)
*/
notebooks?: {
/**
* Enable/disable AI Notebooks feature
* When enabled, exposes AI Notebooks REST API endpoints for document-based conversations with RAG.
* Requires Lightspeed service to be running (host and port default to 127.0.0.1 and 8080).
* @default false
* @visibility frontend
*/
enabled: boolean;
/**
* Lightspeed configuration
* @visibility backend
*/
queryDefaults: {
/**
* Model to use for answering queries. Must map to a model available through the provider set in provider_id.
* @visibility backend
*/
model: string;
/**
* AI provider for the query model. Must map to a provider enabled in your Lightspeed config.
* @visibility backend
*/
provider_id: string;
};
/**
* Chunking strategy for document processing
* @visibility backend
*/
chunkingStrategy?: {
/**
* Document chunking strategy - 'auto' (automatic, default) or 'static' (fixed size)
* @visibility backend
*/
type?: 'auto' | 'static';
/**
* Maximum chunk size in tokens for static chunking (default: 512)
* @visibility backend
*/
maxChunkSizeTokens?: number;
/**
* Token overlap between chunks for static chunking (default: 50)
* @visibility backend
*/
chunkOverlapTokens?: number;
};
};
};
}