@@ -56,7 +56,7 @@ const safetySettings: AxAIGoogleGeminiSafetySettings = [
5656export const axAIGoogleGeminiDefaultConfig = ( ) : AxAIGoogleGeminiConfig =>
5757 structuredClone ( {
5858 model : AxAIGoogleGeminiModel . Gemini15Pro ,
59- embedModel : AxAIGoogleGeminiEmbedModel . Embedding001 ,
59+ embedModel : AxAIGoogleGeminiEmbedModel . TextEmbedding004 ,
6060 safetySettings,
6161 ...axBaseAIDefaultConfig ( )
6262 } ) ;
@@ -65,7 +65,7 @@ export const axAIGoogleGeminiDefaultCreativeConfig =
6565 ( ) : AxAIGoogleGeminiConfig =>
6666 structuredClone ( {
6767 model : AxAIGoogleGeminiModel . Gemini15Flash ,
68- embedModel : AxAIGoogleGeminiEmbedModel . Embedding001 ,
68+ embedModel : AxAIGoogleGeminiEmbedModel . TextEmbedding004 ,
6969 safetySettings,
7070 ...axBaseAIDefaultCreativeConfig ( )
7171 } ) ;
@@ -345,11 +345,14 @@ export class AxAIGoogleGemini extends AxBaseAI<
345345 }
346346
347347 const apiConfig = {
348- name : `/models/${ model } :batchEmbedText ?key=${ this . apiKey } `
348+ name : `/models/${ model } :batchEmbedContents ?key=${ this . apiKey } `
349349 } ;
350350
351351 const reqValue : AxAIGoogleGeminiBatchEmbedRequest = {
352- requests : req . texts . map ( ( text ) => ( { model, text } ) )
352+ requests : req . texts . map ( ( text ) => ( {
353+ model : 'models/' + model ,
354+ content : { parts : [ { text } ] }
355+ } ) )
353356 } ;
354357
355358 return [ apiConfig , reqValue ] ;
0 commit comments