@chinmaymk/aikit / openai
Function: openai()
openai(
messages,config):AsyncIterable<StreamChunk>
Defined in: providers/openai_completions.ts:67
Direct OpenAI function - no configuration step needed
Parameters
messages
Message[]
config
Returns
AsyncIterable<StreamChunk>
Example
typescript
const result = await collectDeltas(
openai({ apiKey: '...', model: 'gpt-4o' }, [userText('Hello')])
);