This approach involves creating a ChatCompletionDelta which can be merged into another ChatCompletionDelta. This allows collecting a delta for each token, as it is streamed, and reducing them into a single completion which can then be converted into a regular ChatCompletion at the end of the request. See the example.
This PR resolves #30 (for Chat completions only)
This approach involves creating a
ChatCompletionDelta
which can be merged into anotherChatCompletionDelta
. This allows collecting a delta for each token, as it is streamed, and reducing them into a single completion which can then be converted into a regularChatCompletion
at the end of the request. See the example.