File tree Expand file tree Collapse file tree 3 files changed +40
-4
lines changed
openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp
openai-java-core/src/main/kotlin/com/openai/core Expand file tree Collapse file tree 3 files changed +40
-4
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,24 @@ class OpenAIOkHttpClient private constructor() {
52
52
53
53
fun removeHeader (name : String ) = apply { clientOptions.removeHeader(name) }
54
54
55
+ fun queryParams (queryParams : Map <String , Iterable <String >>) = apply {
56
+ clientOptions.queryParams(queryParams)
57
+ }
58
+
59
+ fun putQueryParam (key : String , value : String ) = apply {
60
+ clientOptions.putQueryParam(key, value)
61
+ }
62
+
63
+ fun putQueryParams (key : String , values : Iterable <String >) = apply {
64
+ clientOptions.putQueryParams(key, values)
65
+ }
66
+
67
+ fun putAllQueryParams (queryParams : Map <String , Iterable <String >>) = apply {
68
+ clientOptions.putAllQueryParams(queryParams)
69
+ }
70
+
71
+ fun removeQueryParam (key : String ) = apply { clientOptions.removeQueryParam(key) }
72
+
55
73
fun timeout (timeout : Duration ) = apply { this .timeout = timeout }
56
74
57
75
fun maxRetries (maxRetries : Int ) = apply { clientOptions.maxRetries(maxRetries) }
Original file line number Diff line number Diff line change @@ -52,6 +52,24 @@ class OpenAIOkHttpClientAsync private constructor() {
52
52
53
53
fun removeHeader (name : String ) = apply { clientOptions.removeHeader(name) }
54
54
55
+ fun queryParams (queryParams : Map <String , Iterable <String >>) = apply {
56
+ clientOptions.queryParams(queryParams)
57
+ }
58
+
59
+ fun putQueryParam (key : String , value : String ) = apply {
60
+ clientOptions.putQueryParam(key, value)
61
+ }
62
+
63
+ fun putQueryParams (key : String , values : Iterable <String >) = apply {
64
+ clientOptions.putQueryParams(key, values)
65
+ }
66
+
67
+ fun putAllQueryParams (queryParams : Map <String , Iterable <String >>) = apply {
68
+ clientOptions.putAllQueryParams(queryParams)
69
+ }
70
+
71
+ fun removeQueryParam (key : String ) = apply { clientOptions.removeQueryParam(key) }
72
+
55
73
fun timeout (timeout : Duration ) = apply { this .timeout = timeout }
56
74
57
75
fun maxRetries (maxRetries : Int ) = apply { clientOptions.maxRetries(maxRetries) }
Original file line number Diff line number Diff line change @@ -96,17 +96,17 @@ private constructor(
96
96
putAllQueryParams(queryParams)
97
97
}
98
98
99
- fun putQueryParam (name : String , value : String ) = apply { queryParams.put(name , value) }
99
+ fun putQueryParam (key : String , value : String ) = apply { queryParams.put(key , value) }
100
100
101
- fun putQueryParams (name : String , values : Iterable <String >) = apply {
102
- queryParams.putAll(name , values)
101
+ fun putQueryParams (key : String , values : Iterable <String >) = apply {
102
+ queryParams.putAll(key , values)
103
103
}
104
104
105
105
fun putAllQueryParams (queryParams : Map <String , Iterable <String >>) = apply {
106
106
queryParams.forEach(::putQueryParams)
107
107
}
108
108
109
- fun removeQueryParam (name : String ) = apply { queryParams.removeAll(name ) }
109
+ fun removeQueryParam (key : String ) = apply { queryParams.removeAll(key ) }
110
110
111
111
fun responseValidation (responseValidation : Boolean ) = apply {
112
112
this .responseValidation = responseValidation
You can’t perform that action at this time.
0 commit comments