-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathconstants.ts
More file actions
29 lines (28 loc) · 984 Bytes
/
constants.ts
File metadata and controls
29 lines (28 loc) · 984 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
export const OPENAI_INTEGRATION_NAME = 'OpenAI';
// https://platform.openai.com/docs/quickstart?api-mode=responses
// https://platform.openai.com/docs/quickstart?api-mode=chat
// https://platform.openai.com/docs/api-reference/conversations
export const INSTRUMENTED_METHODS = [
'responses.create',
'chat.completions.create',
'embeddings.create',
// Conversations API - for conversation state management
// https://platform.openai.com/docs/guides/conversation-state
'conversations.create',
] as const;
export const RESPONSES_TOOL_CALL_EVENT_TYPES = [
'response.output_item.added',
'response.function_call_arguments.delta',
'response.function_call_arguments.done',
'response.output_item.done',
] as const;
export const RESPONSE_EVENT_TYPES = [
'response.created',
'response.in_progress',
'response.failed',
'response.completed',
'response.incomplete',
'response.queued',
'response.output_text.delta',
...RESPONSES_TOOL_CALL_EVENT_TYPES,
] as const;