-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
43 lines (36 loc) · 830 Bytes
/
types.ts
File metadata and controls
43 lines (36 loc) · 830 Bytes
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
import OpenAI from 'openai';
export type AIMessage =
| OpenAI.Chat.Completions.ChatCompletionAssistantMessageParam
| { role: 'user'; content: string }
| { role: 'tool'; content: string; tool_call_id: string }
export interface ToolFn<A = any, T = any> {
(input: { userMessage: string; toolArgs: A }): Promise<T>
}
export interface Score {
name: string
score: number
}
export interface Run {
input: string
output: {
role: string
content: string | null
tool_calls?: any[]
refusal: null
}
expected: string
scores: Score[]
createdAt: string
}
export interface Set {
runs: Run[]
score: number
createdAt: string
}
export interface Experiment {
name: string
sets: Set[]
}
export interface Results {
experiments: Experiment[]
}