Closed as not planned
Description
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
- This is a feature request for the Node library
Describe the feature or improvement you're requesting
hello how to insert a file uploaded to openAI into a conversation?
const file = await client.files.create({
file: await fetch(url),
purpose: 'assistants'
})
console.log(file.id)
const stream = await client.chat.completions.create({
model: 'gpt-4.1',
stream: true,
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'what is file?' },
{ type: 'file', file_id: 'file-xxx' }
]
}
]
})
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || '')
}
res.end()
I am new to openAI, and where can I make questions like this in the future?
thanks
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels