feat: Responses API documentation #538
Conversation
| <details> | ||
| <summary id="new-user-interface-v140">New User Interface (v1.4.0)</summary> | ||
|
|
||
| We're excited to introduce a new user interface for OpenAI responses calls starting with **version 1.4.0**. This update is designed to improve the SAP AI SDK by: | ||
|
|
||
| - **Decoupling Layers:** Separating the convenience layer from the model classes to deliver a more stable and maintainable experience. | ||
| - **Staying Current:** Making it easier for the SAP AI SDK to adapt to the latest changes in the OpenAI API specification. | ||
| - **Consistent Design:** Aligning with the Orchestrator convenience API for a smoother transition and easier adoption. | ||
|
|
||
| **Please Note:** | ||
|
|
||
| - The new interface is gradually being rolled out across the SAP AI SDK. | ||
| - We welcome your feedback to help us refine this interface. | ||
| - The existing interface (v1.0.0) is deprecated but available. | ||
|
|
||
| </details> |
There was a problem hiding this comment.
(Minor)
I don't think we need this info here anymore.
|
|
||
| <!-- prettier-ignore-end--> | ||
|
|
||
| ## Create a non-persistent response |
There was a problem hiding this comment.
(Major)
Please add a short sentence explaining what the code block does to each of the sections, like you did it for the bottom three.
| ```java | ||
| var responseClient = AiCoreOpenAiClient.forModel(GPT_5, "resource-group-name").responses(); | ||
|
|
||
| var params = ResponseCreateParams.builder().input("Hi, how are you?").model(ChatModel.GPT_5).store(false).build(); // set store to true when creating a persistent response |
There was a problem hiding this comment.
(Question)
Is there a reason why you use .model() here but not in the other examples? Which one has precedence in the end? I.e., if I use GPT_4 in the AiCoreOpenAiClient.forModel() and .model(ChatModel.GPT_5) here, which model is used? This should probably be noted to make it clear for users.
| var response = responseClient.create(params); | ||
| ``` | ||
|
|
||
| ## Create a streaming non-persistent response |
There was a problem hiding this comment.
(Question)
Would it make sense to also add an example for streaming+persistence?
|
|
||
| var params = ResponseDeleteParams.builder().responseId("response-id").build(); | ||
|
|
||
| var response = responseClient.delete(params); |
There was a problem hiding this comment.
delete() does not return a value.
| var response = responseClient.delete(params); | |
| responseClient.delete(params); |
| @@ -0,0 +1,181 @@ | |||
| --- | |||
| id: responses | |||
There was a problem hiding this comment.
(Major)
Please add the new file to the sidebarsDocsJava.js file so that is appears in the sidebar of the docs under Foundation Models > OpenAI.
What Has Changed?
[OpenAI] Beta: Release OpenAI Responses API documentation after maintaining stability concerns regarding supported endpoints.