-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orchestration streaming #227
Conversation
* content_filter | ||
*/ | ||
@Nonnull | ||
public Stream<String> streamChatCompletion( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Comment)
New method names match the existing OpenAiClient
counter-part in openai
module.
} | ||
return IterableStreamConverter.lines(response.getEntity()) | ||
// half of the lines are empty newlines, the last line is "data: [DONE]" | ||
.peek(line -> log.info("Handler: {}", line)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Comment)
I'm surprised we have so many info
log statements. I feel like we could define a coding guideline when to use what log level.
(no action required.)
orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java
Outdated
Show resolved
Hide resolved
orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java
Show resolved
Hide resolved
# Conflicts: # docs/guides/ORCHESTRATION_CHAT_COMPLETION.md
Context
AI/ai-sdk-java-backlog#71.
As an orchestration user I want to stream responses, similarly to streaming when using OpenAI
Feature scope:
streamChatCompletionDeltas()
andstreamChatCompletion()
to theOrchestrationClient
Definition of Done
Aligned changes with the JavaScript SDK