@core-ai/mistral 0.6.1 → 0.7.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/dist/index.d.ts +16 -47
- package/dist/index.js +2 -2
- package/package.json +4 -5
package/dist/index.d.ts
CHANGED
|
@@ -14,44 +14,29 @@ type MistralProvider = {
|
|
|
14
14
|
declare function createMistral(options?: MistralProviderOptions$1): MistralProvider;
|
|
15
15
|
|
|
16
16
|
declare const mistralGenerateProviderOptionsSchema: z.ZodObject<{
|
|
17
|
-
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString
|
|
17
|
+
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
18
|
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
|
19
19
|
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
|
20
20
|
randomSeed: z.ZodOptional<z.ZodNumber>;
|
|
21
21
|
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
22
22
|
promptMode: z.ZodOptional<z.ZodString>;
|
|
23
23
|
safePrompt: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
-
},
|
|
25
|
-
stopSequences?: string[] | undefined;
|
|
26
|
-
frequencyPenalty?: number | undefined;
|
|
27
|
-
presencePenalty?: number | undefined;
|
|
28
|
-
randomSeed?: number | undefined;
|
|
29
|
-
parallelToolCalls?: boolean | undefined;
|
|
30
|
-
promptMode?: string | undefined;
|
|
31
|
-
safePrompt?: boolean | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
stopSequences?: string[] | undefined;
|
|
34
|
-
frequencyPenalty?: number | undefined;
|
|
35
|
-
presencePenalty?: number | undefined;
|
|
36
|
-
randomSeed?: number | undefined;
|
|
37
|
-
parallelToolCalls?: boolean | undefined;
|
|
38
|
-
promptMode?: string | undefined;
|
|
39
|
-
safePrompt?: boolean | undefined;
|
|
40
|
-
}>;
|
|
24
|
+
}, z.core.$strict>;
|
|
41
25
|
type MistralGenerateProviderOptions = z.infer<typeof mistralGenerateProviderOptionsSchema>;
|
|
42
26
|
declare const mistralEmbedProviderOptionsSchema: z.ZodObject<{
|
|
43
|
-
outputDtype: z.ZodOptional<z.ZodEnum<
|
|
44
|
-
|
|
27
|
+
outputDtype: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
float: "float";
|
|
29
|
+
int8: "int8";
|
|
30
|
+
uint8: "uint8";
|
|
31
|
+
binary: "binary";
|
|
32
|
+
ubinary: "ubinary";
|
|
33
|
+
}>>;
|
|
34
|
+
encodingFormat: z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
float: "float";
|
|
36
|
+
base64: "base64";
|
|
37
|
+
}>>;
|
|
45
38
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
46
|
-
},
|
|
47
|
-
outputDtype?: "float" | "int8" | "uint8" | "binary" | "ubinary" | undefined;
|
|
48
|
-
encodingFormat?: "float" | "base64" | undefined;
|
|
49
|
-
metadata?: Record<string, unknown> | undefined;
|
|
50
|
-
}, {
|
|
51
|
-
outputDtype?: "float" | "int8" | "uint8" | "binary" | "ubinary" | undefined;
|
|
52
|
-
encodingFormat?: "float" | "base64" | undefined;
|
|
53
|
-
metadata?: Record<string, unknown> | undefined;
|
|
54
|
-
}>;
|
|
39
|
+
}, z.core.$strict>;
|
|
55
40
|
type MistralEmbedProviderOptions = z.infer<typeof mistralEmbedProviderOptionsSchema>;
|
|
56
41
|
declare module '@core-ai/core-ai' {
|
|
57
42
|
interface GenerateProviderOptions {
|
|
@@ -62,30 +47,14 @@ declare module '@core-ai/core-ai' {
|
|
|
62
47
|
}
|
|
63
48
|
}
|
|
64
49
|
declare const mistralProviderOptionsSchema: z.ZodObject<{
|
|
65
|
-
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString
|
|
50
|
+
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
51
|
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
|
67
52
|
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
|
68
53
|
randomSeed: z.ZodOptional<z.ZodNumber>;
|
|
69
54
|
parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
70
55
|
promptMode: z.ZodOptional<z.ZodString>;
|
|
71
56
|
safePrompt: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
-
},
|
|
73
|
-
stopSequences?: string[] | undefined;
|
|
74
|
-
frequencyPenalty?: number | undefined;
|
|
75
|
-
presencePenalty?: number | undefined;
|
|
76
|
-
randomSeed?: number | undefined;
|
|
77
|
-
parallelToolCalls?: boolean | undefined;
|
|
78
|
-
promptMode?: string | undefined;
|
|
79
|
-
safePrompt?: boolean | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
stopSequences?: string[] | undefined;
|
|
82
|
-
frequencyPenalty?: number | undefined;
|
|
83
|
-
presencePenalty?: number | undefined;
|
|
84
|
-
randomSeed?: number | undefined;
|
|
85
|
-
parallelToolCalls?: boolean | undefined;
|
|
86
|
-
promptMode?: string | undefined;
|
|
87
|
-
safePrompt?: boolean | undefined;
|
|
88
|
-
}>;
|
|
57
|
+
}, z.core.$strict>;
|
|
89
58
|
type MistralProviderOptions = MistralGenerateProviderOptions;
|
|
90
59
|
|
|
91
60
|
export { type MistralEmbedProviderOptions, type MistralGenerateProviderOptions, type MistralProviderOptions as MistralModelProviderOptions, type MistralProvider, type MistralProviderOptions$1 as MistralProviderOptions, createMistral, mistralEmbedProviderOptionsSchema, mistralGenerateProviderOptionsSchema, mistralProviderOptionsSchema };
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@core-ai/core-ai";
|
|
12
12
|
|
|
13
13
|
// src/chat-adapter.ts
|
|
14
|
-
import {
|
|
14
|
+
import { zodSchemaToJsonSchema } from "@core-ai/core-ai";
|
|
15
15
|
|
|
16
16
|
// src/provider-options.ts
|
|
17
17
|
import { z } from "zod";
|
|
@@ -128,7 +128,7 @@ function convertTools(tools) {
|
|
|
128
128
|
function: {
|
|
129
129
|
name: tool.name,
|
|
130
130
|
description: tool.description,
|
|
131
|
-
parameters:
|
|
131
|
+
parameters: zodSchemaToJsonSchema(tool.parameters)
|
|
132
132
|
}
|
|
133
133
|
}));
|
|
134
134
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@core-ai/mistral",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Mistral provider package for @core-ai/core-ai",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Omnifact (https://omnifact.ai)",
|
|
@@ -41,12 +41,11 @@
|
|
|
41
41
|
"test:watch": "vitest"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@core-ai/core-ai": "^0.
|
|
45
|
-
"@mistralai/mistralai": "^1.14.0"
|
|
46
|
-
"zod-to-json-schema": "^3.25.1"
|
|
44
|
+
"@core-ai/core-ai": "^0.7.0",
|
|
45
|
+
"@mistralai/mistralai": "^1.14.0"
|
|
47
46
|
},
|
|
48
47
|
"peerDependencies": {
|
|
49
|
-
"zod": "^
|
|
48
|
+
"zod": "^4.0.0"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
51
|
"@core-ai/eslint-config": "*",
|