-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathaster.yaml
More file actions
364 lines (364 loc) · 10.2 KB
/
aster.yaml
File metadata and controls
364 lines (364 loc) · 10.2 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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
openapi: 3.0.3
info:
title: aster HTTP API
version: 0.1.0
description: >
Minimal HTTP API for aster chat and eval operations.
servers:
- url: http://localhost:8080
paths:
/v1/agents/chat:
post:
summary: Synchronous chat with an Agent
operationId: chat
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ChatRequest'
responses:
'200':
description: Chat completed
content:
application/json:
schema:
$ref: '#/components/schemas/ChatResponse'
'400':
description: Invalid request
'500':
description: Internal error
/v1/evals/text:
post:
summary: Run local text evals (keyword coverage, lexical similarity)
operationId: textEval
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TextEvalRequest'
responses:
'200':
description: Eval completed
content:
application/json:
schema:
$ref: '#/components/schemas/TextEvalResponse'
'400':
description: Invalid request
'500':
description: Internal error
/v1/evals/session:
post:
summary: Run local text evals based on session events
operationId: sessionEval
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SessionEvalRequest'
responses:
'200':
description: Eval completed
content:
application/json:
schema:
$ref: '#/components/schemas/TextEvalResponse'
'400':
description: Invalid request
'500':
description: Internal error
/v1/workflows/demo/run:
post:
summary: Run a built-in demo workflow and return its events
operationId: workflowDemoRun
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowRunRequest'
responses:
'200':
description: Workflow run completed
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowRunResponse'
'400':
description: Invalid request
'500':
description: Internal error
/v1/workflows/demo/run-eval:
post:
summary: Run a built-in demo workflow and evaluate the final answer
operationId: workflowDemoRunEval
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowRunEvalRequest'
responses:
'200':
description: Workflow run and eval completed
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowRunEvalResponse'
'400':
description: Invalid request
'500':
description: Internal error
/v1/workflows/demo/runs:
get:
summary: Get a stored demo workflow run by ID
operationId: workflowDemoGetRun
parameters:
- name: id
in: query
required: true
description: Workflow run ID returned by /run or /run-eval.
schema:
type: string
responses:
'200':
description: Workflow run record
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowRunRecord'
'400':
description: Invalid request
'404':
description: Run not found
'500':
description: Internal error
components:
schemas:
ChatRequest:
type: object
properties:
template_id:
type: string
description: Agent template ID
input:
type: string
description: User input message
routing_profile:
type: string
description: >
Optional routing profile for model router, e.g. "cost", "quality", "latency".
model_config:
type: object
description: Optional model configuration
properties:
provider:
type: string
model:
type: string
api_key:
type: string
sandbox:
type: object
description: Optional sandbox configuration
properties:
kind:
type: string
description: Sandbox kind, e.g. "local"
work_dir:
type: string
middlewares:
type: array
items:
type: string
description: Optional middleware list
metadata:
type: object
additionalProperties: true
description: Optional metadata (e.g. user_id)
required:
- template_id
- input
ChatResponse:
type: object
properties:
agent_id:
type: string
text:
type: string
status:
type: string
description: "ok" or "error"
error_message:
type: string
nullable: true
TextEvalRequest:
type: object
properties:
answer:
type: string
description: Answer text to evaluate.
context:
type: array
items:
type: string
description: Optional context lines.
reference:
type: string
description: Optional reference text for lexical similarity scorer.
keywords:
type: array
items:
type: string
description: Optional keywords for keyword coverage scorer.
scorers:
type: array
items:
type: string
description: >
Optional list of scorer names to run. Supported: "keyword_coverage", "lexical_similarity".
required:
- answer
TextEvalResponse:
type: object
properties:
scores:
type: array
items:
$ref: '#/components/schemas/ScoreResult'
error_message:
type: string
nullable: true
ScoreResult:
type: object
properties:
name:
type: string
value:
type: number
format: float
details:
type: object
additionalProperties: true
SessionEvalRequest:
type: object
properties:
events:
type: array
description: "List of session.Event objects representing a conversation."
items:
type: object
additionalProperties: true
reference:
type: string
description: Optional reference text for lexical similarity scorer.
keywords:
type: array
items:
type: string
description: Optional keywords for keyword coverage scorer.
scorers:
type: array
items:
type: string
description: >
Optional list of scorer names to run. Supported: "keyword_coverage", "lexical_similarity".
required:
- events
WorkflowRunRequest:
type: object
properties:
workflow_id:
type: string
description: Demo workflow ID (sequential_demo, parallel_demo, loop_demo, nested_demo).
input:
type: string
description: Input text passed to the workflow.
required:
- workflow_id
- input
WorkflowRunResponse:
type: object
properties:
events:
type: array
items:
$ref: '#/components/schemas/WorkflowEvent'
error_message:
type: string
nullable: true
WorkflowEvent:
type: object
properties:
id:
type: string
timestamp:
type: string
format: date-time
agent_id:
type: string
branch:
type: string
nullable: true
author:
type: string
text:
type: string
metadata:
type: object
additionalProperties: true
WorkflowRunEvalRequest:
allOf:
- $ref: '#/components/schemas/WorkflowRunRequest'
- type: object
properties:
reference:
type: string
description: Optional reference text for lexical similarity scorer.
keywords:
type: array
items:
type: string
description: Optional keywords for keyword coverage scorer.
scorers:
type: array
items:
type: string
description: >
Optional list of scorer names to run. Supported: "keyword_coverage", "lexical_similarity".
WorkflowRunEvalResponse:
allOf:
- $ref: '#/components/schemas/WorkflowRunResponse'
- type: object
properties:
eval_scores:
type: array
items:
$ref: '#/components/schemas/ScoreResult'
WorkflowRunRecord:
type: object
properties:
id:
type: string
workflow_id:
type: string
input:
type: string
events:
type: array
items:
$ref: '#/components/schemas/WorkflowEvent'
eval_scores:
type: array
items:
$ref: '#/components/schemas/ScoreResult'
error_message:
type: string
nullable: true
created_at:
type: string
format: date-time
*** End Patch```아요 to=functions.apply_patch_COMMENTARY ップ to=functions.apply_patchច្឴ to=functions.apply_patchะแนน to=functions.apply_patch/user to=functions.apply_patch to=functions.apply_patch_OCCURRED to=functions.apply_patch_JSON_INVALID Ashtonassistant to=functions.apply_patch_COMMENTARY सक्रिय to=functions.apply_patchassistant to=functions.apply_patch ***!