Skip to content

@chinmaymk/aikit v0.0.40


@chinmaymk/aikit / googleEmbeddings

Function: googleEmbeddings()

googleEmbeddings(config, texts): Promise<EmbeddingResponse>

Defined in: providers/google_embeddings.ts:73

Direct Google embeddings function - no configuration step needed

Parameters

config

WithApiKey<GoogleEmbeddingOptions>

texts

string[]

Returns

Promise<EmbeddingResponse>

Example

typescript
const result = await googleEmbeddings(
  { apiKey: '...', model: 'text-embedding-004', taskType: 'SEMANTIC_SIMILARITY' },
  ['Hello world']
);

Released under the MIT License.