Skip to content

Commit b66ef0a

Browse files
docs: [OpenAI] Minor fix - version of latest tool features in javadoc (#443)
* Improve javadoc and corrected version * minor fix * Formatting * formatting * Paraphrase --------- Co-authored-by: Roshin Rajan Panackal <[email protected]> Co-authored-by: SAP Cloud SDK Bot <[email protected]>
1 parent c95a5b4 commit b66ef0a

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiChatCompletionRequest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,18 @@ public class OpenAiChatCompletionRequest {
123123
/** Response format for the completion. */
124124
@Nullable CreateChatCompletionRequestAllOfResponseFormat responseFormat;
125125

126-
/** List of tools that the model may invoke during the completion. */
126+
/**
127+
* Tools the model may invoke during chat completion (metadata only).
128+
*
129+
* <p>Use {@link #withToolsExecutable} for registering executable tools.
130+
*/
127131
@Nullable List<ChatCompletionTool> tools;
128132

129133
/**
130-
* List of tools that are executable at runtime of the application.
134+
* Tools the model may invoke during chat completion that are also executable at application
135+
* runtime.
131136
*
132-
* @since 1.7.0
137+
* @since 1.8.0
133138
*/
134139
@Getter(value = AccessLevel.PACKAGE)
135140
@Nullable

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiChatCompletionResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public OpenAiAssistantMessage getMessage() {
108108
*
109109
* @return the list of tool messages that were serialized for the computed results. Empty list if
110110
* no tools were called.
111+
* @since 1.8.0
111112
*/
112113
@Nonnull
113114
public List<OpenAiToolMessage> executeTools() {

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiTool.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* function's request structure.
4040
*
4141
* @see <a href="https://platform.openai.com/docs/guides/gpt/function-calling"/>OpenAI Function
42-
* @since 1.7.0
42+
* @since 1.8.0
4343
*/
4444
@Slf4j
4545
@Beta
@@ -157,8 +157,9 @@ private static SchemaGenerator createSchemaGenerator() {
157157
}
158158

159159
/**
160-
* Executes the given tool calls with the provided tools and returns the results as a list of
161-
* {@link OpenAiToolMessage} containing execution results encoded as JSON string.
160+
* Executes each tool call found in the specified assistant message using the provided tools.
161+
* Returns a list of {@link OpenAiToolMessage} objects, each containing the execution result
162+
* encoded as a JSON string.
162163
*
163164
* @param tools the list of tools to execute
164165
* @param msg the assistant message containing a list of tool calls with arguments
@@ -179,8 +180,8 @@ static List<OpenAiToolMessage> execute(
179180
}
180181

181182
/**
182-
* Executes the given tool calls with the provided tools and returns the results as a list of
183-
* {@link OpenAiToolMessage} containing execution results encoded as JSON string.
183+
* Executes each tool call found in the specified assistant message using the provided tools.
184+
* Returns a map that links each executed tool call to its corresponding result.
184185
*
185186
* @param tools the list of tools to execute
186187
* @param msg the assistant message containing a list of tool calls with arguments

0 commit comments

Comments
 (0)