You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, due to how delta is handled in streams, we were forced to implement breaking changes for ALL users who used streams, and all users who used gson to save their conversations to json. Since this effectively means that all production level users were effected, we decided now was a perfect time to completely recode the API.
See the examples for implementations of streams and tools.
Now, instead of using the consumer format, we use a "blocking iterable." This allows very easy syntax:
for (ChatResponseChunkchunk : openai.streamChatCompletion(request)) {
Stringdelta = chunk.get(0).getDeltaContent();
if (delta != null)
System.out.print(delta);
// When the response is finished, we can add it to the messages list.if (chunk.get(0).isFinished())
messages.add(chunk.get(0).getMessage());
}
We also have full support for functions! Try them out.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Unfortunately, due to how
deltais handled in streams, we were forced to implement breaking changes for ALL users who used streams, and all users who used gson to save their conversations to json. Since this effectively means that all production level users were effected, we decided now was a perfect time to completely recode the API.See the examples for implementations of streams and tools.
Now, instead of using the consumer format, we use a "blocking iterable." This allows very easy syntax:
We also have full support for functions! Try them out.
All reactions