@fonoster/common 0.13.4 → 0.13.5
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.
|
@@ -322,7 +322,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
322
322
|
evalsLanguageModel: z.ZodObject<{
|
|
323
323
|
provider: z.ZodEnum<["openai"]>;
|
|
324
324
|
model: z.ZodString;
|
|
325
|
-
apiKey: z.ZodString
|
|
325
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
326
326
|
}, "strip", z.ZodTypeAny, {
|
|
327
327
|
provider?: "openai";
|
|
328
328
|
apiKey?: string;
|
|
@@ -356,13 +356,13 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
356
356
|
userInput: z.ZodString;
|
|
357
357
|
expected: z.ZodObject<{
|
|
358
358
|
text: z.ZodObject<{
|
|
359
|
-
type: z.ZodEnum<["
|
|
359
|
+
type: z.ZodEnum<["EXACT", "SIMILAR"]>;
|
|
360
360
|
response: z.ZodString;
|
|
361
361
|
}, "strip", z.ZodTypeAny, {
|
|
362
|
-
type?: "
|
|
362
|
+
type?: "EXACT" | "SIMILAR";
|
|
363
363
|
response?: string;
|
|
364
364
|
}, {
|
|
365
|
-
type?: "
|
|
365
|
+
type?: "EXACT" | "SIMILAR";
|
|
366
366
|
response?: string;
|
|
367
367
|
}>;
|
|
368
368
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -381,7 +381,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
381
381
|
tool?: string;
|
|
382
382
|
}[];
|
|
383
383
|
text?: {
|
|
384
|
-
type?: "
|
|
384
|
+
type?: "EXACT" | "SIMILAR";
|
|
385
385
|
response?: string;
|
|
386
386
|
};
|
|
387
387
|
}, {
|
|
@@ -390,7 +390,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
390
390
|
tool?: string;
|
|
391
391
|
}[];
|
|
392
392
|
text?: {
|
|
393
|
-
type?: "
|
|
393
|
+
type?: "EXACT" | "SIMILAR";
|
|
394
394
|
response?: string;
|
|
395
395
|
};
|
|
396
396
|
}>;
|
|
@@ -401,7 +401,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
401
401
|
tool?: string;
|
|
402
402
|
}[];
|
|
403
403
|
text?: {
|
|
404
|
-
type?: "
|
|
404
|
+
type?: "EXACT" | "SIMILAR";
|
|
405
405
|
response?: string;
|
|
406
406
|
};
|
|
407
407
|
};
|
|
@@ -413,7 +413,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
413
413
|
tool?: string;
|
|
414
414
|
}[];
|
|
415
415
|
text?: {
|
|
416
|
-
type?: "
|
|
416
|
+
type?: "EXACT" | "SIMILAR";
|
|
417
417
|
response?: string;
|
|
418
418
|
};
|
|
419
419
|
};
|
|
@@ -435,7 +435,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
435
435
|
tool?: string;
|
|
436
436
|
}[];
|
|
437
437
|
text?: {
|
|
438
|
-
type?: "
|
|
438
|
+
type?: "EXACT" | "SIMILAR";
|
|
439
439
|
response?: string;
|
|
440
440
|
};
|
|
441
441
|
};
|
|
@@ -457,7 +457,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
457
457
|
tool?: string;
|
|
458
458
|
}[];
|
|
459
459
|
text?: {
|
|
460
|
-
type?: "
|
|
460
|
+
type?: "EXACT" | "SIMILAR";
|
|
461
461
|
response?: string;
|
|
462
462
|
};
|
|
463
463
|
};
|
|
@@ -487,7 +487,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
487
487
|
tool?: string;
|
|
488
488
|
}[];
|
|
489
489
|
text?: {
|
|
490
|
-
type?: "
|
|
490
|
+
type?: "EXACT" | "SIMILAR";
|
|
491
491
|
response?: string;
|
|
492
492
|
};
|
|
493
493
|
};
|
|
@@ -517,7 +517,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
517
517
|
tool?: string;
|
|
518
518
|
}[];
|
|
519
519
|
text?: {
|
|
520
|
-
type?: "
|
|
520
|
+
type?: "EXACT" | "SIMILAR";
|
|
521
521
|
response?: string;
|
|
522
522
|
};
|
|
523
523
|
};
|
|
@@ -613,7 +613,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
613
613
|
tool?: string;
|
|
614
614
|
}[];
|
|
615
615
|
text?: {
|
|
616
|
-
type?: "
|
|
616
|
+
type?: "EXACT" | "SIMILAR";
|
|
617
617
|
response?: string;
|
|
618
618
|
};
|
|
619
619
|
};
|
|
@@ -709,7 +709,7 @@ declare const assistantSchema: z.ZodObject<{
|
|
|
709
709
|
tool?: string;
|
|
710
710
|
}[];
|
|
711
711
|
text?: {
|
|
712
|
-
type?: "
|
|
712
|
+
type?: "EXACT" | "SIMILAR";
|
|
713
713
|
response?: string;
|
|
714
714
|
};
|
|
715
715
|
};
|
|
@@ -22,7 +22,7 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
22
22
|
evalsLanguageModel: z.ZodObject<{
|
|
23
23
|
provider: z.ZodEnum<["openai"]>;
|
|
24
24
|
model: z.ZodString;
|
|
25
|
-
apiKey: z.ZodString
|
|
25
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
26
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
27
|
provider?: "openai";
|
|
28
28
|
apiKey?: string;
|
|
@@ -56,13 +56,13 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
56
56
|
userInput: z.ZodString;
|
|
57
57
|
expected: z.ZodObject<{
|
|
58
58
|
text: z.ZodObject<{
|
|
59
|
-
type: z.ZodEnum<["
|
|
59
|
+
type: z.ZodEnum<["EXACT", "SIMILAR"]>;
|
|
60
60
|
response: z.ZodString;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
type?: "
|
|
62
|
+
type?: "EXACT" | "SIMILAR";
|
|
63
63
|
response?: string;
|
|
64
64
|
}, {
|
|
65
|
-
type?: "
|
|
65
|
+
type?: "EXACT" | "SIMILAR";
|
|
66
66
|
response?: string;
|
|
67
67
|
}>;
|
|
68
68
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -81,7 +81,7 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
81
81
|
tool?: string;
|
|
82
82
|
}[];
|
|
83
83
|
text?: {
|
|
84
|
-
type?: "
|
|
84
|
+
type?: "EXACT" | "SIMILAR";
|
|
85
85
|
response?: string;
|
|
86
86
|
};
|
|
87
87
|
}, {
|
|
@@ -90,7 +90,7 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
90
90
|
tool?: string;
|
|
91
91
|
}[];
|
|
92
92
|
text?: {
|
|
93
|
-
type?: "
|
|
93
|
+
type?: "EXACT" | "SIMILAR";
|
|
94
94
|
response?: string;
|
|
95
95
|
};
|
|
96
96
|
}>;
|
|
@@ -101,7 +101,7 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
101
101
|
tool?: string;
|
|
102
102
|
}[];
|
|
103
103
|
text?: {
|
|
104
|
-
type?: "
|
|
104
|
+
type?: "EXACT" | "SIMILAR";
|
|
105
105
|
response?: string;
|
|
106
106
|
};
|
|
107
107
|
};
|
|
@@ -113,7 +113,7 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
113
113
|
tool?: string;
|
|
114
114
|
}[];
|
|
115
115
|
text?: {
|
|
116
|
-
type?: "
|
|
116
|
+
type?: "EXACT" | "SIMILAR";
|
|
117
117
|
response?: string;
|
|
118
118
|
};
|
|
119
119
|
};
|
|
@@ -135,7 +135,7 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
135
135
|
tool?: string;
|
|
136
136
|
}[];
|
|
137
137
|
text?: {
|
|
138
|
-
type?: "
|
|
138
|
+
type?: "EXACT" | "SIMILAR";
|
|
139
139
|
response?: string;
|
|
140
140
|
};
|
|
141
141
|
};
|
|
@@ -157,7 +157,7 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
157
157
|
tool?: string;
|
|
158
158
|
}[];
|
|
159
159
|
text?: {
|
|
160
|
-
type?: "
|
|
160
|
+
type?: "EXACT" | "SIMILAR";
|
|
161
161
|
response?: string;
|
|
162
162
|
};
|
|
163
163
|
};
|
|
@@ -187,7 +187,7 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
187
187
|
tool?: string;
|
|
188
188
|
}[];
|
|
189
189
|
text?: {
|
|
190
|
-
type?: "
|
|
190
|
+
type?: "EXACT" | "SIMILAR";
|
|
191
191
|
response?: string;
|
|
192
192
|
};
|
|
193
193
|
};
|
|
@@ -217,7 +217,7 @@ declare const testCasesSchema: z.ZodObject<{
|
|
|
217
217
|
tool?: string;
|
|
218
218
|
}[];
|
|
219
219
|
text?: {
|
|
220
|
-
type?: "
|
|
220
|
+
type?: "EXACT" | "SIMILAR";
|
|
221
221
|
response?: string;
|
|
222
222
|
};
|
|
223
223
|
};
|
|
@@ -27,7 +27,7 @@ const testCasesSchema = zod_1.z.object({
|
|
|
27
27
|
message: "Invalid language model provider. Only OpenAI is supported for evals."
|
|
28
28
|
}),
|
|
29
29
|
model: zod_1.z.string(),
|
|
30
|
-
apiKey: zod_1.z.string()
|
|
30
|
+
apiKey: zod_1.z.string().optional()
|
|
31
31
|
}),
|
|
32
32
|
evalsSystemPrompt: zod_1.z.string().optional(),
|
|
33
33
|
scenarios: zod_1.z.array(zod_1.z.object({
|
|
@@ -43,7 +43,7 @@ const testCasesSchema = zod_1.z.object({
|
|
|
43
43
|
userInput: zod_1.z.string(),
|
|
44
44
|
expected: zod_1.z.object({
|
|
45
45
|
text: zod_1.z.object({
|
|
46
|
-
type: zod_1.z.enum(["
|
|
46
|
+
type: zod_1.z.enum(["EXACT", "SIMILAR"]),
|
|
47
47
|
response: zod_1.z.string()
|
|
48
48
|
}),
|
|
49
49
|
tools: zod_1.z
|
package/dist/identity/roles.js
CHANGED
|
@@ -28,6 +28,7 @@ const workspaceResourceAccess = [
|
|
|
28
28
|
"/fonoster.applications.v1beta2.Applications/GetApplication",
|
|
29
29
|
"/fonoster.applications.v1beta2.Applications/DeleteApplication",
|
|
30
30
|
"/fonoster.applications.v1beta2.Applications/ListApplications",
|
|
31
|
+
"/fonoster.applications.v1beta2.Applications/EvaluateIntelligence",
|
|
31
32
|
"/fonoster.agents.v1beta2.Agents/CreateAgent",
|
|
32
33
|
"/fonoster.agents.v1beta2.Agents/UpdateAgent",
|
|
33
34
|
"/fonoster.agents.v1beta2.Agents/GetAgent",
|
|
@@ -34,6 +34,8 @@ service Applications {
|
|
|
34
34
|
rpc UpdateApplication(UpdateApplicationRequest) returns (UpdateApplicationResponse) {}
|
|
35
35
|
// Delete an application
|
|
36
36
|
rpc DeleteApplication(DeleteApplicationRequest) returns (DeleteApplicationResponse) {}
|
|
37
|
+
// Evaluate the intellgence for an Autopilot application
|
|
38
|
+
rpc EvaluateIntelligence(EvaluateIntelligenceRequest) returns (EvaluateIntelligenceResponse);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
// The type of application
|
|
@@ -154,3 +156,44 @@ message DeleteApplicationResponse {
|
|
|
154
156
|
// Echo the reference of the application
|
|
155
157
|
string ref = 1;
|
|
156
158
|
}
|
|
159
|
+
|
|
160
|
+
// Request to perform an eval for a given Autopilot application
|
|
161
|
+
message EvaluateIntelligenceRequest {
|
|
162
|
+
// The intelligence to evaluate
|
|
163
|
+
ProductContainer intelligence = 1;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Response with the evaluation results
|
|
167
|
+
message EvaluateIntelligenceResponse {
|
|
168
|
+
enum ExpectedTextType {
|
|
169
|
+
EXACT = 0;
|
|
170
|
+
SIMILAR = 1;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
message ToolEvaluationReport {
|
|
174
|
+
string expected_tool = 1;
|
|
175
|
+
string actual_tool = 2;
|
|
176
|
+
bool passed = 3;
|
|
177
|
+
google.protobuf.Struct expected_parameters = 4;
|
|
178
|
+
google.protobuf.Struct actual_parameters = 5;
|
|
179
|
+
string error_message = 6;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
message StepEvaluationReport {
|
|
183
|
+
string human_input = 1;
|
|
184
|
+
string expected_response = 2;
|
|
185
|
+
string ai_response = 3;
|
|
186
|
+
ExpectedTextType evaluation_type = 4;
|
|
187
|
+
bool passed = 5;
|
|
188
|
+
string error_message = 6;
|
|
189
|
+
repeated ToolEvaluationReport tool_evaluations = 7;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
message ScenarioEvaluationReport {
|
|
193
|
+
string scenario_ref = 1;
|
|
194
|
+
bool overall_passed = 2;
|
|
195
|
+
repeated StepEvaluationReport steps = 3;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
repeated ScenarioEvaluationReport results = 1;
|
|
199
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -20,4 +20,8 @@ type NumberPreconditionsCheck = (request: {
|
|
|
20
20
|
appRef?: string;
|
|
21
21
|
agentAor?: string;
|
|
22
22
|
}) => Promise<void>;
|
|
23
|
-
|
|
23
|
+
type IntegrationConfig = {
|
|
24
|
+
productRef: string;
|
|
25
|
+
credentials: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
export { NumberPreconditionsCheck, IntegrationConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/common",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
4
4
|
"description": "Common library for Fonoster projects",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"clean": "rimraf ./dist node_modules tsconfig.tsbuildinfo"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@fonoster/logger": "^0.13.
|
|
21
|
+
"@fonoster/logger": "^0.13.5",
|
|
22
22
|
"@grpc/grpc-js": "~1.10.6",
|
|
23
23
|
"@grpc/proto-loader": "^0.7.12",
|
|
24
24
|
"@influxdata/influxdb-client": "^1.35.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/nodemailer": "^6.4.14"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "a502dc44c7b180a4424eea51952e41194e4ffaf4"
|
|
53
53
|
}
|