@mistralai/mistralai 1.7.2 → 1.7.3

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.
Files changed (104) hide show
  1. package/docs/sdks/models/README.md +1 -1
  2. package/examples/src/async_ocr_process_from_file.ts +2 -4
  3. package/funcs/modelsRetrieve.d.ts +1 -1
  4. package/funcs/modelsRetrieve.js +1 -1
  5. package/jsr.json +1 -1
  6. package/lib/config.d.ts +2 -2
  7. package/lib/config.js +2 -2
  8. package/models/components/agentscompletionrequest.d.ts +3 -0
  9. package/models/components/agentscompletionrequest.d.ts.map +1 -1
  10. package/models/components/agentscompletionrequest.js.map +1 -1
  11. package/models/components/agentscompletionstreamrequest.d.ts +3 -0
  12. package/models/components/agentscompletionstreamrequest.d.ts.map +1 -1
  13. package/models/components/agentscompletionstreamrequest.js.map +1 -1
  14. package/models/components/basemodelcard.d.ts +2 -23
  15. package/models/components/basemodelcard.d.ts.map +1 -1
  16. package/models/components/basemodelcard.js +5 -19
  17. package/models/components/basemodelcard.js.map +1 -1
  18. package/models/components/chatcompletionrequest.d.ts +3 -0
  19. package/models/components/chatcompletionrequest.d.ts.map +1 -1
  20. package/models/components/chatcompletionrequest.js.map +1 -1
  21. package/models/components/chatcompletionstreamrequest.d.ts +3 -0
  22. package/models/components/chatcompletionstreamrequest.d.ts.map +1 -1
  23. package/models/components/chatcompletionstreamrequest.js.map +1 -1
  24. package/models/components/contentchunk.d.ts +5 -0
  25. package/models/components/contentchunk.d.ts.map +1 -1
  26. package/models/components/contentchunk.js +3 -0
  27. package/models/components/contentchunk.js.map +1 -1
  28. package/models/components/conversationrestartrequest.d.ts +2 -2
  29. package/models/components/conversationrestartrequest.d.ts.map +1 -1
  30. package/models/components/conversationrestartrequest.js +4 -4
  31. package/models/components/conversationrestartrequest.js.map +1 -1
  32. package/models/components/conversationrestartstreamrequest.d.ts +2 -2
  33. package/models/components/conversationrestartstreamrequest.d.ts.map +1 -1
  34. package/models/components/conversationrestartstreamrequest.js +4 -4
  35. package/models/components/conversationrestartstreamrequest.js.map +1 -1
  36. package/models/components/filechunk.d.ts +31 -0
  37. package/models/components/filechunk.d.ts.map +1 -0
  38. package/models/components/filechunk.js +70 -0
  39. package/models/components/filechunk.js.map +1 -0
  40. package/models/components/ftmodelcard.d.ts +2 -23
  41. package/models/components/ftmodelcard.d.ts.map +1 -1
  42. package/models/components/ftmodelcard.js +5 -19
  43. package/models/components/ftmodelcard.js.map +1 -1
  44. package/models/components/index.d.ts +1 -0
  45. package/models/components/index.d.ts.map +1 -1
  46. package/models/components/index.js +1 -0
  47. package/models/components/index.js.map +1 -1
  48. package/models/components/inputentries.d.ts +6 -2
  49. package/models/components/inputentries.d.ts.map +1 -1
  50. package/models/components/inputentries.js +12 -0
  51. package/models/components/inputentries.js.map +1 -1
  52. package/models/components/messageinputentry.d.ts +8 -8
  53. package/models/components/messageinputentry.d.ts.map +1 -1
  54. package/models/components/messageinputentry.js +13 -13
  55. package/models/components/messageinputentry.js.map +1 -1
  56. package/models/components/modelcapabilities.d.ts +2 -0
  57. package/models/components/modelcapabilities.d.ts.map +1 -1
  58. package/models/components/modelcapabilities.js +2 -0
  59. package/models/components/modelcapabilities.js.map +1 -1
  60. package/models/components/ocrrequest.d.ts +5 -4
  61. package/models/components/ocrrequest.d.ts.map +1 -1
  62. package/models/components/ocrrequest.js +13 -2
  63. package/models/components/ocrrequest.js.map +1 -1
  64. package/models/operations/agentsapiv1conversationsget.d.ts +3 -0
  65. package/models/operations/agentsapiv1conversationsget.d.ts.map +1 -1
  66. package/models/operations/agentsapiv1conversationsget.js.map +1 -1
  67. package/models/operations/agentsapiv1conversationshistory.d.ts +3 -0
  68. package/models/operations/agentsapiv1conversationshistory.d.ts.map +1 -1
  69. package/models/operations/agentsapiv1conversationshistory.js.map +1 -1
  70. package/models/operations/agentsapiv1conversationsmessages.d.ts +3 -0
  71. package/models/operations/agentsapiv1conversationsmessages.d.ts.map +1 -1
  72. package/models/operations/agentsapiv1conversationsmessages.js.map +1 -1
  73. package/models/operations/agentsapiv1conversationsrestart.d.ts +3 -0
  74. package/models/operations/agentsapiv1conversationsrestart.d.ts.map +1 -1
  75. package/models/operations/agentsapiv1conversationsrestart.js.map +1 -1
  76. package/models/operations/agentsapiv1conversationsrestartstream.d.ts +3 -0
  77. package/models/operations/agentsapiv1conversationsrestartstream.d.ts.map +1 -1
  78. package/models/operations/agentsapiv1conversationsrestartstream.js.map +1 -1
  79. package/package.json +1 -1
  80. package/sdk/models.d.ts +1 -1
  81. package/sdk/models.js +1 -1
  82. package/src/funcs/modelsRetrieve.ts +1 -1
  83. package/src/lib/config.ts +2 -2
  84. package/src/models/components/agentscompletionrequest.ts +3 -0
  85. package/src/models/components/agentscompletionstreamrequest.ts +3 -0
  86. package/src/models/components/basemodelcard.ts +7 -27
  87. package/src/models/components/chatcompletionrequest.ts +3 -0
  88. package/src/models/components/chatcompletionstreamrequest.ts +3 -0
  89. package/src/models/components/contentchunk.ts +14 -0
  90. package/src/models/components/conversationrestartrequest.ts +6 -6
  91. package/src/models/components/conversationrestartstreamrequest.ts +6 -6
  92. package/src/models/components/filechunk.ts +75 -0
  93. package/src/models/components/ftmodelcard.ts +7 -28
  94. package/src/models/components/index.ts +1 -0
  95. package/src/models/components/inputentries.ts +44 -2
  96. package/src/models/components/messageinputentry.ts +15 -16
  97. package/src/models/components/modelcapabilities.ts +4 -0
  98. package/src/models/components/ocrrequest.ts +25 -5
  99. package/src/models/operations/agentsapiv1conversationsget.ts +3 -0
  100. package/src/models/operations/agentsapiv1conversationshistory.ts +3 -0
  101. package/src/models/operations/agentsapiv1conversationsmessages.ts +3 -0
  102. package/src/models/operations/agentsapiv1conversationsrestart.ts +3 -0
  103. package/src/models/operations/agentsapiv1conversationsrestartstream.ts +3 -0
  104. package/src/sdk/models.ts +1 -1
@@ -13,6 +13,12 @@ import {
13
13
  DocumentURLChunk$Outbound,
14
14
  DocumentURLChunk$outboundSchema,
15
15
  } from "./documenturlchunk.js";
16
+ import {
17
+ FileChunk,
18
+ FileChunk$inboundSchema,
19
+ FileChunk$Outbound,
20
+ FileChunk$outboundSchema,
21
+ } from "./filechunk.js";
16
22
  import {
17
23
  ImageURLChunk,
18
24
  ImageURLChunk$inboundSchema,
@@ -29,7 +35,7 @@ import {
29
35
  /**
30
36
  * Document to run OCR on
31
37
  */
32
- export type Document = ImageURLChunk | DocumentURLChunk;
38
+ export type Document = FileChunk | ImageURLChunk | DocumentURLChunk;
33
39
 
34
40
  export type OCRRequest = {
35
41
  model: string | null;
@@ -37,7 +43,7 @@ export type OCRRequest = {
37
43
  /**
38
44
  * Document to run OCR on
39
45
  */
40
- document: ImageURLChunk | DocumentURLChunk;
46
+ document: FileChunk | ImageURLChunk | DocumentURLChunk;
41
47
  /**
42
48
  * Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0
43
49
  */
@@ -69,10 +75,15 @@ export const Document$inboundSchema: z.ZodType<
69
75
  Document,
70
76
  z.ZodTypeDef,
71
77
  unknown
72
- > = z.union([ImageURLChunk$inboundSchema, DocumentURLChunk$inboundSchema]);
78
+ > = z.union([
79
+ FileChunk$inboundSchema,
80
+ ImageURLChunk$inboundSchema,
81
+ DocumentURLChunk$inboundSchema,
82
+ ]);
73
83
 
74
84
  /** @internal */
75
85
  export type Document$Outbound =
86
+ | FileChunk$Outbound
76
87
  | ImageURLChunk$Outbound
77
88
  | DocumentURLChunk$Outbound;
78
89
 
@@ -81,7 +92,11 @@ export const Document$outboundSchema: z.ZodType<
81
92
  Document$Outbound,
82
93
  z.ZodTypeDef,
83
94
  Document
84
- > = z.union([ImageURLChunk$outboundSchema, DocumentURLChunk$outboundSchema]);
95
+ > = z.union([
96
+ FileChunk$outboundSchema,
97
+ ImageURLChunk$outboundSchema,
98
+ DocumentURLChunk$outboundSchema,
99
+ ]);
85
100
 
86
101
  /**
87
102
  * @internal
@@ -119,6 +134,7 @@ export const OCRRequest$inboundSchema: z.ZodType<
119
134
  model: z.nullable(z.string()),
120
135
  id: z.string().optional(),
121
136
  document: z.union([
137
+ FileChunk$inboundSchema,
122
138
  ImageURLChunk$inboundSchema,
123
139
  DocumentURLChunk$inboundSchema,
124
140
  ]),
@@ -143,7 +159,10 @@ export const OCRRequest$inboundSchema: z.ZodType<
143
159
  export type OCRRequest$Outbound = {
144
160
  model: string | null;
145
161
  id?: string | undefined;
146
- document: ImageURLChunk$Outbound | DocumentURLChunk$Outbound;
162
+ document:
163
+ | FileChunk$Outbound
164
+ | ImageURLChunk$Outbound
165
+ | DocumentURLChunk$Outbound;
147
166
  pages?: Array<number> | null | undefined;
148
167
  include_image_base64?: boolean | null | undefined;
149
168
  image_limit?: number | null | undefined;
@@ -161,6 +180,7 @@ export const OCRRequest$outboundSchema: z.ZodType<
161
180
  model: z.nullable(z.string()),
162
181
  id: z.string().optional(),
163
182
  document: z.union([
183
+ FileChunk$outboundSchema,
164
184
  ImageURLChunk$outboundSchema,
165
185
  DocumentURLChunk$outboundSchema,
166
186
  ]),
@@ -10,6 +10,9 @@ import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export type AgentsApiV1ConversationsGetRequest = {
13
+ /**
14
+ * ID of the conversation from which we are fetching metadata.
15
+ */
13
16
  conversationId: string;
14
17
  };
15
18
 
@@ -9,6 +9,9 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type AgentsApiV1ConversationsHistoryRequest = {
12
+ /**
13
+ * ID of the conversation from which we are fetching entries.
14
+ */
12
15
  conversationId: string;
13
16
  };
14
17
 
@@ -9,6 +9,9 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type AgentsApiV1ConversationsMessagesRequest = {
12
+ /**
13
+ * ID of the conversation from which we are fetching messages.
14
+ */
12
15
  conversationId: string;
13
16
  };
14
17
 
@@ -10,6 +10,9 @@ import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export type AgentsApiV1ConversationsRestartRequest = {
13
+ /**
14
+ * ID of the original conversation which is being restarted.
15
+ */
13
16
  conversationId: string;
14
17
  conversationRestartRequest: components.ConversationRestartRequest;
15
18
  };
@@ -10,6 +10,9 @@ import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export type AgentsApiV1ConversationsRestartStreamRequest = {
13
+ /**
14
+ * ID of the original conversation which is being restarted.
15
+ */
13
16
  conversationId: string;
14
17
  conversationRestartStreamRequest: components.ConversationRestartStreamRequest;
15
18
  };
package/src/sdk/models.ts CHANGED
@@ -33,7 +33,7 @@ export class Models extends ClientSDK {
33
33
  * Retrieve Model
34
34
  *
35
35
  * @remarks
36
- * Retrieve a model information.
36
+ * Retrieve information about a model.
37
37
  */
38
38
  async retrieve(
39
39
  request: operations.RetrieveModelV1ModelsModelIdGetRequest,