chore: Improve UX for Orchestration chat scenario#543
Merged
shibeshduw merged 25 commits intomainfrom May 6, 2025
Merged
Conversation
deekshas8
requested changes
Feb 17, 2025
deekshas8
requested changes
Feb 18, 2025
KavithaSiva
previously requested changes
Feb 21, 2025
Contributor
KavithaSiva
left a comment
There was a problem hiding this comment.
Mostly looks good, but I would prefer a test added with the a sample multiChat response.
ZhongpinWang
requested changes
Apr 25, 2025
deekshas8
previously requested changes
Apr 28, 2025
shibeshduw
commented
Apr 29, 2025
ZhongpinWang
approved these changes
May 5, 2025
ZhongpinWang
reviewed
May 6, 2025
Co-authored-by: Zhongpin Wang <zhongpin.wang@sap.com>
MatKuhr
reviewed
May 6, 2025
| const response: OrchestrationResponse = await orchestrationToolCalling(); | ||
| const allMessages: ChatMessages = response.getAllMessages(); | ||
| const initialResponse: AssistantChatMessage | undefined = | ||
| response.getAssistantMessage(); |
Member
There was a problem hiding this comment.
this would only be undefined, if there was a content filter hit, right? If so, maybe response.getAssistantMessage()! is clearer.
|
|
||
| return orchestrationClient( | ||
| [{ role: 'user', content: 'What is the corresponding roman numeral?' }], | ||
| addNumbersTool |
Member
There was a problem hiding this comment.
this tool is not really required for this request, right? For simplicity, maybe leave it out?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Closes SAP/ai-sdk-js-backlog#228.
What this PR does and why it is needed
Summary:
getAllMessages(),getAssistantMessages,getToolCalls()andgetRefusal().getAllMessages()to providemessageHistoryin subsequent chat completion requests.tool_callscan now be added to themessageHistoryon subsequent chat completion requests.Tested on intber landscape with latest spec: https://github.tools.sap/AI/llm-orchestration/blob/main/src/spec/api.yaml
Docs PR: SAP/ai-sdk#79