@@ -133,6 +133,7 @@ export class BooleanSchema extends Schema {
133
133
134
134
// @public
135
135
export class ChatSession {
136
+ // Warning: (ae-incompatible-release-tags) The symbol "__constructor" is marked as @public, but its signature references "ChromeAdapter" which is marked as @beta
136
137
constructor (apiSettings : ApiSettings , model : string , chromeAdapter ? : ChromeAdapter | undefined , params ? : StartChatParams | undefined , requestOptions ? : RequestOptions | undefined );
137
138
getHistory(): Promise <Content []>;
138
139
// (undocumented)
@@ -145,7 +146,7 @@ export class ChatSession {
145
146
sendMessageStream(request : string | Array <string | Part >): Promise <GenerateContentStreamResult >;
146
147
}
147
148
148
- // @public
149
+ // @beta
149
150
export interface ChromeAdapter {
150
151
// @internal (undocumented)
151
152
countTokens(request : CountTokensRequest ): Promise <Response >;
@@ -174,6 +175,39 @@ export interface CitationMetadata {
174
175
citations: Citation [];
175
176
}
176
177
178
+ // @public
179
+ export interface CodeExecutionResult {
180
+ outcome? : Outcome ;
181
+ output? : string ;
182
+ }
183
+
184
+ // @public
185
+ export interface CodeExecutionResultPart {
186
+ // (undocumented)
187
+ codeExecutionResult? : CodeExecutionResult ;
188
+ // (undocumented)
189
+ executableCode? : never ;
190
+ // (undocumented)
191
+ fileData: never ;
192
+ // (undocumented)
193
+ functionCall? : never ;
194
+ // (undocumented)
195
+ functionResponse? : never ;
196
+ // (undocumented)
197
+ inlineData? : never ;
198
+ // (undocumented)
199
+ text? : never ;
200
+ // (undocumented)
201
+ thought? : never ;
202
+ // @internal (undocumented)
203
+ thoughtSignature? : never ;
204
+ }
205
+
206
+ // @public
207
+ export interface CodeExecutionTool {
208
+ codeExecution: {};
209
+ }
210
+
177
211
// @public
178
212
export interface Content {
179
213
// (undocumented)
@@ -237,6 +271,34 @@ export interface ErrorDetails {
237
271
reason? : string ;
238
272
}
239
273
274
+ // @public
275
+ export interface ExecutableCode {
276
+ code? : string ;
277
+ language? : Language ;
278
+ }
279
+
280
+ // @public
281
+ export interface ExecutableCodePart {
282
+ // (undocumented)
283
+ codeExecutionResult? : never ;
284
+ // (undocumented)
285
+ executableCode? : ExecutableCode ;
286
+ // (undocumented)
287
+ fileData: never ;
288
+ // (undocumented)
289
+ functionCall? : never ;
290
+ // (undocumented)
291
+ functionResponse? : never ;
292
+ // (undocumented)
293
+ inlineData? : never ;
294
+ // (undocumented)
295
+ text? : never ;
296
+ // (undocumented)
297
+ thought? : never ;
298
+ // @internal (undocumented)
299
+ thoughtSignature? : never ;
300
+ }
301
+
240
302
// @public
241
303
export interface FileData {
242
304
// (undocumented)
@@ -247,6 +309,10 @@ export interface FileData {
247
309
248
310
// @public
249
311
export interface FileDataPart {
312
+ // (undocumented)
313
+ codeExecutionResult? : never ;
314
+ // (undocumented)
315
+ executableCode? : never ;
250
316
// (undocumented)
251
317
fileData: FileData ;
252
318
// (undocumented)
@@ -308,6 +374,10 @@ export type FunctionCallingMode = (typeof FunctionCallingMode)[keyof typeof Func
308
374
309
375
// @public
310
376
export interface FunctionCallPart {
377
+ // (undocumented)
378
+ codeExecutionResult? : never ;
379
+ // (undocumented)
380
+ executableCode? : never ;
311
381
// (undocumented)
312
382
functionCall: FunctionCall ;
313
383
// (undocumented)
@@ -345,6 +415,10 @@ export interface FunctionResponse {
345
415
346
416
// @public
347
417
export interface FunctionResponsePart {
418
+ // (undocumented)
419
+ codeExecutionResult? : never ;
420
+ // (undocumented)
421
+ executableCode? : never ;
348
422
// (undocumented)
349
423
functionCall? : never ;
350
424
// (undocumented)
@@ -447,6 +521,7 @@ export interface GenerativeContentBlob {
447
521
448
522
// @public
449
523
export class GenerativeModel extends AIModel {
524
+ // Warning: (ae-incompatible-release-tags) The symbol "__constructor" is marked as @public, but its signature references "ChromeAdapter" which is marked as @beta
450
525
constructor (ai : AI , modelParams : ModelParams , requestOptions ? : RequestOptions , chromeAdapter ? : ChromeAdapter | undefined );
451
526
countTokens(request : CountTokensRequest | string | Array <string | Part >): Promise <CountTokensResponse >;
452
527
generateContent(request : GenerateContentRequest | string | Array <string | Part >): Promise <GenerateContentResult >;
@@ -469,6 +544,8 @@ export class GenerativeModel extends AIModel {
469
544
// @public
470
545
export function getAI(app ? : FirebaseApp , options ? : AIOptions ): AI ;
471
546
547
+ // Warning: (ae-incompatible-release-tags) The symbol "getGenerativeModel" is marked as @public, but its signature references "HybridParams" which is marked as @beta
548
+ //
472
549
// @public
473
550
export function getGenerativeModel(ai : AI , modelParams : ModelParams | HybridParams , requestOptions ? : RequestOptions ): GenerativeModel ;
474
551
@@ -622,7 +699,7 @@ export const HarmSeverity: {
622
699
// @public
623
700
export type HarmSeverity = (typeof HarmSeverity )[keyof typeof HarmSeverity ];
624
701
625
- // @public
702
+ // @beta
626
703
export interface HybridParams {
627
704
inCloudParams? : ModelParams ;
628
705
mode: InferenceMode ;
@@ -722,19 +799,23 @@ export interface ImagenSafetySettings {
722
799
safetyFilterLevel? : ImagenSafetyFilterLevel ;
723
800
}
724
801
725
- // @public
802
+ // @beta
726
803
export const InferenceMode: {
727
804
readonly PREFER_ON_DEVICE: " prefer_on_device" ;
728
805
readonly ONLY_ON_DEVICE: " only_on_device" ;
729
806
readonly ONLY_IN_CLOUD: " only_in_cloud" ;
730
807
readonly PREFER_IN_CLOUD: " prefer_in_cloud" ;
731
808
};
732
809
733
- // @public
810
+ // @beta
734
811
export type InferenceMode = (typeof InferenceMode )[keyof typeof InferenceMode ];
735
812
736
813
// @public
737
814
export interface InlineDataPart {
815
+ // (undocumented)
816
+ codeExecutionResult? : never ;
817
+ // (undocumented)
818
+ executableCode? : never ;
738
819
// (undocumented)
739
820
functionCall? : never ;
740
821
// (undocumented)
@@ -756,6 +837,15 @@ export class IntegerSchema extends Schema {
756
837
}
757
838
758
839
// @public
840
+ export const Language: {
841
+ UNSPECIFIED: string ;
842
+ PYTHON: string ;
843
+ };
844
+
845
+ // @public
846
+ export type Language = (typeof Language )[keyof typeof Language ];
847
+
848
+ // @beta
759
849
export interface LanguageModelCreateCoreOptions {
760
850
// (undocumented)
761
851
expectedInputs? : LanguageModelExpected [];
@@ -765,48 +855,48 @@ export interface LanguageModelCreateCoreOptions {
765
855
topK? : number ;
766
856
}
767
857
768
- // @public
858
+ // @beta
769
859
export interface LanguageModelCreateOptions extends LanguageModelCreateCoreOptions {
770
860
// (undocumented)
771
861
initialPrompts? : LanguageModelMessage [];
772
862
// (undocumented)
773
863
signal? : AbortSignal ;
774
864
}
775
865
776
- // @public
866
+ // @beta
777
867
export interface LanguageModelExpected {
778
868
// (undocumented)
779
869
languages? : string [];
780
870
// (undocumented)
781
871
type: LanguageModelMessageType ;
782
872
}
783
873
784
- // @public
874
+ // @beta
785
875
export interface LanguageModelMessage {
786
876
// (undocumented)
787
877
content: LanguageModelMessageContent [];
788
878
// (undocumented)
789
879
role: LanguageModelMessageRole ;
790
880
}
791
881
792
- // @public
882
+ // @beta
793
883
export interface LanguageModelMessageContent {
794
884
// (undocumented)
795
885
type: LanguageModelMessageType ;
796
886
// (undocumented)
797
887
value: LanguageModelMessageContentValue ;
798
888
}
799
889
800
- // @public
890
+ // @beta
801
891
export type LanguageModelMessageContentValue = ImageBitmapSource | AudioBuffer | BufferSource | string ;
802
892
803
- // @public
893
+ // @beta
804
894
export type LanguageModelMessageRole = ' system' | ' user' | ' assistant' ;
805
895
806
- // @public
896
+ // @beta
807
897
export type LanguageModelMessageType = ' text' | ' image' | ' audio' ;
808
898
809
- // @public
899
+ // @beta
810
900
export interface LanguageModelPromptOptions {
811
901
// (undocumented)
812
902
responseConstraint? : object ;
@@ -960,7 +1050,7 @@ export interface ObjectSchemaRequest extends SchemaRequest {
960
1050
type: ' object' ;
961
1051
}
962
1052
963
- // @public
1053
+ // @beta
964
1054
export interface OnDeviceParams {
965
1055
// (undocumented)
966
1056
createOptions? : LanguageModelCreateOptions ;
@@ -969,7 +1059,18 @@ export interface OnDeviceParams {
969
1059
}
970
1060
971
1061
// @public
972
- export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart ;
1062
+ export const Outcome: {
1063
+ UNSPECIFIED: string ;
1064
+ OK: string ;
1065
+ FAILED: string ;
1066
+ DEADLINE_EXCEEDED: string ;
1067
+ };
1068
+
1069
+ // @public
1070
+ export type Outcome = (typeof Outcome )[keyof typeof Outcome ];
1071
+
1072
+ // @public
1073
+ export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart | ExecutableCodePart | CodeExecutionResultPart ;
973
1074
974
1075
// @public
975
1076
export const POSSIBLE_ROLES: readonly [" user" , " model" , " function" , " system" ];
@@ -1179,6 +1280,10 @@ export class StringSchema extends Schema {
1179
1280
1180
1281
// @public
1181
1282
export interface TextPart {
1283
+ // (undocumented)
1284
+ codeExecutionResult? : never ;
1285
+ // (undocumented)
1286
+ executableCode? : never ;
1182
1287
// (undocumented)
1183
1288
functionCall? : never ;
1184
1289
// (undocumented)
@@ -1200,7 +1305,7 @@ export interface ThinkingConfig {
1200
1305
}
1201
1306
1202
1307
// @public
1203
- export type Tool = FunctionDeclarationsTool | GoogleSearchTool ;
1308
+ export type Tool = FunctionDeclarationsTool | GoogleSearchTool | CodeExecutionTool ;
1204
1309
1205
1310
// @public
1206
1311
export interface ToolConfig {
0 commit comments