Open
Description
Contact Details(optional)
No response
What is the issue you are having?
It seems like when using OpenAI JavaScript SDK, this project won't work as expected.
Code:
import OpenAI from 'openai';
const client = new OpenAI({ apiKey: 'test-api-key', baseURL: 'http://localhost:8000/v1/' });
async function completions() {
const stream = await client.chat.completions.create({stream: true, messages: [{role:'user', content: 'hello'}]});
for await (const chunk of stream) {
console.log(chunk.choices[0].delta.content);
}
console.log("Finished Response");
}
completions();
// Console output: Finished Response
And although the engine got response normally, the receiver doesn't received the chunk output.
Relevant log output
No response