-
Notifications
You must be signed in to change notification settings - Fork 56
fix: Auto-route tool call results to messages_history #1967
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
Draft
emincihangeri
wants to merge
58
commits into
main
Choose a base branch
from
investigate/tool-result-prompt-templating
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
e6e7467
fix: Auto-route tool call results to messages_history
emincihangeri a78b377
Merge branch 'main' into investigate/tool-result-prompt-templating
emincihangeri 02e73cb
chore: Fix lint
emincihangeri 0170e97
Update packages/orchestration/src/util/module-config.ts
emincihangeri 9772061
chore: Add changeset
emincihangeri 4711464
Merge branch 'main' into investigate/tool-result-prompt-templating
emincihangeri ba033a7
chore: Enable ES2023 array methods in tsconfig
emincihangeri b733f83
Update tsconfig.json
emincihangeri 06831ae
fix: address review comments and add message order tests
InjunPark-sap 889db2c
fix: Changes from lint
sap-ai-sdk-bot[bot] 00deb0c
Apply suggestions from code review
InjunPark-sap 7c91e68
apply feedbacks from david
InjunPark-sap 1d87214
fix: disable auto-routing when static prompt template is present
InjunPark-sap 3022bfd
fix: also disable auto-routing when prompt has tools but no template
InjunPark-sap 937d6d2
fix: extract split logic, skip routing when placeholder values are set
InjunPark-sap 7615e45
chore: merge main and resolve tsconfig conflict
InjunPark-sap 8f49bad
fix: add missing JSDoc params to getMessageSplitIndex
InjunPark-sap e02c07d
fix: add lib es2023 to tsconfig.base.json for findLastIndex support
InjunPark-sap a18ed9b
fix: Changes from lint
sap-ai-sdk-bot[bot] eb5dd48
fix: omit messages key entirely when no remaining messages
InjunPark-sap 6d23c8b
Apply suggestions from code review
InjunPark-sap 92d4897
fix: Changes from lint
sap-ai-sdk-bot[bot] 2f31031
fix after david's feedback
InjunPark-sap 22317d3
fix: Changes from lint
sap-ai-sdk-bot[bot] 1b2f993
fix for ci
InjunPark-sap 16c7c95
fix ci error
InjunPark-sap 8cf9a2d
fix ci error
InjunPark-sap 6048e39
fix ci error(grammar on yummy-ducks-run
InjunPark-sap 9408eee
Merge branch 'main' into investigate/tool-result-prompt-templating
davidkna-sap 64a6c63
Update packages/orchestration/src/util/module-config.ts
InjunPark-sap 2901e34
fix: replace getMessageSplitIndex with shouldRouteMessagesToHistory b…
InjunPark-sap dca1ea8
Merge branch 'main' into investigate/tool-result-prompt-templating
InjunPark-sap 424b462
fix: Changes from lint
sap-ai-sdk-bot[bot] f70451d
fix: ensure prompt exists in config when cache_control is used
InjunPark-sap 415e1dd
fix: ensure cache_control messages stay in prompt.template
InjunPark-sap f15904d
fix: address david feedback on cache_control and TemplateRef routing
InjunPark-sap 1b81ddd
Merge branch 'main' into investigate/tool-result-prompt-templating
InjunPark-sap 780ad79
fix: rename messages to messageList to avoid variable shadowing in ca…
InjunPark-sap 47d835e
Merge branch 'main' into investigate/tool-result-prompt-templating
InjunPark-sap 8dc69d7
Update packages/orchestration/src/util/module-config.ts
InjunPark-sap 2f1c629
fix: Changes from lint
sap-ai-sdk-bot[bot] 4ee6f52
fix: prevent message duplication and respect placeholderValues before…
InjunPark-sap 30286d2
fix: restore prompt template initialization and align unit tests with…
InjunPark-sap 2d73010
fix: Changes from lint
sap-ai-sdk-bot[bot] 4b4b4b6
fix: restore prompt initialization order and align tests with service…
InjunPark-sap 1320ac5
fix: allow empty messages array, only throw when messages is undefined
InjunPark-sap 2de8093
fix: use splitIndex routing to bypass templating for tool results
InjunPark-sap 96c2af2
fix: Changes from lint
sap-ai-sdk-bot[bot] 2f5d648
fix: pass empty messages array instead of removing when all messages …
InjunPark-sap 831828a
fix: omit empty prompt.template when all messages are routed to history
InjunPark-sap 826f5f6
fix: only route to history when there are messages after the last too…
InjunPark-sap 76a54cd
fix: replace splitIndex with shouldRouteMessagesToHistory and add too…
InjunPark-sap a2a10e0
fix: fix JSDoc indentation and skip routing when prompt.tools is present
InjunPark-sap 3fe1785
Merge branch 'main' into investigate/tool-result-prompt-templating
InjunPark-sap cce280b
Apply suggestions from code review
InjunPark-sap 73d0fdd
apply feedbacks
InjunPark-sap 8de127f
fix: Changes from generation
sap-ai-sdk-bot[bot] cfbaa42
Merge branch 'main' into investigate/tool-result-prompt-templating
InjunPark-sap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@sap-ai-sdk/orchestration': patch | ||
| --- | ||
|
|
||
| [Fix] Automatically route `messages` to `messages_history` to bypass prompt templating when no `prompt` is configured or a `TemplateRef` is used. | ||
| Routing is skipped when `placeholderValues` are provided or a prompt with `template` or `tools` is set. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
[req] Make sure this is up to date.
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.
Updated