@mistralai/mistralai 3.3.0 → 3.4.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/esm/extra/realtime/connection.d.ts +16 -3
- package/esm/extra/realtime/connection.d.ts.map +1 -1
- package/esm/extra/realtime/connection.js +35 -9
- package/esm/extra/realtime/connection.js.map +1 -1
- package/esm/extra/realtime/errors.d.ts +18 -0
- package/esm/extra/realtime/errors.d.ts.map +1 -1
- package/esm/extra/realtime/errors.js +19 -0
- package/esm/extra/realtime/errors.js.map +1 -1
- package/esm/extra/realtime/index.d.ts +20 -1
- package/esm/extra/realtime/index.d.ts.map +1 -1
- package/esm/extra/realtime/index.js +5 -0
- package/esm/extra/realtime/index.js.map +1 -1
- package/esm/extra/realtime/speech.d.ts +64 -0
- package/esm/extra/realtime/speech.d.ts.map +1 -0
- package/esm/extra/realtime/speech.js +461 -0
- package/esm/extra/realtime/speech.js.map +1 -0
- package/esm/extra/realtime/transcription.d.ts +2 -2
- package/esm/extra/realtime/transcription.d.ts.map +1 -1
- package/esm/extra/realtime/transcription.js +11 -2
- package/esm/extra/realtime/transcription.js.map +1 -1
- package/esm/extra/workflows/encoding/payload-encoder.d.ts.map +1 -1
- package/esm/extra/workflows/encoding/payload-encoder.js +2 -2
- package/esm/extra/workflows/encoding/payload-encoder.js.map +1 -1
- package/esm/extra/workflows/encoding/python-json.d.ts +3 -2
- package/esm/extra/workflows/encoding/python-json.d.ts.map +1 -1
- package/esm/extra/workflows/encoding/python-json.js +24 -9
- package/esm/extra/workflows/encoding/python-json.js.map +1 -1
- package/esm/funcs/betaRagManagedIndexesCreate.js +1 -1
- package/esm/funcs/betaRagManagedIndexesCreate.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/components/connectionpreference.d.ts +12 -2
- package/esm/models/components/connectionpreference.d.ts.map +1 -1
- package/esm/models/components/connectionpreference.js +3 -3
- package/esm/models/components/connectionpreference.js.map +1 -1
- package/esm/models/components/index.d.ts +11 -5
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +11 -5
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/observabilityerrorcode.d.ts +1 -0
- package/esm/models/components/observabilityerrorcode.d.ts.map +1 -1
- package/esm/models/components/observabilityerrorcode.js +1 -0
- package/esm/models/components/observabilityerrorcode.js.map +1 -1
- package/esm/models/components/realtimespeecherror.d.ts +20 -0
- package/esm/models/components/realtimespeecherror.d.ts.map +1 -0
- package/esm/models/components/realtimespeecherror.js +23 -0
- package/esm/models/components/realtimespeecherror.js.map +1 -0
- package/esm/models/components/realtimespeecherrordetail.d.ts +45 -0
- package/esm/models/components/realtimespeecherrordetail.d.ts.map +1 -0
- package/esm/models/components/realtimespeecherrordetail.js +33 -0
- package/esm/models/components/realtimespeecherrordetail.js.map +1 -0
- package/esm/models/components/realtimespeechinputtextappend.d.ts +19 -0
- package/esm/models/components/realtimespeechinputtextappend.d.ts.map +1 -0
- package/esm/models/components/realtimespeechinputtextappend.js +22 -0
- package/esm/models/components/realtimespeechinputtextappend.js.map +1 -0
- package/esm/models/components/realtimespeechinputtextend.d.ts +17 -0
- package/esm/models/components/realtimespeechinputtextend.d.ts.map +1 -0
- package/esm/models/components/realtimespeechinputtextend.js +20 -0
- package/esm/models/components/realtimespeechinputtextend.js.map +1 -0
- package/esm/models/components/realtimespeechinputtextflush.d.ts +19 -0
- package/esm/models/components/realtimespeechinputtextflush.d.ts.map +1 -0
- package/esm/models/components/realtimespeechinputtextflush.js +22 -0
- package/esm/models/components/realtimespeechinputtextflush.js.map +1 -0
- package/esm/models/components/realtimespeechsession.d.ts +31 -0
- package/esm/models/components/realtimespeechsession.d.ts.map +1 -0
- package/esm/models/components/realtimespeechsession.js +49 -0
- package/esm/models/components/realtimespeechsession.js.map +1 -0
- package/esm/models/components/realtimespeechsessioncreated.d.ts +20 -0
- package/esm/models/components/realtimespeechsessioncreated.d.ts.map +1 -0
- package/esm/models/components/realtimespeechsessioncreated.js +23 -0
- package/esm/models/components/realtimespeechsessioncreated.js.map +1 -0
- package/esm/models/components/realtimespeechsessionupdated.d.ts +20 -0
- package/esm/models/components/realtimespeechsessionupdated.d.ts.map +1 -0
- package/esm/models/components/realtimespeechsessionupdated.js +23 -0
- package/esm/models/components/realtimespeechsessionupdated.js.map +1 -0
- package/esm/models/components/realtimespeechsessionupdatemessage.d.ts +20 -0
- package/esm/models/components/realtimespeechsessionupdatemessage.d.ts.map +1 -0
- package/esm/models/components/realtimespeechsessionupdatemessage.js +23 -0
- package/esm/models/components/realtimespeechsessionupdatemessage.js.map +1 -0
- package/esm/models/components/realtimespeechsessionupdatepayload.d.ts +42 -0
- package/esm/models/components/realtimespeechsessionupdatepayload.d.ts.map +1 -0
- package/esm/models/components/realtimespeechsessionupdatepayload.js +45 -0
- package/esm/models/components/realtimespeechsessionupdatepayload.js.map +1 -0
- package/esm/models/components/realtimespeechstreamingmode.d.ts +12 -0
- package/esm/models/components/realtimespeechstreamingmode.d.ts.map +1 -0
- package/esm/models/components/realtimespeechstreamingmode.js +13 -0
- package/esm/models/components/realtimespeechstreamingmode.js.map +1 -0
- package/esm/models/components/speechoutputformat.d.ts +2 -0
- package/esm/models/components/speechoutputformat.d.ts.map +1 -1
- package/esm/models/components/speechoutputformat.js +3 -1
- package/esm/models/components/speechoutputformat.js.map +1 -1
- package/esm/models/components/speechstreamaudiodelta.d.ts +8 -0
- package/esm/models/components/speechstreamaudiodelta.d.ts.map +1 -1
- package/esm/models/components/speechstreamaudiodelta.js +12 -0
- package/esm/models/components/speechstreamaudiodelta.js.map +1 -1
- package/esm/models/components/speechstreamdone.d.ts +10 -2
- package/esm/models/components/speechstreamdone.d.ts.map +1 -1
- package/esm/models/components/speechstreamdone.js +10 -2
- package/esm/models/components/speechstreamdone.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +12 -12
- package/src/extra/realtime/connection.ts +88 -13
- package/src/extra/realtime/errors.ts +32 -0
- package/src/extra/realtime/index.ts +42 -1
- package/src/extra/realtime/speech.ts +646 -0
- package/src/extra/realtime/transcription.ts +22 -9
- package/src/extra/workflows/encoding/payload-encoder.ts +2 -1
- package/src/extra/workflows/encoding/python-json.ts +34 -8
- package/src/funcs/betaRagManagedIndexesCreate.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/connectionpreference.ts +15 -5
- package/src/models/components/index.ts +11 -5
- package/src/models/components/observabilityerrorcode.ts +2 -0
- package/src/models/components/realtimespeecherror.ts +59 -0
- package/src/models/components/realtimespeecherrordetail.ts +100 -0
- package/src/models/components/realtimespeechinputtextappend.ts +55 -0
- package/src/models/components/realtimespeechinputtextend.ts +49 -0
- package/src/models/components/realtimespeechinputtextflush.ts +55 -0
- package/src/models/components/realtimespeechsession.ts +98 -0
- package/src/models/components/realtimespeechsessioncreated.ts +61 -0
- package/src/models/components/realtimespeechsessionupdated.ts +61 -0
- package/src/models/components/realtimespeechsessionupdatemessage.ts +62 -0
- package/src/models/components/realtimespeechsessionupdatepayload.ts +108 -0
- package/src/models/components/realtimespeechstreamingmode.ts +23 -0
- package/src/models/components/speechoutputformat.ts +5 -1
- package/src/models/components/speechstreamaudiodelta.ts +25 -0
- package/src/models/components/speechstreamdone.ts +28 -5
- package/tests/extra/realtime-speech-ws.test.ts +193 -0
- package/tests/extra/realtime-speech.test.ts +532 -0
- package/tests/extra/realtime.test.ts +217 -0
- package/tests/extra/workflow-encryption.test.ts +2 -2
- package/tests/hooks/workflow-encoding.test.ts +1 -1
- package/esm/models/components/completiontokensdetails.d.ts +0 -19
- package/esm/models/components/completiontokensdetails.d.ts.map +0 -1
- package/esm/models/components/completiontokensdetails.js +0 -18
- package/esm/models/components/completiontokensdetails.js.map +0 -1
- package/esm/models/components/messagetokens.d.ts +0 -18
- package/esm/models/components/messagetokens.d.ts.map +0 -1
- package/esm/models/components/messagetokens.js +0 -26
- package/esm/models/components/messagetokens.js.map +0 -1
- package/esm/models/components/prompttokensdetails.d.ts +0 -16
- package/esm/models/components/prompttokensdetails.d.ts.map +0 -1
- package/esm/models/components/prompttokensdetails.js +0 -22
- package/esm/models/components/prompttokensdetails.js.map +0 -1
- package/esm/models/components/roles.d.ts +0 -12
- package/esm/models/components/roles.d.ts.map +0 -1
- package/esm/models/components/roles.js +0 -14
- package/esm/models/components/roles.js.map +0 -1
- package/esm/models/components/usageinfodollardefs.d.ts +0 -24
- package/esm/models/components/usageinfodollardefs.d.ts.map +0 -1
- package/esm/models/components/usageinfodollardefs.js +0 -41
- package/esm/models/components/usageinfodollardefs.js.map +0 -1
- package/src/models/components/completiontokensdetails.ts +0 -44
- package/src/models/components/messagetokens.ts +0 -47
- package/src/models/components/prompttokensdetails.ts +0 -44
- package/src/models/components/roles.ts +0 -19
- package/src/models/components/usageinfodollardefs.ts +0 -76
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RealtimeSpeechError } from "../../models/components/realtimespeecherror.js";
|
|
1
2
|
import type {
|
|
2
3
|
RealtimeTranscriptionError,
|
|
3
4
|
} from "../../models/components/realtimetranscriptionerror.js";
|
|
@@ -30,3 +31,34 @@ export class RealtimeTranscriptionWSError extends RealtimeTranscriptionException
|
|
|
30
31
|
this.code = options?.code ?? options?.payload?.error?.code;
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
|
|
35
|
+
export class RealtimeSpeechException extends Error {
|
|
36
|
+
readonly code?: number | undefined;
|
|
37
|
+
|
|
38
|
+
constructor(message: string, options?: { cause?: unknown; code?: number }) {
|
|
39
|
+
super(message, { cause: options?.cause });
|
|
40
|
+
this.name = "RealtimeSpeechException";
|
|
41
|
+
this.code = options?.code;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export class RealtimeSpeechWSError extends RealtimeSpeechException {
|
|
46
|
+
readonly payload?: RealtimeSpeechError | undefined;
|
|
47
|
+
readonly rawPayload?: unknown;
|
|
48
|
+
|
|
49
|
+
constructor(
|
|
50
|
+
message: string,
|
|
51
|
+
options?: {
|
|
52
|
+
payload?: RealtimeSpeechError;
|
|
53
|
+
rawPayload?: unknown;
|
|
54
|
+
code?: number;
|
|
55
|
+
cause?: unknown;
|
|
56
|
+
},
|
|
57
|
+
) {
|
|
58
|
+
const code = options?.code ?? options?.payload?.error?.code;
|
|
59
|
+
super(message, code === undefined ? { cause: options?.cause } : { cause: options?.cause, code });
|
|
60
|
+
this.name = "RealtimeSpeechWSError";
|
|
61
|
+
this.payload = options?.payload;
|
|
62
|
+
this.rawPayload = options?.rawPayload;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
export { AudioEncoding } from "../../models/components/audioencoding.js";
|
|
2
2
|
export type { AudioFormat } from "../../models/components/audioformat.js";
|
|
3
|
+
export type { RealtimeSpeechError } from "../../models/components/realtimespeecherror.js";
|
|
4
|
+
export type {
|
|
5
|
+
RealtimeSpeechErrorDetail,
|
|
6
|
+
} from "../../models/components/realtimespeecherrordetail.js";
|
|
7
|
+
export type { RealtimeSpeechSession } from "../../models/components/realtimespeechsession.js";
|
|
8
|
+
export type {
|
|
9
|
+
RealtimeSpeechSessionCreated,
|
|
10
|
+
} from "../../models/components/realtimespeechsessioncreated.js";
|
|
11
|
+
export type {
|
|
12
|
+
RealtimeSpeechSessionUpdated,
|
|
13
|
+
} from "../../models/components/realtimespeechsessionupdated.js";
|
|
14
|
+
export {
|
|
15
|
+
RealtimeSpeechStreamingMode,
|
|
16
|
+
} from "../../models/components/realtimespeechstreamingmode.js";
|
|
17
|
+
export { SpeechOutputFormat } from "../../models/components/speechoutputformat.js";
|
|
18
|
+
export type { SpeechStreamAudioDelta } from "../../models/components/speechstreamaudiodelta.js";
|
|
19
|
+
export type { SpeechStreamDone } from "../../models/components/speechstreamdone.js";
|
|
3
20
|
export type {
|
|
4
21
|
RealtimeTranscriptionError,
|
|
5
22
|
} from "../../models/components/realtimetranscriptionerror.js";
|
|
@@ -27,6 +44,30 @@ export type {
|
|
|
27
44
|
export type {
|
|
28
45
|
TranscriptionStreamTextDelta,
|
|
29
46
|
} from "../../models/components/transcriptionstreamtextdelta.js";
|
|
30
|
-
export type {
|
|
47
|
+
export type { TurnDetectionConfig } from "../../models/components/turndetectionconfig.js";
|
|
48
|
+
export type {
|
|
49
|
+
TurnDetectionEagerEndEvent,
|
|
50
|
+
} from "../../models/components/turndetectioneagerendevent.js";
|
|
51
|
+
export type { TurnDetectionEndEvent } from "../../models/components/turndetectionendevent.js";
|
|
52
|
+
export { TurnDetectionEndReason } from "../../models/components/turndetectionendreason.js";
|
|
53
|
+
export type {
|
|
54
|
+
TurnDetectionResumeEvent,
|
|
55
|
+
} from "../../models/components/turndetectionresumeevent.js";
|
|
56
|
+
export type {
|
|
57
|
+
TurnDetectionStartEvent,
|
|
58
|
+
} from "../../models/components/turndetectionstartevent.js";
|
|
59
|
+
export type {
|
|
60
|
+
RealtimeEvent,
|
|
61
|
+
RealtimeSessionOptions,
|
|
62
|
+
UnknownRealtimeEvent,
|
|
63
|
+
} from "./connection.js";
|
|
31
64
|
export { RealtimeConnection } from "./connection.js";
|
|
65
|
+
export type { RealtimeConnectOptions } from "./transcription.js";
|
|
32
66
|
export { RealtimeTranscription } from "./transcription.js";
|
|
67
|
+
export { RealtimeSpeechException, RealtimeSpeechWSError } from "./errors.js";
|
|
68
|
+
export type {
|
|
69
|
+
RealtimeSpeechConnectOptions,
|
|
70
|
+
RealtimeSpeechEvent,
|
|
71
|
+
RealtimeSpeechSessionOptions,
|
|
72
|
+
} from "./speech.js";
|
|
73
|
+
export { audioBytes, RealtimeSpeech, RealtimeSpeechConnection } from "./speech.js";
|