-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Orchestration image support #294
base: main
Are you sure you want to change the base?
Conversation
orchestration/src/main/java/com/sap/ai/sdk/orchestration/Message.java
Outdated
Show resolved
Hide resolved
orchestration/src/main/java/com/sap/ai/sdk/orchestration/UserMessage.java
Show resolved
Hide resolved
orchestration/src/main/java/com/sap/ai/sdk/orchestration/UserMessage.java
Outdated
Show resolved
Hide resolved
orchestration/src/main/java/com/sap/ai/sdk/orchestration/UserMessage.java
Outdated
Show resolved
Hide resolved
orchestration/src/main/java/com/sap/ai/sdk/orchestration/MessageContent.java
Outdated
Show resolved
Hide resolved
orchestration/src/main/java/com/sap/ai/sdk/orchestration/MessageContentMulti.java
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
orchestration/src/main/java/com/sap/ai/sdk/orchestration/UserMessage.java
Outdated
Show resolved
Hide resolved
orchestration/src/main/java/com/sap/ai/sdk/orchestration/Message.java
Outdated
Show resolved
Hide resolved
orchestration/src/main/java/com/sap/ai/sdk/orchestration/UserMessage.java
Outdated
Show resolved
Hide resolved
default ChatMessagesInner createChatMessage() { | ||
if (this.getContent() instanceof MessageContentSingle) { | ||
return ChatMessage.create().role(role()).content(content()); | ||
} else if (this.getContent() instanceof MessageContentMulti mCMulti) { | ||
if (this.content() instanceof MessageContentSingle) { |
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.
(Minor/Opinion)
I think it's a mistake to have this method on public API.
Maybe we could address this in another PR.
orchestration/src/main/java/com/sap/ai/sdk/orchestration/SystemMessage.java
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
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.
I want to explain my assumptions for convenience API behavior / contract.
-
For request:
- the user will only use public constructors and factory methods for easy instantiation.
- low API hierarchy requirement; we'll try to avoid users to define helper classes.
- strict value checking on design time; only allow what's aligned in spec.
-
For responses:
- developer uses public accessors.
- while casting may be necessary, let's try to minimalize the effort.
- hierarchy can be high as long as it's reasonable.
- loose value checking; whatever is sent back from server can be read with our API.
Co-authored-by: Charles Dubois <[email protected]>
Context
AI/ai-sdk-java-backlog#152.
We want to support using images and prompts with multiple text messages as input for Orchestration.
Feature scope:
Definition of Done
Aligned changes with the JavaScript SDK