@@ -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,18 +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" ;
807
+ readonly PREFER_IN_CLOUD: " prefer_in_cloud" ;
730
808
};
731
809
732
- // @public
810
+ // @beta
733
811
export type InferenceMode = (typeof InferenceMode )[keyof typeof InferenceMode ];
734
812
735
813
// @public
736
814
export interface InlineDataPart {
815
+ // (undocumented)
816
+ codeExecutionResult? : never ;
817
+ // (undocumented)
818
+ executableCode? : never ;
737
819
// (undocumented)
738
820
functionCall? : never ;
739
821
// (undocumented)
@@ -755,6 +837,15 @@ export class IntegerSchema extends Schema {
755
837
}
756
838
757
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
758
849
export interface LanguageModelCreateCoreOptions {
759
850
// (undocumented)
760
851
expectedInputs? : LanguageModelExpected [];
@@ -764,48 +855,48 @@ export interface LanguageModelCreateCoreOptions {
764
855
topK? : number ;
765
856
}
766
857
767
- // @public
858
+ // @beta
768
859
export interface LanguageModelCreateOptions extends LanguageModelCreateCoreOptions {
769
860
// (undocumented)
770
861
initialPrompts? : LanguageModelMessage [];
771
862
// (undocumented)
772
863
signal? : AbortSignal ;
773
864
}
774
865
775
- // @public
866
+ // @beta
776
867
export interface LanguageModelExpected {
777
868
// (undocumented)
778
869
languages? : string [];
779
870
// (undocumented)
780
871
type: LanguageModelMessageType ;
781
872
}
782
873
783
- // @public
874
+ // @beta
784
875
export interface LanguageModelMessage {
785
876
// (undocumented)
786
877
content: LanguageModelMessageContent [];
787
878
// (undocumented)
788
879
role: LanguageModelMessageRole ;
789
880
}
790
881
791
- // @public
882
+ // @beta
792
883
export interface LanguageModelMessageContent {
793
884
// (undocumented)
794
885
type: LanguageModelMessageType ;
795
886
// (undocumented)
796
887
value: LanguageModelMessageContentValue ;
797
888
}
798
889
799
- // @public
890
+ // @beta
800
891
export type LanguageModelMessageContentValue = ImageBitmapSource | AudioBuffer | BufferSource | string ;
801
892
802
- // @public
893
+ // @beta
803
894
export type LanguageModelMessageRole = ' system' | ' user' | ' assistant' ;
804
895
805
- // @public
896
+ // @beta
806
897
export type LanguageModelMessageType = ' text' | ' image' | ' audio' ;
807
898
808
- // @public
899
+ // @beta
809
900
export interface LanguageModelPromptOptions {
810
901
// (undocumented)
811
902
responseConstraint? : object ;
@@ -959,7 +1050,7 @@ export interface ObjectSchemaRequest extends SchemaRequest {
959
1050
type: ' object' ;
960
1051
}
961
1052
962
- // @public
1053
+ // @beta
963
1054
export interface OnDeviceParams {
964
1055
// (undocumented)
965
1056
createOptions? : LanguageModelCreateOptions ;
@@ -968,7 +1059,18 @@ export interface OnDeviceParams {
968
1059
}
969
1060
970
1061
// @public
971
- 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 ;
972
1074
973
1075
// @public
974
1076
export const POSSIBLE_ROLES: readonly [" user" , " model" , " function" , " system" ];
@@ -1178,6 +1280,10 @@ export class StringSchema extends Schema {
1178
1280
1179
1281
// @public
1180
1282
export interface TextPart {
1283
+ // (undocumented)
1284
+ codeExecutionResult? : never ;
1285
+ // (undocumented)
1286
+ executableCode? : never ;
1181
1287
// (undocumented)
1182
1288
functionCall? : never ;
1183
1289
// (undocumented)
@@ -1199,7 +1305,7 @@ export interface ThinkingConfig {
1199
1305
}
1200
1306
1201
1307
// @public
1202
- export type Tool = FunctionDeclarationsTool | GoogleSearchTool ;
1308
+ export type Tool = FunctionDeclarationsTool | GoogleSearchTool | CodeExecutionTool ;
1203
1309
1204
1310
// @public
1205
1311
export interface ToolConfig {
0 commit comments