langwatch 0.1.3 → 0.1.4

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/dist/index.d.ts CHANGED
@@ -12,113 +12,6 @@ import 'ai';
12
12
 
13
13
  type EvaluatorTypes = keyof Evaluators;
14
14
  type Evaluators = {
15
- "huggingface/llama_guard": {
16
- settings: {
17
- policy: string;
18
- evaluate: "input" | "output" | "both";
19
- model: "cloudflare/thebloke/llamaguard-7b-awq";
20
- };
21
- };
22
- "example/word_count": {
23
- settings: Record<string, never>;
24
- };
25
- "openai/moderation": {
26
- settings: {
27
- model: "text-moderation-stable" | "text-moderation-latest";
28
- categories: {
29
- harassment: boolean;
30
- harassment_threatening: boolean;
31
- hate: boolean;
32
- hate_threatening: boolean;
33
- self_harm: boolean;
34
- self_harm_instructions: boolean;
35
- self_harm_intent: boolean;
36
- sexual: boolean;
37
- sexual_minors: boolean;
38
- violence: boolean;
39
- violence_graphic: boolean;
40
- };
41
- };
42
- };
43
- "haystack/faithfulness": {
44
- settings: {
45
- model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-sonnet-20240229" | "anthropic/claude-3-opus-20240229";
46
- max_tokens: number;
47
- };
48
- };
49
- "langevals/basic": {
50
- settings: {
51
- rules: {
52
- field: "input" | "output";
53
- rule: "contains" | "not_contains" | "matches_regex" | "not_matches_regex";
54
- value: string;
55
- }[];
56
- };
57
- };
58
- "langevals/competitor_blocklist": {
59
- settings: {
60
- competitors: string[];
61
- };
62
- };
63
- "langevals/competitor_llm": {
64
- settings: {
65
- model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-sonnet-20240229" | "anthropic/claude-3-opus-20240229";
66
- max_tokens: number;
67
- name: string;
68
- description: string;
69
- };
70
- };
71
- "langevals/competitor_llm_function_call": {
72
- settings: {
73
- model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-sonnet-20240229" | "anthropic/claude-3-opus-20240229";
74
- max_tokens: number;
75
- name: string;
76
- description: string;
77
- competitors: string[];
78
- };
79
- };
80
- "langevals/llm_boolean": {
81
- settings: {
82
- model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-sonnet-20240229" | "anthropic/claude-3-opus-20240229";
83
- max_tokens: number;
84
- prompt: string;
85
- };
86
- };
87
- "langevals/llm_score": {
88
- settings: {
89
- model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-sonnet-20240229" | "anthropic/claude-3-opus-20240229";
90
- max_tokens: number;
91
- prompt: string;
92
- };
93
- };
94
- "langevals/off_topic": {
95
- settings: {
96
- model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-sonnet-20240229" | "anthropic/claude-3-opus-20240229";
97
- max_tokens: number;
98
- allowed_topics: {
99
- topic: string;
100
- description: string;
101
- }[];
102
- };
103
- };
104
- "langevals/product_sentiment_polarity": {
105
- settings: Record<string, never>;
106
- };
107
- "langevals/query_resolution": {
108
- settings: {
109
- model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-sonnet-20240229" | "anthropic/claude-3-opus-20240229";
110
- max_tokens: number;
111
- };
112
- };
113
- "langevals/similarity": {
114
- settings: {
115
- field: "input" | "output";
116
- rule: "is_not_similar_to" | "is_similar_to";
117
- value: string;
118
- threshold: number;
119
- embeddings_model: "openai/text-embedding-3-small" | "azure/text-embedding-ada-002";
120
- };
121
- };
122
15
  "lingua/language_detection": {
123
16
  settings: {
124
17
  check_for: "input_matches_output" | "output_matches_language";
@@ -172,6 +65,13 @@ type Evaluators = {
172
65
  aws_region: "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-east-1" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-south-1" | "eu-west-3" | "eu-north-1" | "me-south-1" | "sa-east-1";
173
66
  };
174
67
  };
68
+ "huggingface/llama_guard": {
69
+ settings: {
70
+ policy: string;
71
+ evaluate: "input" | "output" | "both";
72
+ model: "cloudflare/thebloke/llamaguard-7b-awq";
73
+ };
74
+ };
175
75
  "google_cloud/dlp_pii_detection": {
176
76
  settings: {
177
77
  info_types: {
@@ -187,73 +87,207 @@ type Evaluators = {
187
87
  min_likelihood: "VERY_UNLIKELY" | "UNLIKELY" | "POSSIBLE" | "LIKELY" | "VERY_LIKELY";
188
88
  };
189
89
  };
190
- "azure/content_safety": {
90
+ "presidio/pii_detection": {
191
91
  settings: {
192
- severity_threshold: 1 | 2 | 3 | 4 | 5 | 6 | 7;
193
- categories: {
194
- Hate: boolean;
195
- SelfHarm: boolean;
196
- Sexual: boolean;
197
- Violence: boolean;
92
+ entities: {
93
+ credit_card: boolean;
94
+ crypto: boolean;
95
+ email_address: boolean;
96
+ iban_code: boolean;
97
+ ip_address: boolean;
98
+ location: boolean;
99
+ person: boolean;
100
+ phone_number: boolean;
101
+ medical_license: boolean;
102
+ us_bank_number: boolean;
103
+ us_driver_license: boolean;
104
+ us_itin: boolean;
105
+ us_passport: boolean;
106
+ us_ssn: boolean;
107
+ uk_nhs: boolean;
108
+ sg_nric_fin: boolean;
109
+ sg_uen: boolean;
110
+ au_abn: boolean;
111
+ au_acn: boolean;
112
+ au_tfn: boolean;
113
+ au_medicare: boolean;
114
+ in_pan: boolean;
115
+ in_aadhaar: boolean;
116
+ in_vehicle_registration: boolean;
117
+ in_voter: boolean;
118
+ in_passport: boolean;
119
+ fi_personal_identity_code: boolean;
198
120
  };
199
- output_type: "FourSeverityLevels" | "EightSeverityLevels";
121
+ min_threshold: number;
200
122
  };
201
123
  };
202
- "azure/jailbreak": {
203
- settings: Record<string, never>;
204
- };
205
- "azure/prompt_injection": {
206
- settings: Record<string, never>;
207
- };
208
124
  "ragas/answer_correctness": {
209
125
  settings: {
210
- model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "anthropic/claude-3-5-sonnet-20240620";
126
+ model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "anthropic/claude-3-5-sonnet-20240620";
211
127
  embeddings_model: "openai/text-embedding-ada-002" | "azure/text-embedding-ada-002";
212
128
  max_tokens: number;
213
129
  };
214
130
  };
215
131
  "ragas/answer_relevancy": {
216
132
  settings: {
217
- model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "anthropic/claude-3-5-sonnet-20240620";
133
+ model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "anthropic/claude-3-5-sonnet-20240620";
218
134
  embeddings_model: "openai/text-embedding-ada-002" | "azure/text-embedding-ada-002";
219
135
  max_tokens: number;
220
136
  };
221
137
  };
222
138
  "ragas/context_precision": {
223
139
  settings: {
224
- model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "anthropic/claude-3-5-sonnet-20240620";
140
+ model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "anthropic/claude-3-5-sonnet-20240620";
225
141
  embeddings_model: "openai/text-embedding-ada-002" | "azure/text-embedding-ada-002";
226
142
  max_tokens: number;
227
143
  };
228
144
  };
229
145
  "ragas/context_recall": {
230
146
  settings: {
231
- model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "anthropic/claude-3-5-sonnet-20240620";
147
+ model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "anthropic/claude-3-5-sonnet-20240620";
232
148
  embeddings_model: "openai/text-embedding-ada-002" | "azure/text-embedding-ada-002";
233
149
  max_tokens: number;
234
150
  };
235
151
  };
236
152
  "ragas/context_relevancy": {
237
153
  settings: {
238
- model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "anthropic/claude-3-5-sonnet-20240620";
154
+ model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "anthropic/claude-3-5-sonnet-20240620";
239
155
  embeddings_model: "openai/text-embedding-ada-002" | "azure/text-embedding-ada-002";
240
156
  max_tokens: number;
241
157
  };
242
158
  };
243
159
  "ragas/context_utilization": {
244
160
  settings: {
245
- model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "anthropic/claude-3-5-sonnet-20240620";
161
+ model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "anthropic/claude-3-5-sonnet-20240620";
246
162
  embeddings_model: "openai/text-embedding-ada-002" | "azure/text-embedding-ada-002";
247
163
  max_tokens: number;
248
164
  };
249
165
  };
250
166
  "ragas/faithfulness": {
251
167
  settings: {
252
- model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "anthropic/claude-3-5-sonnet-20240620";
168
+ model: "openai/gpt-3.5-turbo-16k" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "azure/gpt-35-turbo-16k" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "anthropic/claude-3-5-sonnet-20240620";
253
169
  embeddings_model: "openai/text-embedding-ada-002" | "azure/text-embedding-ada-002";
254
170
  max_tokens: number;
255
171
  };
256
172
  };
173
+ "langevals/basic": {
174
+ settings: {
175
+ rules: {
176
+ field: "input" | "output";
177
+ rule: "contains" | "not_contains" | "matches_regex" | "not_matches_regex";
178
+ value: string;
179
+ }[];
180
+ };
181
+ };
182
+ "langevals/competitor_blocklist": {
183
+ settings: {
184
+ competitors: string[];
185
+ };
186
+ };
187
+ "langevals/competitor_llm": {
188
+ settings: {
189
+ model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-5-sonnet-20240620" | "anthropic/claude-3-opus-20240229";
190
+ max_tokens: number;
191
+ name: string;
192
+ description: string;
193
+ };
194
+ };
195
+ "langevals/competitor_llm_function_call": {
196
+ settings: {
197
+ model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-5-sonnet-20240620" | "anthropic/claude-3-opus-20240229";
198
+ max_tokens: number;
199
+ name: string;
200
+ description: string;
201
+ competitors: string[];
202
+ };
203
+ };
204
+ "langevals/llm_boolean": {
205
+ settings: {
206
+ model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-5-sonnet-20240620" | "anthropic/claude-3-opus-20240229";
207
+ max_tokens: number;
208
+ prompt: string;
209
+ };
210
+ };
211
+ "langevals/llm_score": {
212
+ settings: {
213
+ model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-5-sonnet-20240620" | "anthropic/claude-3-opus-20240229";
214
+ max_tokens: number;
215
+ prompt: string;
216
+ };
217
+ };
218
+ "langevals/off_topic": {
219
+ settings: {
220
+ model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-5-sonnet-20240620" | "anthropic/claude-3-opus-20240229";
221
+ max_tokens: number;
222
+ allowed_topics: {
223
+ topic: string;
224
+ description: string;
225
+ }[];
226
+ };
227
+ };
228
+ "langevals/product_sentiment_polarity": {
229
+ settings: Record<string, never>;
230
+ };
231
+ "langevals/query_resolution": {
232
+ settings: {
233
+ model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-5-sonnet-20240620" | "anthropic/claude-3-opus-20240229";
234
+ max_tokens: number;
235
+ };
236
+ };
237
+ "langevals/similarity": {
238
+ settings: {
239
+ field: "input" | "output";
240
+ rule: "is_not_similar_to" | "is_similar_to";
241
+ value: string;
242
+ threshold: number;
243
+ embeddings_model: "openai/text-embedding-3-small" | "azure/text-embedding-ada-002";
244
+ };
245
+ };
246
+ "azure/content_safety": {
247
+ settings: {
248
+ severity_threshold: 1 | 2 | 3 | 4 | 5 | 6 | 7;
249
+ categories: {
250
+ Hate: boolean;
251
+ SelfHarm: boolean;
252
+ Sexual: boolean;
253
+ Violence: boolean;
254
+ };
255
+ output_type: "FourSeverityLevels" | "EightSeverityLevels";
256
+ };
257
+ };
258
+ "azure/jailbreak": {
259
+ settings: Record<string, never>;
260
+ };
261
+ "azure/prompt_injection": {
262
+ settings: Record<string, never>;
263
+ };
264
+ "openai/moderation": {
265
+ settings: {
266
+ model: "text-moderation-stable" | "text-moderation-latest";
267
+ categories: {
268
+ harassment: boolean;
269
+ harassment_threatening: boolean;
270
+ hate: boolean;
271
+ hate_threatening: boolean;
272
+ self_harm: boolean;
273
+ self_harm_instructions: boolean;
274
+ self_harm_intent: boolean;
275
+ sexual: boolean;
276
+ sexual_minors: boolean;
277
+ violence: boolean;
278
+ violence_graphic: boolean;
279
+ };
280
+ };
281
+ };
282
+ "example/word_count": {
283
+ settings: Record<string, never>;
284
+ };
285
+ "haystack/faithfulness": {
286
+ settings: {
287
+ model: "openai/gpt-3.5-turbo" | "openai/gpt-3.5-turbo-0125" | "openai/gpt-3.5-turbo-1106" | "openai/gpt-4-turbo" | "openai/gpt-4-0125-preview" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-1106-preview" | "azure/gpt-35-turbo-1106" | "azure/gpt-4o" | "azure/gpt-4o-mini" | "azure/gpt-4-turbo-2024-04-09" | "azure/gpt-4-1106-preview" | "groq/llama3-70b-8192" | "anthropic/claude-3-haiku-20240307" | "anthropic/claude-3-5-sonnet-20240620" | "anthropic/claude-3-opus-20240229";
288
+ max_tokens: number;
289
+ };
290
+ };
257
291
  };
258
292
 
259
293
  type Conversation = {
package/dist/index.js CHANGED
@@ -4700,7 +4700,7 @@ function fromError(err, options = {}) {
4700
4700
  }
4701
4701
 
4702
4702
  // package.json
4703
- var version = "0.1.3";
4703
+ var version = "0.1.4";
4704
4704
 
4705
4705
  // src/evaluations.ts
4706
4706
  var evaluate = async (params) => {
@@ -6447,14 +6447,14 @@ function camelToSnakeCase(str) {
6447
6447
  function camelToSnakeCaseNested(obj, parentKey) {
6448
6448
  if (Array.isArray(obj)) {
6449
6449
  return obj.map(
6450
- (item) => camelToSnakeCaseNested(item)
6450
+ (item) => camelToSnakeCaseNested(item, parentKey)
6451
6451
  );
6452
6452
  } else if (typeof obj === "object" && obj !== null) {
6453
6453
  const newObj = {};
6454
6454
  for (const key in obj) {
6455
6455
  if (obj.hasOwnProperty(key)) {
6456
6456
  const newKey = camelToSnakeCase(key);
6457
- if (parentKey === "metadata" && !Object.keys(reservedTraceMetadataSchema.shape).includes(newKey) || parentKey === "params" && !Object.keys(reservedSpanParamsSchema.shape).includes(newKey)) {
6457
+ if (parentKey === "metadata" && !Object.keys(reservedTraceMetadataSchema.shape).includes(newKey) || parentKey === "params" && !Object.keys(reservedSpanParamsSchema.shape).includes(newKey) || parentKey === "input" && ["json", "raw", "list"].includes(newObj.type) && newKey === "value" || parentKey === "output" && ["json", "raw", "list"].includes(newObj.type) && newKey === "value" || parentKey === "contexts" && newKey === "content") {
6458
6458
  newObj[key] = obj[key];
6459
6459
  } else {
6460
6460
  newObj[newKey] = camelToSnakeCaseNested(obj[key], newKey);