-
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
Changes from all commits
1662ae7
9ef8e6f
ef9bdc4
fd6acdc
a6a209b
9ad7225
9a5aec3
275eee5
ad9ef65
e70eb29
a13b183
03a14a4
bf2ce11
f74a0a7
698eab8
f694f40
4e388e2
78aa10e
49b8be4
78c2909
05d6218
23a247a
4642de0
96647f5
f8ee9d4
bf7d86a
26b7dae
f616263
cd11f37
b95b960
9062e3a
69b49ea
d26ecbf
40f1e22
bd61ce2
d440c28
c6969f4
a36bef0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 called by an OpenAI model. | ||
| * | ||
| * @since 1.6.0 | ||
| */ | ||
| @Beta | ||
| @Value | ||
| @AllArgsConstructor(access = lombok.AccessLevel.PACKAGE) | ||
| public class OpenAiFunctionCall implements OpenAiToolCall { | ||
| /** 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; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Question) I'm not sure. Is this supposed to be a convenience class? If yes, how is "String" convenient to access arguments "encoded as a JSON"? Or is it not expected to be consumed by users?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had only considered deserializing directly into the corresponding user provided model class. I ruled out this convenience because we don't have guarantees on their deserializability. But, it is a possibility to parse it into a json object. We could provide this convenience. Is that what you are pointing at?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed, we would provide additional convenience in a separate PR. |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.sap.ai.sdk.foundationmodels.openai; | ||
|
|
||
| import com.google.common.annotations.Beta; | ||
|
|
||
| /** | ||
| * Represents a tool called by an OpenAI model. | ||
| * | ||
| * @since 1.6.0 | ||
| */ | ||
| @Beta | ||
| public sealed interface OpenAiToolCall permits OpenAiFunctionCall {} |
Uh oh!
There was an error while loading. Please reload this page.