generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 18
feat: [OpenAI] Full Tool call Convenience #396
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
1662ae7
Tool call full e2e unverified
rpanackal 9ef8e6f
CI
rpanackal ef9bdc4
Reuse tool
rpanackal fd6acdc
Remove unnecessary line inserts
rpanackal a6a209b
Create schema with jackson
rpanackal 9ad7225
Merge remote-tracking branch 'refs/remotes/origin/main' into test/ope…
rpanackal 9a5aec3
First version
rpanackal 275eee5
Formatting
bot-sdk-js ad9ef65
Testing and javadocs
rpanackal e70eb29
improve test clarity
rpanackal a13b183
Merge remote-tracking branch 'refs/remotes/origin/main' into test/ope…
rpanackal 03a14a4
Merge branch 'refs/heads/test/openai/tool-call-execute' into feat/ope…
rpanackal bf2ce11
Remove strict tool invocation config
rpanackal f74a0a7
Merge branch 'refs/heads/test/openai/tool-call-execute' into feat/ope…
rpanackal 698eab8
Fix maven dependency scope issue
rpanackal f694f40
Fix maven dependency scope issue + 1
rpanackal 4e388e2
Merge branch 'refs/heads/test/openai/tool-call-execute' into feat/ope…
rpanackal 78aa10e
Refactor. toolCalls get dedicated field in assistant message
rpanackal 49b8be4
minor fixes
rpanackal 78c2909
Merge branch 'refs/heads/test/openai/tool-call-execute' into feat/ope…
rpanackal 05d6218
minor fixes
rpanackal 23a247a
Test message list in request externally unmodifiable
rpanackal 4642de0
Test message list in request externally unmodifiable
rpanackal 96647f5
minor javadoc update
rpanackal f8ee9d4
Merge remote-tracking branch 'refs/remotes/origin/main' into feat/ope…
rpanackal bf7d86a
Remove sample app changes
rpanackal 26b7dae
@beta annotation
rpanackal f616263
Update foundation-models/openai/src/main/java/com/sap/ai/sdk/foundati…
rpanackal cd11f37
Apply suggestions from code review
rpanackal b95b960
update getMessage method impl readability
rpanackal 9062e3a
Move test to generated client test class
rpanackal 69b49ea
Extend tests
rpanackal d26ecbf
Reduce test
rpanackal 40f1e22
Refactor test
rpanackal bd61ce2
Formatting
bot-sdk-js d440c28
import statement
rpanackal c6969f4
Merge branch 'refs/heads/main' into feat/openai/tool-call-execute
rpanackal a36bef0
Merge branch 'feat/openai/tool-call-execute' of https://github.com/SA…
rpanackal 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
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
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
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
25 changes: 25 additions & 0 deletions
25
...s/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiFunctionCallItem.java
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,25 @@ | ||
| package com.sap.ai.sdk.foundationmodels.openai; | ||
|
|
||
| import com.google.common.annotations.Beta; | ||
| import javax.annotation.Nonnull; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Value; | ||
|
|
||
| /** | ||
| * Represents a function type tool call suggested by an OpenAI model. | ||
| * | ||
| * @since 1.6.0 | ||
| */ | ||
| @Beta | ||
| @Value | ||
| @AllArgsConstructor(access = lombok.AccessLevel.PACKAGE) | ||
| public class OpenAiFunctionCallItem implements OpenAiToolCallItem { | ||
| /** The unique identifier for the function call. */ | ||
| @Nonnull String id; | ||
|
|
||
| /** The name of the function to be called. */ | ||
| @Nonnull String name; | ||
|
|
||
| /** The arguments for the function call, encoded as a JSON string. */ | ||
| @Nonnull String arguments; | ||
| } |
9 changes: 9 additions & 0 deletions
9
...odels/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiToolCallItem.java
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,9 @@ | ||
| package com.sap.ai.sdk.foundationmodels.openai; | ||
|
|
||
| /** | ||
| * Represents a tool call suggested by an OpenAI model. | ||
| * | ||
| * @since 1.6.0 | ||
| */ | ||
| public sealed interface OpenAiToolCallItem extends OpenAiContentItem | ||
| permits OpenAiFunctionCallItem {} |
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
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
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
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.
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.
Uh oh!
There was an error while loading. Please reload this page.