@respan/respan-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +1 -0
- package/dist/constants/datasetConstants.d.ts +16 -0
- package/dist/constants/datasetConstants.js +17 -0
- package/dist/constants/datasetConstants.js.map +1 -0
- package/dist/constants/evluatorConstants.d.ts +0 -0
- package/dist/constants/evluatorConstants.js +2 -0
- package/dist/constants/evluatorConstants.js.map +1 -0
- package/dist/constants/experimentConstants.d.ts +0 -0
- package/dist/constants/experimentConstants.js +2 -0
- package/dist/constants/experimentConstants.js.map +1 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.js +4 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/log.d.ts +17 -0
- package/dist/constants/log.js +21 -0
- package/dist/constants/log.js.map +1 -0
- package/dist/constants/logConstants.d.ts +17 -0
- package/dist/constants/logConstants.js +21 -0
- package/dist/constants/logConstants.js.map +1 -0
- package/dist/constants/promptConstants.d.ts +10 -0
- package/dist/constants/promptConstants.js +8 -0
- package/dist/constants/promptConstants.js.map +1 -0
- package/dist/exporters/index.d.ts +1 -0
- package/dist/exporters/index.js +2 -0
- package/dist/exporters/index.js.map +1 -0
- package/dist/exporters/vercelExporter.d.ts +42 -0
- package/dist/exporters/vercelExporter.js +548 -0
- package/dist/exporters/vercelExporter.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/types/baseTypes.d.ts +10 -0
- package/dist/types/baseTypes.js +2 -0
- package/dist/types/baseTypes.js.map +1 -0
- package/dist/types/clientTypes.d.ts +65 -0
- package/dist/types/clientTypes.js +22 -0
- package/dist/types/clientTypes.js.map +1 -0
- package/dist/types/datasetTypes.d.ts +65 -0
- package/dist/types/datasetTypes.js +2 -0
- package/dist/types/datasetTypes.js.map +1 -0
- package/dist/types/decoratorTypes.d.ts +3 -0
- package/dist/types/decoratorTypes.js +4 -0
- package/dist/types/decoratorTypes.js.map +1 -0
- package/dist/types/evaluatorTypes.d.ts +10 -0
- package/dist/types/evaluatorTypes.js +2 -0
- package/dist/types/evaluatorTypes.js.map +1 -0
- package/dist/types/experimentTypes.d.ts +158 -0
- package/dist/types/experimentTypes.js +10 -0
- package/dist/types/experimentTypes.js.map +1 -0
- package/dist/types/genericTypes.d.ts +18 -0
- package/dist/types/genericTypes.js +2 -0
- package/dist/types/genericTypes.js.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.js +12 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/logTypes.d.ts +2792 -0
- package/dist/types/logTypes.js +503 -0
- package/dist/types/logTypes.js.map +1 -0
- package/dist/types/promptTypes.d.ts +59 -0
- package/dist/types/promptTypes.js +2 -0
- package/dist/types/promptTypes.js.map +1 -0
- package/dist/types/spanTypes.d.ts +14 -0
- package/dist/types/spanTypes.js +28 -0
- package/dist/types/spanTypes.js.map +1 -0
- package/dist/types/tracingTypes.d.ts +59 -0
- package/dist/types/tracingTypes.js +2 -0
- package/dist/types/tracingTypes.js.map +1 -0
- package/package.json +35 -0
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Log type definition
|
|
3
|
+
export const LOG_TYPE_VALUES = [
|
|
4
|
+
"text",
|
|
5
|
+
"chat",
|
|
6
|
+
"completion",
|
|
7
|
+
"response",
|
|
8
|
+
"embedding",
|
|
9
|
+
"transcription",
|
|
10
|
+
"speech",
|
|
11
|
+
"workflow",
|
|
12
|
+
"task",
|
|
13
|
+
"tool",
|
|
14
|
+
"agent",
|
|
15
|
+
"handoff",
|
|
16
|
+
"guardrail",
|
|
17
|
+
"function",
|
|
18
|
+
"custom",
|
|
19
|
+
"generation",
|
|
20
|
+
"unknown",
|
|
21
|
+
];
|
|
22
|
+
export const LOG_METHOD_VALUES = [
|
|
23
|
+
"inference",
|
|
24
|
+
"logging_api",
|
|
25
|
+
"batch",
|
|
26
|
+
"python_tracing",
|
|
27
|
+
"ts_tracing",
|
|
28
|
+
];
|
|
29
|
+
// Basic utility schemas
|
|
30
|
+
const StringOrNumberSchema = z.union([z.string(), z.number()]);
|
|
31
|
+
const DateTimeSchema = z.union([z.string(), z.date()]);
|
|
32
|
+
// Message content schemas
|
|
33
|
+
const ImageURLSchema = z.object({
|
|
34
|
+
url: z.string(),
|
|
35
|
+
detail: z.string().optional(),
|
|
36
|
+
});
|
|
37
|
+
const CacheControlSchema = z.object({
|
|
38
|
+
type: z.string(),
|
|
39
|
+
});
|
|
40
|
+
const BaseContentSchema = z.object({
|
|
41
|
+
type: z.string(),
|
|
42
|
+
});
|
|
43
|
+
const TextContentSchema = BaseContentSchema.extend({
|
|
44
|
+
text: z.string(),
|
|
45
|
+
cache_control: CacheControlSchema.optional(),
|
|
46
|
+
});
|
|
47
|
+
const ImageContentSchema = BaseContentSchema.extend({
|
|
48
|
+
image_url: z.union([ImageURLSchema, z.string()]),
|
|
49
|
+
});
|
|
50
|
+
const InputImageSchema = BaseContentSchema.extend({
|
|
51
|
+
file: z.string(),
|
|
52
|
+
providerData: z.record(z.string(), z.any()).optional(),
|
|
53
|
+
});
|
|
54
|
+
const FileContentSchema = BaseContentSchema.extend({
|
|
55
|
+
file: z.string(),
|
|
56
|
+
providerData: z.record(z.string(), z.any()).optional(),
|
|
57
|
+
});
|
|
58
|
+
const ToolUseContentSchema = BaseContentSchema.extend({
|
|
59
|
+
id: z.string().optional(),
|
|
60
|
+
name: z.string().optional(),
|
|
61
|
+
input: z.record(z.string(), z.any()).optional(),
|
|
62
|
+
});
|
|
63
|
+
const ToolResultContentSchema = BaseContentSchema.extend({
|
|
64
|
+
tool_use_id: z.any(),
|
|
65
|
+
content: z.string(),
|
|
66
|
+
}).transform((data) => {
|
|
67
|
+
if ("tool_use_id" in data)
|
|
68
|
+
return data;
|
|
69
|
+
return {
|
|
70
|
+
type: data.type,
|
|
71
|
+
tool_use_id: data.toolCallId,
|
|
72
|
+
content: data.result || data.content,
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
const OutputTextContentSchema = BaseContentSchema.extend({
|
|
76
|
+
text: z.string(),
|
|
77
|
+
annotations: z.array(z.union([z.record(z.string(), z.any()), z.string()])).optional(),
|
|
78
|
+
cache_control: CacheControlSchema.optional(),
|
|
79
|
+
});
|
|
80
|
+
// Combined message content schema with transform to handle string content
|
|
81
|
+
const MessageContentSchema = z
|
|
82
|
+
.union([
|
|
83
|
+
z.string(),
|
|
84
|
+
z.array(z.union([
|
|
85
|
+
TextContentSchema,
|
|
86
|
+
ImageContentSchema,
|
|
87
|
+
FileContentSchema,
|
|
88
|
+
ToolUseContentSchema,
|
|
89
|
+
ToolResultContentSchema,
|
|
90
|
+
OutputTextContentSchema,
|
|
91
|
+
InputImageSchema,
|
|
92
|
+
z.object({
|
|
93
|
+
type: z.string(),
|
|
94
|
+
text: z.string(),
|
|
95
|
+
}),
|
|
96
|
+
// Catch-all for other content types
|
|
97
|
+
z.record(z.string(), z.any()),
|
|
98
|
+
])),
|
|
99
|
+
])
|
|
100
|
+
.transform((content) => {
|
|
101
|
+
if (Array.isArray(content)) {
|
|
102
|
+
// Try to extract text from array of objects with text field
|
|
103
|
+
const textParts = content
|
|
104
|
+
.map((item) => {
|
|
105
|
+
if (typeof item === "object") {
|
|
106
|
+
// Handle both camelCase and snake_case keys
|
|
107
|
+
if ("text" in item)
|
|
108
|
+
return item.text;
|
|
109
|
+
if ("content" in item && typeof item.content === "string")
|
|
110
|
+
return item.content;
|
|
111
|
+
if ("result" in item && typeof item.result === "string")
|
|
112
|
+
return item.result;
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
})
|
|
116
|
+
.filter((text) => text !== null);
|
|
117
|
+
if (textParts.length > 0) {
|
|
118
|
+
return textParts.join("\n");
|
|
119
|
+
}
|
|
120
|
+
// Just return the original array if transformation isn't possible
|
|
121
|
+
return content;
|
|
122
|
+
}
|
|
123
|
+
return content;
|
|
124
|
+
});
|
|
125
|
+
// Tool related schemas
|
|
126
|
+
const ToolCallFunctionSchema = z
|
|
127
|
+
.object({
|
|
128
|
+
name: z.string().optional(),
|
|
129
|
+
arguments: z.union([z.string(), z.record(z.string(), z.any())]).optional(),
|
|
130
|
+
})
|
|
131
|
+
.catchall(z.any()); // Allow additional properties
|
|
132
|
+
const ToolCallSchema = z
|
|
133
|
+
.object({
|
|
134
|
+
type: z.string().default("function"), // Only require type, default to "function"
|
|
135
|
+
id: z.string().optional(),
|
|
136
|
+
function: ToolCallFunctionSchema.optional(),
|
|
137
|
+
})
|
|
138
|
+
.catchall(z.any()) // Allow any additional properties
|
|
139
|
+
.transform((data) => {
|
|
140
|
+
// Create a shallow copy to avoid modifying the original
|
|
141
|
+
const result = { ...data };
|
|
142
|
+
// Handle ID mapping for consistency (only if needed)
|
|
143
|
+
if (!result.id &&
|
|
144
|
+
(data.toolCallId || data.tool_call_id)) {
|
|
145
|
+
result.id = data.toolCallId || data.tool_call_id;
|
|
146
|
+
}
|
|
147
|
+
// If we have args/toolName but no function object, create basic structure
|
|
148
|
+
if ((data.toolName || data.name || data.args) &&
|
|
149
|
+
!result.function) {
|
|
150
|
+
result.function = {};
|
|
151
|
+
if (data.toolName || data.name) {
|
|
152
|
+
result.function.name = data.toolName || data.name;
|
|
153
|
+
}
|
|
154
|
+
if (data.args) {
|
|
155
|
+
result.function.arguments =
|
|
156
|
+
typeof data.args === "string"
|
|
157
|
+
? data.args
|
|
158
|
+
: JSON.stringify(data.args);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return result;
|
|
162
|
+
});
|
|
163
|
+
const ToolChoiceSchema = z
|
|
164
|
+
.object({
|
|
165
|
+
type: z.string(),
|
|
166
|
+
function: z
|
|
167
|
+
.object({
|
|
168
|
+
name: z.string(),
|
|
169
|
+
})
|
|
170
|
+
.optional(),
|
|
171
|
+
})
|
|
172
|
+
.optional();
|
|
173
|
+
// Function tool schema for BasicLLMParams
|
|
174
|
+
// Accept both OpenAI-style nested `{ type: "function", function: { ... } }`
|
|
175
|
+
// and flattened `{ type: "function", name, description, parameters }` shapes.
|
|
176
|
+
const FunctionToolSchema = z
|
|
177
|
+
.union([
|
|
178
|
+
z.object({
|
|
179
|
+
type: z.literal("function"),
|
|
180
|
+
function: z.object({
|
|
181
|
+
name: z.string(),
|
|
182
|
+
description: z.string().optional(),
|
|
183
|
+
parameters: z.record(z.string(), z.any()).optional(),
|
|
184
|
+
}),
|
|
185
|
+
}),
|
|
186
|
+
z.object({
|
|
187
|
+
type: z.literal("function"),
|
|
188
|
+
name: z.string(),
|
|
189
|
+
description: z.string().optional(),
|
|
190
|
+
parameters: z.record(z.string(), z.any()).optional(),
|
|
191
|
+
}),
|
|
192
|
+
])
|
|
193
|
+
.transform((data) => {
|
|
194
|
+
if ("function" in data && data.function) {
|
|
195
|
+
return data;
|
|
196
|
+
}
|
|
197
|
+
// Normalize flat shape into nested function object
|
|
198
|
+
const { name, description, parameters, ...rest } = data;
|
|
199
|
+
return {
|
|
200
|
+
...rest,
|
|
201
|
+
function: {
|
|
202
|
+
name,
|
|
203
|
+
...(description ? { description } : {}),
|
|
204
|
+
...(parameters ? { parameters } : {}),
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
});
|
|
208
|
+
// Base message schema with flexible role
|
|
209
|
+
const MessageSchema = z
|
|
210
|
+
.object({
|
|
211
|
+
role: z.string(),
|
|
212
|
+
content: MessageContentSchema.optional(),
|
|
213
|
+
name: z.string().optional(),
|
|
214
|
+
tool_call_id: z.any().optional(),
|
|
215
|
+
tool_calls: z.array(z.record(z.string(), z.any())).optional(),
|
|
216
|
+
experimental_providerMetadata: z
|
|
217
|
+
.object({
|
|
218
|
+
anthropic: z.object({
|
|
219
|
+
cacheControl: z.object({
|
|
220
|
+
type: z.string(),
|
|
221
|
+
}),
|
|
222
|
+
}),
|
|
223
|
+
})
|
|
224
|
+
.optional(),
|
|
225
|
+
})
|
|
226
|
+
.transform((data) => {
|
|
227
|
+
// Handle camelCase to snake_case conversion
|
|
228
|
+
if ("toolCallId" in data) {
|
|
229
|
+
return {
|
|
230
|
+
...data,
|
|
231
|
+
tool_call_id: data.toolCallId,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
return data;
|
|
235
|
+
});
|
|
236
|
+
// Metadata schema
|
|
237
|
+
const MetadataSchema = z.record(z.string(), z.any()).optional();
|
|
238
|
+
// Usage schema
|
|
239
|
+
const UsageSchema = z.object({
|
|
240
|
+
prompt_tokens: z.number().optional(),
|
|
241
|
+
completion_tokens: z.number().optional(),
|
|
242
|
+
total_tokens: z.number().optional(),
|
|
243
|
+
cache_creation_input_tokens: z.number().optional(),
|
|
244
|
+
cache_creation_prompt_tokens: z.number().optional(),
|
|
245
|
+
cache_read_input_tokens: z.number().optional(),
|
|
246
|
+
completion_tokens_details: z.record(z.string(), z.any()).optional(),
|
|
247
|
+
prompt_tokens_details: z.record(z.string(), z.any()).optional(),
|
|
248
|
+
});
|
|
249
|
+
// Supporting schemas for Respan params
|
|
250
|
+
const OverrideConfigSchema = z.object({
|
|
251
|
+
messages_override_mode: z
|
|
252
|
+
.enum(["override", "append"])
|
|
253
|
+
.optional()
|
|
254
|
+
.default("override"),
|
|
255
|
+
});
|
|
256
|
+
const EvaluatorToRunSchema = z.record(z.string(), z.any()); // Placeholder for evaluator schema
|
|
257
|
+
const EvalInputsSchema = z.record(z.string(), z.any()); // Placeholder for eval inputs schema
|
|
258
|
+
const EvaluationParamsSchema = z.object({
|
|
259
|
+
evaluators: z.array(EvaluatorToRunSchema).optional().default([]),
|
|
260
|
+
evaluation_identifier: StringOrNumberSchema.default(""),
|
|
261
|
+
last_n_messages: z.number().optional().default(1),
|
|
262
|
+
eval_inputs: EvalInputsSchema.optional().default({}),
|
|
263
|
+
sample_percentage: z.number().optional(),
|
|
264
|
+
});
|
|
265
|
+
const LoadBalanceModelSchema = z.object({
|
|
266
|
+
model: z.string(),
|
|
267
|
+
credentials: z.record(z.string(), z.any()).optional(),
|
|
268
|
+
weight: z
|
|
269
|
+
.number()
|
|
270
|
+
.refine((val) => val > 0, "Weight has to be greater than 0"),
|
|
271
|
+
});
|
|
272
|
+
const LoadBalanceGroupSchema = z.object({
|
|
273
|
+
group_id: z.string(),
|
|
274
|
+
models: z.array(LoadBalanceModelSchema).optional(),
|
|
275
|
+
});
|
|
276
|
+
const PostHogIntegrationSchema = z.object({
|
|
277
|
+
posthog_api_key: z.string(),
|
|
278
|
+
posthog_base_url: z.string(),
|
|
279
|
+
});
|
|
280
|
+
const CustomerSchema = z.object({
|
|
281
|
+
customer_identifier: StringOrNumberSchema.optional(),
|
|
282
|
+
name: z.string().optional(),
|
|
283
|
+
email: z.string().optional(),
|
|
284
|
+
period_start: DateTimeSchema.optional(),
|
|
285
|
+
period_end: DateTimeSchema.optional(),
|
|
286
|
+
budget_duration: z.enum(["daily", "weekly", "monthly", "yearly"]).optional(),
|
|
287
|
+
period_budget: z.number().optional(),
|
|
288
|
+
markup_percentage: z.number().optional(),
|
|
289
|
+
total_budget: z.number().optional(),
|
|
290
|
+
metadata: z.record(z.string(), z.any()).optional(),
|
|
291
|
+
rate_limit: z.number().optional(),
|
|
292
|
+
});
|
|
293
|
+
const CacheOptionsSchema = z.object({
|
|
294
|
+
cache_by_customer: z.boolean().optional(),
|
|
295
|
+
omit_log: z.boolean().optional(),
|
|
296
|
+
});
|
|
297
|
+
const RetryParamsSchema = z.object({
|
|
298
|
+
num_retries: z
|
|
299
|
+
.number()
|
|
300
|
+
.optional()
|
|
301
|
+
.default(3)
|
|
302
|
+
.refine((val) => val > 0, "num_retries has to be greater than 0"),
|
|
303
|
+
retry_after: z
|
|
304
|
+
.number()
|
|
305
|
+
.optional()
|
|
306
|
+
.default(0.2)
|
|
307
|
+
.refine((val) => val > 0, "retry_after has to be greater than 0"),
|
|
308
|
+
retry_enabled: z.boolean().optional().default(true),
|
|
309
|
+
});
|
|
310
|
+
const RespanAPIControlParamsSchema = z.object({
|
|
311
|
+
block: z.boolean().optional(),
|
|
312
|
+
});
|
|
313
|
+
const PromptParamSchema = z.object({
|
|
314
|
+
prompt_id: z.string().optional(),
|
|
315
|
+
is_custom_prompt: z.boolean().optional().default(false),
|
|
316
|
+
version: z.number().optional(),
|
|
317
|
+
variables: z.record(z.string(), z.any()).optional(),
|
|
318
|
+
echo: z.boolean().optional().default(true),
|
|
319
|
+
override: z.boolean().optional().default(false),
|
|
320
|
+
override_params: z.record(z.string(), z.any()).optional(), // BasicLLMParams placeholder
|
|
321
|
+
override_config: OverrideConfigSchema.optional(),
|
|
322
|
+
});
|
|
323
|
+
const LinkupParamsSchema = z.record(z.string(), z.any()); // Placeholder
|
|
324
|
+
const Mem0ParamsSchema = z.record(z.string(), z.any()); // Placeholder
|
|
325
|
+
const ProviderCredentialTypeSchema = z.record(z.string(), z.any()); // Placeholder
|
|
326
|
+
// Basic LLM Parameters Schema
|
|
327
|
+
const BasicLLMParamsSchema = z.object({
|
|
328
|
+
echo: z.boolean().optional(),
|
|
329
|
+
frequency_penalty: z.number().optional(),
|
|
330
|
+
logprobs: z.boolean().optional(),
|
|
331
|
+
logit_bias: z.record(z.string(), z.number()).optional(),
|
|
332
|
+
messages: z.array(MessageSchema).optional(),
|
|
333
|
+
model: z.string().optional(),
|
|
334
|
+
max_tokens: z.number().optional(),
|
|
335
|
+
max_completion_tokens: z.number().optional(),
|
|
336
|
+
n: z.number().optional(),
|
|
337
|
+
parallel_tool_calls: z.boolean().optional(),
|
|
338
|
+
presence_penalty: z.number().optional(),
|
|
339
|
+
stop: z.union([z.array(z.string()), z.string()]).optional(),
|
|
340
|
+
stream: z.boolean().optional(),
|
|
341
|
+
stream_options: z.record(z.string(), z.any()).optional(),
|
|
342
|
+
temperature: z.number().optional(),
|
|
343
|
+
timeout: z.number().optional(),
|
|
344
|
+
tools: z.array(FunctionToolSchema).optional(),
|
|
345
|
+
response_format: z.record(z.string(), z.any()).optional(),
|
|
346
|
+
reasoning_effort: z.string().optional(),
|
|
347
|
+
tool_choice: z
|
|
348
|
+
.union([z.enum(["auto", "none", "required"]), ToolChoiceSchema])
|
|
349
|
+
.optional(),
|
|
350
|
+
top_logprobs: z.number().optional(),
|
|
351
|
+
top_p: z.number().optional(),
|
|
352
|
+
});
|
|
353
|
+
// Basic Embedding Parameters Schema (placeholder)
|
|
354
|
+
const BasicEmbeddingParamsSchema = z.object({
|
|
355
|
+
input: z.union([z.string(), z.array(z.string())]).optional(),
|
|
356
|
+
model: z.string().optional(),
|
|
357
|
+
encoding_format: z.string().optional(),
|
|
358
|
+
dimensions: z.number().optional(),
|
|
359
|
+
user: z.string().optional(),
|
|
360
|
+
});
|
|
361
|
+
// Respan Parameters Schema with regions
|
|
362
|
+
const RespanParamsSchema = z.object({
|
|
363
|
+
//#region time
|
|
364
|
+
start_time: DateTimeSchema.optional(),
|
|
365
|
+
timestamp: DateTimeSchema.optional(),
|
|
366
|
+
//#endregion time
|
|
367
|
+
//#region unique identifiers
|
|
368
|
+
custom_identifier: StringOrNumberSchema.optional(),
|
|
369
|
+
response_id: z.string().optional(),
|
|
370
|
+
//#endregion unique identifiers
|
|
371
|
+
//#region status
|
|
372
|
+
//#region error handling
|
|
373
|
+
error_message: z.string().optional(),
|
|
374
|
+
warnings: z.string().optional(),
|
|
375
|
+
//#endregion error handling
|
|
376
|
+
status_code: z.number().optional(),
|
|
377
|
+
//#endregion status
|
|
378
|
+
//#region log identifier/grouping
|
|
379
|
+
group_identifier: StringOrNumberSchema.optional(),
|
|
380
|
+
evaluation_identifier: StringOrNumberSchema.optional(),
|
|
381
|
+
//#endregion log identifier/grouping
|
|
382
|
+
//#region log input/output
|
|
383
|
+
input: z.string().optional(),
|
|
384
|
+
output: z.string().optional(),
|
|
385
|
+
prompt_messages: z.array(MessageSchema).optional(),
|
|
386
|
+
completion_message: MessageSchema.optional(),
|
|
387
|
+
completion_messages: z.array(MessageSchema).optional(),
|
|
388
|
+
completion_tokens: z.number().optional(),
|
|
389
|
+
full_request: z.union([z.record(z.string(), z.any()), z.array(z.any())]).optional(),
|
|
390
|
+
full_response: z.union([z.record(z.string(), z.any()), z.array(z.any())]).optional(),
|
|
391
|
+
//#region special response types
|
|
392
|
+
tool_calls: z.array(z.record(z.string(), z.any())).optional(),
|
|
393
|
+
reasoning: z.array(z.record(z.string(), z.any())).optional(),
|
|
394
|
+
//#endregion special response types
|
|
395
|
+
//#endregion log input/output
|
|
396
|
+
//#region cache params
|
|
397
|
+
cache_enabled: z.boolean().optional(),
|
|
398
|
+
cache_options: CacheOptionsSchema.optional(),
|
|
399
|
+
cache_ttl: z.number().optional(),
|
|
400
|
+
//#endregion cache params
|
|
401
|
+
//#region usage
|
|
402
|
+
//#region cost related
|
|
403
|
+
cost: z.number().optional(),
|
|
404
|
+
prompt_unit_price: z.number().optional(),
|
|
405
|
+
completion_unit_price: z.number().optional(),
|
|
406
|
+
//#endregion cost related
|
|
407
|
+
//#region token usage
|
|
408
|
+
prompt_tokens: z.number().optional(),
|
|
409
|
+
prompt_cache_hit_tokens: z.number().optional(),
|
|
410
|
+
prompt_cache_creation_tokens: z.number().optional(),
|
|
411
|
+
usage: UsageSchema.optional(),
|
|
412
|
+
//#endregion token usage
|
|
413
|
+
//#endregion usage
|
|
414
|
+
//#region user analytics
|
|
415
|
+
customer_email: z.string().optional(),
|
|
416
|
+
customer_name: z.string().optional(),
|
|
417
|
+
customer_identifier: StringOrNumberSchema.optional(),
|
|
418
|
+
customer_params: CustomerSchema.optional(),
|
|
419
|
+
//#endregion user analytics
|
|
420
|
+
//#region respan llm response control
|
|
421
|
+
field_name: z.string().optional().default("data: "),
|
|
422
|
+
delimiter: z.string().optional().default("\n\n"),
|
|
423
|
+
disable_log: z.boolean().optional().default(false),
|
|
424
|
+
request_breakdown: z.boolean().optional().default(false),
|
|
425
|
+
//#endregion respan llm response control
|
|
426
|
+
//#region respan logging control
|
|
427
|
+
respan_api_controls: RespanAPIControlParamsSchema.optional(),
|
|
428
|
+
log_method: z.enum(LOG_METHOD_VALUES).optional(),
|
|
429
|
+
log_type: z.enum(LOG_TYPE_VALUES).optional(),
|
|
430
|
+
//#endregion respan logging control
|
|
431
|
+
//#region respan proxy options
|
|
432
|
+
disable_fallback: z.boolean().optional().default(false),
|
|
433
|
+
exclude_models: z.array(z.string()).optional(),
|
|
434
|
+
exclude_providers: z.array(z.string()).optional(),
|
|
435
|
+
fallback_models: z.array(z.string()).optional(),
|
|
436
|
+
load_balance_group: LoadBalanceGroupSchema.optional(),
|
|
437
|
+
load_balance_models: z.array(LoadBalanceModelSchema).optional(),
|
|
438
|
+
retry_params: RetryParamsSchema.optional(),
|
|
439
|
+
respan_params: z.record(z.string(), z.any()).optional(),
|
|
440
|
+
//#region deprecated
|
|
441
|
+
model_name_map: z.record(z.string(), z.string()).optional(),
|
|
442
|
+
//#endregion deprecated
|
|
443
|
+
//#endregion respan proxy options
|
|
444
|
+
//#region embedding
|
|
445
|
+
embedding: z.array(z.number()).optional(),
|
|
446
|
+
//#endregion embedding
|
|
447
|
+
//#region model information
|
|
448
|
+
provider_id: z.string().optional(),
|
|
449
|
+
//#endregion model information
|
|
450
|
+
//#region audio
|
|
451
|
+
audio_input_file: z.string().optional(),
|
|
452
|
+
audio_output_file: z.string().optional(),
|
|
453
|
+
//#endregion audio
|
|
454
|
+
//#region evaluation
|
|
455
|
+
note: z.string().optional(),
|
|
456
|
+
category: z.string().optional(),
|
|
457
|
+
eval_params: EvaluationParamsSchema.optional(),
|
|
458
|
+
for_eval: z.boolean().optional(),
|
|
459
|
+
positive_feedback: z.boolean().optional(),
|
|
460
|
+
//#endregion evaluation
|
|
461
|
+
//#region technical integrations
|
|
462
|
+
linkup_params: LinkupParamsSchema.optional(),
|
|
463
|
+
mem0_params: Mem0ParamsSchema.optional(),
|
|
464
|
+
posthog_integration: PostHogIntegrationSchema.optional(),
|
|
465
|
+
//#endregion technical integrations
|
|
466
|
+
//#region custom properties
|
|
467
|
+
metadata: z.record(z.string(), z.any()).optional(),
|
|
468
|
+
//#endregion custom properties
|
|
469
|
+
//#region prompt
|
|
470
|
+
prompt: z.union([PromptParamSchema, z.string()]).optional(),
|
|
471
|
+
variables: z.record(z.string(), z.any()).optional(),
|
|
472
|
+
//#endregion prompt
|
|
473
|
+
//#region llm response timing metrics
|
|
474
|
+
generation_time: z.number().optional(),
|
|
475
|
+
latency: z.number().optional(),
|
|
476
|
+
ttft: z.number().optional(),
|
|
477
|
+
time_to_first_token: z.number().optional(),
|
|
478
|
+
routing_time: z.number().optional(),
|
|
479
|
+
tokens_per_second: z.number().optional(),
|
|
480
|
+
//#endregion llm response timing metrics
|
|
481
|
+
//#region tracing
|
|
482
|
+
trace_unique_id: z.string().optional(),
|
|
483
|
+
trace_name: z.string().optional(),
|
|
484
|
+
trace_group_identifier: z.string().optional(),
|
|
485
|
+
span_unique_id: z.string().optional(),
|
|
486
|
+
span_name: z.string().optional(),
|
|
487
|
+
span_parent_id: z.string().optional(),
|
|
488
|
+
span_path: z.string().optional(),
|
|
489
|
+
span_handoffs: z.array(z.string()).optional(),
|
|
490
|
+
span_tools: z.array(z.string()).optional(),
|
|
491
|
+
span_workflow_name: z.string().optional(),
|
|
492
|
+
//#region thread
|
|
493
|
+
thread_identifier: StringOrNumberSchema.optional(),
|
|
494
|
+
//#endregion thread
|
|
495
|
+
//#endregion tracing
|
|
496
|
+
});
|
|
497
|
+
// Combined KeywordsPayloadSchema that merges RespanParams, BasicLLMParams, and BasicEmbeddingParams
|
|
498
|
+
export const RespanPayloadSchema = RespanParamsSchema.merge(BasicLLMParamsSchema)
|
|
499
|
+
.merge(BasicEmbeddingParamsSchema)
|
|
500
|
+
.catchall(z.any());
|
|
501
|
+
// Export individual schemas for use elsewhere
|
|
502
|
+
export { RespanParamsSchema, BasicLLMParamsSchema, BasicEmbeddingParamsSchema, MessageSchema, ToolCallSchema, ToolChoiceSchema, FunctionToolSchema, UsageSchema, MetadataSchema, PostHogIntegrationSchema, CustomerSchema, CacheOptionsSchema, RetryParamsSchema, LoadBalanceGroupSchema, LoadBalanceModelSchema, EvaluationParamsSchema, PromptParamSchema, OverrideConfigSchema, };
|
|
503
|
+
//# sourceMappingURL=logTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logTypes.js","sourceRoot":"","sources":["../../src/types/logTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sBAAsB;AACtB,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM;IACN,MAAM;IACN,YAAY;IACZ,UAAU;IACV,WAAW;IACX,eAAe;IACf,QAAQ;IACR,UAAU;IACV,MAAM;IACN,MAAM;IACN,OAAO;IACP,SAAS;IACT,WAAW;IACX,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,SAAS;CACD,CAAC;AAIX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,WAAW;IACX,aAAa;IACb,OAAO;IACP,gBAAgB;IAChB,YAAY;CACJ,CAAC;AAIX,wBAAwB;AACxB,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAC/D,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAEvD,0BAA0B;AAC1B,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EA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CAAC,0BAA0B,CAAC;KACjC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAOrB,8CAA8C;AAC9C,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,GACrB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { PaginatedResponseType } from "./genericTypes.js";
|
|
2
|
+
import { MessageSchema } from "./logTypes.js";
|
|
3
|
+
import { ResponseFormatType, ToolChoiceType, ReasoningEffortType } from "../constants/promptConstants.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
export type Message = z.infer<typeof MessageSchema>;
|
|
6
|
+
export interface PromptVersion {
|
|
7
|
+
id?: number | string;
|
|
8
|
+
prompt_version_id?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
created_at?: string;
|
|
11
|
+
updated_at?: string;
|
|
12
|
+
version?: number;
|
|
13
|
+
messages?: Message[];
|
|
14
|
+
edited_by?: Record<string, any>;
|
|
15
|
+
model?: string;
|
|
16
|
+
stream?: boolean;
|
|
17
|
+
temperature?: number;
|
|
18
|
+
max_tokens?: number;
|
|
19
|
+
top_p?: number;
|
|
20
|
+
frequency_penalty?: number;
|
|
21
|
+
presence_penalty?: number;
|
|
22
|
+
reasoning_effort?: ReasoningEffortType;
|
|
23
|
+
variables?: Record<string, any>;
|
|
24
|
+
readonly?: boolean;
|
|
25
|
+
fallback_models?: string[];
|
|
26
|
+
load_balance_models?: Record<string, any>[];
|
|
27
|
+
tools?: Record<string, any>[];
|
|
28
|
+
tool_choice?: ToolChoiceType | Record<string, any>;
|
|
29
|
+
response_format?: ResponseFormatType | Record<string, any>;
|
|
30
|
+
json_schema?: Record<string, any>;
|
|
31
|
+
is_enforcing_response_format?: boolean;
|
|
32
|
+
prompt?: number | string;
|
|
33
|
+
parent_prompt?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface Prompt {
|
|
36
|
+
id?: number | string;
|
|
37
|
+
name?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
prompt_id?: string;
|
|
40
|
+
prompt_slug?: string;
|
|
41
|
+
full_prompt_id?: string;
|
|
42
|
+
current_version?: PromptVersion;
|
|
43
|
+
live_version?: PromptVersion;
|
|
44
|
+
prompt_versions?: PromptVersion[];
|
|
45
|
+
prompt_activities?: Record<string, any>[];
|
|
46
|
+
commit_count?: number;
|
|
47
|
+
starred?: boolean;
|
|
48
|
+
tags?: Record<string, any>[];
|
|
49
|
+
}
|
|
50
|
+
export interface PromptCreateResponse extends Prompt {
|
|
51
|
+
}
|
|
52
|
+
export type PromptListResponse = PaginatedResponseType<Prompt>;
|
|
53
|
+
export interface PromptRetrieveResponse extends Prompt {
|
|
54
|
+
}
|
|
55
|
+
export interface PromptVersionCreateResponse extends PromptVersion {
|
|
56
|
+
}
|
|
57
|
+
export type PromptVersionListResponse = PaginatedResponseType<PromptVersion>;
|
|
58
|
+
export interface PromptVersionRetrieveResponse extends PromptVersion {
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptTypes.js","sourceRoot":"","sources":["../../src/types/promptTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum RespanSpanAttributes {
|
|
2
|
+
RESPAN_SPAN_CUSTOM_ID = "respan.span_params.custom_identifier",
|
|
3
|
+
RESPAN_CUSTOMER_PARAMS_ID = "respan.customer_params.customer_identifier",
|
|
4
|
+
RESPAN_CUSTOMER_PARAMS_EMAIL = "respan.customer_params.email",
|
|
5
|
+
RESPAN_CUSTOMER_PARAMS_NAME = "respan.customer_params.name",
|
|
6
|
+
RESPAN_EVALUATION_PARAMS_ID = "respan.evaluation_params.evaluation_identifier",
|
|
7
|
+
RESPAN_THREADS_ID = "respan.threads.thread_identifier",
|
|
8
|
+
RESPAN_TRACE_GROUP_ID = "respan.trace.trace_group_identifier",
|
|
9
|
+
RESPAN_METADATA = "respan.metadata"
|
|
10
|
+
}
|
|
11
|
+
export declare const RESPAN_SPAN_ATTRIBUTES_MAP: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
export type SpanAttributeValue = string | number | boolean | Array<string | number | boolean>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export var RespanSpanAttributes;
|
|
2
|
+
(function (RespanSpanAttributes) {
|
|
3
|
+
// Span attributes
|
|
4
|
+
RespanSpanAttributes["RESPAN_SPAN_CUSTOM_ID"] = "respan.span_params.custom_identifier";
|
|
5
|
+
// Customer params
|
|
6
|
+
RespanSpanAttributes["RESPAN_CUSTOMER_PARAMS_ID"] = "respan.customer_params.customer_identifier";
|
|
7
|
+
RespanSpanAttributes["RESPAN_CUSTOMER_PARAMS_EMAIL"] = "respan.customer_params.email";
|
|
8
|
+
RespanSpanAttributes["RESPAN_CUSTOMER_PARAMS_NAME"] = "respan.customer_params.name";
|
|
9
|
+
// Evaluation params
|
|
10
|
+
RespanSpanAttributes["RESPAN_EVALUATION_PARAMS_ID"] = "respan.evaluation_params.evaluation_identifier";
|
|
11
|
+
// Threads
|
|
12
|
+
RespanSpanAttributes["RESPAN_THREADS_ID"] = "respan.threads.thread_identifier";
|
|
13
|
+
// Trace
|
|
14
|
+
RespanSpanAttributes["RESPAN_TRACE_GROUP_ID"] = "respan.trace.trace_group_identifier";
|
|
15
|
+
// Metadata
|
|
16
|
+
RespanSpanAttributes["RESPAN_METADATA"] = "respan.metadata";
|
|
17
|
+
})(RespanSpanAttributes || (RespanSpanAttributes = {}));
|
|
18
|
+
export const RESPAN_SPAN_ATTRIBUTES_MAP = {
|
|
19
|
+
customer_identifier: RespanSpanAttributes.RESPAN_CUSTOMER_PARAMS_ID,
|
|
20
|
+
customer_email: RespanSpanAttributes.RESPAN_CUSTOMER_PARAMS_EMAIL,
|
|
21
|
+
customer_name: RespanSpanAttributes.RESPAN_CUSTOMER_PARAMS_NAME,
|
|
22
|
+
evaluation_identifier: RespanSpanAttributes.RESPAN_EVALUATION_PARAMS_ID,
|
|
23
|
+
thread_identifier: RespanSpanAttributes.RESPAN_THREADS_ID,
|
|
24
|
+
custom_identifier: RespanSpanAttributes.RESPAN_SPAN_CUSTOM_ID,
|
|
25
|
+
trace_group_identifier: RespanSpanAttributes.RESPAN_TRACE_GROUP_ID,
|
|
26
|
+
metadata: RespanSpanAttributes.RESPAN_METADATA
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=spanTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spanTypes.js","sourceRoot":"","sources":["../../src/types/spanTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAoBX;AApBD,WAAY,oBAAoB;IAC5B,kBAAkB;IAClB,sFAA8D,CAAA;IAE9D,kBAAkB;IAClB,gGAAwE,CAAA;IACxE,qFAA6D,CAAA;IAC7D,mFAA2D,CAAA;IAE3D,oBAAoB;IACpB,sGAA8E,CAAA;IAE9E,UAAU;IACV,8EAAsD,CAAA;IAEtD,QAAQ;IACR,qFAA6D,CAAA;IAE7D,WAAW;IACX,2DAAmC,CAAA;AACvC,CAAC,EApBW,oBAAoB,KAApB,oBAAoB,QAoB/B;AAED,MAAM,CAAC,MAAM,0BAA0B,GAA8B;IACjE,mBAAmB,EAAE,oBAAoB,CAAC,yBAAyB;IACnE,cAAc,EAAE,oBAAoB,CAAC,4BAA4B;IACjE,aAAa,EAAE,oBAAoB,CAAC,2BAA2B;IAC/D,qBAAqB,EAAE,oBAAoB,CAAC,2BAA2B;IACvE,iBAAiB,EAAE,oBAAoB,CAAC,iBAAiB;IACzD,iBAAiB,EAAE,oBAAoB,CAAC,qBAAqB;IAC7D,sBAAsB,EAAE,oBAAoB,CAAC,qBAAqB;IAClE,QAAQ,EAAE,oBAAoB,CAAC,eAAe;CACjD,CAAC"}
|