Anyone implemented the <open.ai> Assistants API wi...
# cfml-general
s
Anyone implemented the open.ai Assistants API with CF using streaming? Have it working without streaming but the speed of getting data back to the screen leaves a lot to be desired but not sure where to start to be able to use streaming. Thanks!
b
Working on the same thing and streaming responses have a much higher failure rate than ansync/non-streaming responses. My use case doesn't require real-time, on-screen responses, so I simply avoided that route due to the high failure rate. I hope it improves over time, but given how much the Assistants API changed between v1 and v2, I'm not sure robustness of the streaming responses is a high priority.
👍 1
c
I assume you mean CFML directly? If you can use Javascript or UI is Javascript based, can you use SSE (https://github.com/openai/openai-node/issues/18#issuecomment-1366632900 and https://www.bennadel.com/blog/4359-eventsource-and-generating-server-sent-events-in-coldfusion-lucee-cfml.htm ) ? Otherwise, I imagine you'd have to use a Java library since it seems OpenAI streaming is via SSE (https://cookbook.openai.com/examples/how_to_stream_completions)?
👍 1
s
Thanks for the feedback, both are helpful. Good to know about the failure rates too.