-
Notifications
You must be signed in to change notification settings - Fork 164
release: 0.17.0 #179
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
stainless-app
merged 2 commits into
main
from
release-please--branches--main--changes--next
Jan 29, 2025
Merged
release: 0.17.0 #179
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.16.0" | ||
".": "0.17.0" | ||
} |
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
16 changes: 16 additions & 0 deletions
16
openai-java-core/src/main/kotlin/com/openai/core/Params.kt
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,16 @@ | ||
package com.openai.core | ||
|
||
import com.openai.core.http.Headers | ||
import com.openai.core.http.QueryParams | ||
|
||
/** An interface representing parameters passed to a service method. */ | ||
interface Params { | ||
/** The full set of headers in the parameters, including both fixed and additional headers. */ | ||
fun _headers(): Headers | ||
|
||
/** | ||
* The full set of query params in the parameters, including both fixed and additional query | ||
* params. | ||
*/ | ||
fun _queryParams(): QueryParams | ||
} |
36 changes: 36 additions & 0 deletions
36
openai-java-core/src/main/kotlin/com/openai/core/PrepareRequest.kt
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,36 @@ | ||
@file:JvmName("PrepareRequest") | ||
|
||
package com.openai.core | ||
|
||
import com.openai.azure.addPathSegmentsForAzure | ||
import com.openai.azure.replaceBearerTokenForAzure | ||
import com.openai.core.http.HttpRequest | ||
import java.util.concurrent.CompletableFuture | ||
|
||
@JvmSynthetic | ||
internal fun HttpRequest.prepare( | ||
clientOptions: ClientOptions, | ||
params: Params, | ||
deploymentModel: String? | ||
): HttpRequest = | ||
toBuilder() | ||
// Clear the path segments and add them back below after the Azure path segments. | ||
.pathSegments(listOf()) | ||
.addPathSegmentsForAzure(clientOptions, deploymentModel) | ||
.addPathSegments(*pathSegments.toTypedArray()) | ||
.putAllQueryParams(clientOptions.queryParams) | ||
.replaceAllQueryParams(params._queryParams()) | ||
.putAllHeaders(clientOptions.headers) | ||
.replaceBearerTokenForAzure(clientOptions) | ||
.replaceAllHeaders(params._headers()) | ||
.build() | ||
|
||
@JvmSynthetic | ||
internal fun HttpRequest.prepareAsync( | ||
clientOptions: ClientOptions, | ||
params: Params, | ||
deploymentModel: String? | ||
): CompletableFuture<HttpRequest> = | ||
// This async version exists to make it easier to add async specific preparation logic in the | ||
// future. | ||
CompletableFuture.completedFuture(prepare(clientOptions, params, deploymentModel)) |
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
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
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.