@chinmaymk/aikit / openaiEmbeddings
Function: openaiEmbeddings()
openaiEmbeddings(
config
,texts
):Promise
<EmbeddingResponse
>
Defined in: providers/openai_embeddings.ts:61
Direct OpenAI embeddings function - no configuration step needed
Parameters
config
WithApiKey
<OpenAIEmbeddingOptions
>
texts
string
[]
Returns
Promise
<EmbeddingResponse
>
Example
typescript
const result = await openaiEmbeddings(
{ apiKey: '...', model: 'text-embedding-3-small' },
['Hello world']
);