Skip to content

@chinmaymk/aikit v0.0.40


@chinmaymk/aikit / createOpenAIEmbeddings

Function: createOpenAIEmbeddings()

createOpenAIEmbeddings(options): OpenAIEmbeddingProvider

Defined in: factory.ts:138

Creates an OpenAI embedding provider.

Parameters

options

WithApiKey<OpenAIEmbeddingOptions>

Configuration options with required API key

Returns

OpenAIEmbeddingProvider

OpenAI embedding provider function

Example

typescript
const embeddings = createOpenAIEmbeddings({
  apiKey: 'sk-...',
  model: 'text-embedding-3-large',
  dimensions: 1024
});

Released under the MIT License.