Skip to content

Commit 9d088c5

Browse files
feat(api): adding support for /v1/conversations to the API
1 parent 6242da5 commit 9d088c5

File tree

96 files changed

+20268
-93
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+20268
-93
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7ef7a457c3bf05364e66e48c9ca34f31bfef1f6c9b7c15b1812346105e0abb16.yml
3-
openapi_spec_hash: a2b1f5d8fbb62175c93b0ebea9f10063
4-
config_hash: 4870312b04f48fd717ea4151053e7fb9
1+
configured_endpoints: 119
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-4bcdfe525558e67a09b32dec7a573e87b94bab47db3951eb4a86a4dafb60296c.yml
3+
openapi_spec_hash: 49e7e46bfe9f61b7b7a60e36840c0cd7
4+
config_hash: e4514526ae01126a61f9b6c14a351737

openai-java-core/src/main/kotlin/com/openai/client/OpenAIClient.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.openai.services.blocking.BetaService
99
import com.openai.services.blocking.ChatService
1010
import com.openai.services.blocking.CompletionService
1111
import com.openai.services.blocking.ContainerService
12+
import com.openai.services.blocking.ConversationService
1213
import com.openai.services.blocking.EmbeddingService
1314
import com.openai.services.blocking.EvalService
1415
import com.openai.services.blocking.FileService
@@ -91,6 +92,8 @@ interface OpenAIClient {
9192

9293
fun responses(): ResponseService
9394

95+
fun conversations(): ConversationService
96+
9497
fun evals(): EvalService
9598

9699
fun containers(): ContainerService
@@ -150,6 +153,8 @@ interface OpenAIClient {
150153

151154
fun responses(): ResponseService.WithRawResponse
152155

156+
fun conversations(): ConversationService.WithRawResponse
157+
153158
fun evals(): EvalService.WithRawResponse
154159

155160
fun containers(): ContainerService.WithRawResponse

openai-java-core/src/main/kotlin/com/openai/client/OpenAIClientAsync.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.openai.services.async.BetaServiceAsync
99
import com.openai.services.async.ChatServiceAsync
1010
import com.openai.services.async.CompletionServiceAsync
1111
import com.openai.services.async.ContainerServiceAsync
12+
import com.openai.services.async.ConversationServiceAsync
1213
import com.openai.services.async.EmbeddingServiceAsync
1314
import com.openai.services.async.EvalServiceAsync
1415
import com.openai.services.async.FileServiceAsync
@@ -91,6 +92,8 @@ interface OpenAIClientAsync {
9192

9293
fun responses(): ResponseServiceAsync
9394

95+
fun conversations(): ConversationServiceAsync
96+
9497
fun evals(): EvalServiceAsync
9598

9699
fun containers(): ContainerServiceAsync
@@ -152,6 +155,8 @@ interface OpenAIClientAsync {
152155

153156
fun responses(): ResponseServiceAsync.WithRawResponse
154157

158+
fun conversations(): ConversationServiceAsync.WithRawResponse
159+
155160
fun evals(): EvalServiceAsync.WithRawResponse
156161

157162
fun containers(): ContainerServiceAsync.WithRawResponse

openai-java-core/src/main/kotlin/com/openai/client/OpenAIClientAsyncImpl.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import com.openai.services.async.CompletionServiceAsync
1616
import com.openai.services.async.CompletionServiceAsyncImpl
1717
import com.openai.services.async.ContainerServiceAsync
1818
import com.openai.services.async.ContainerServiceAsyncImpl
19+
import com.openai.services.async.ConversationServiceAsync
20+
import com.openai.services.async.ConversationServiceAsyncImpl
1921
import com.openai.services.async.EmbeddingServiceAsync
2022
import com.openai.services.async.EmbeddingServiceAsyncImpl
2123
import com.openai.services.async.EvalServiceAsync
@@ -117,6 +119,10 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
117119
ResponseServiceAsyncImpl(clientOptionsWithUserAgent)
118120
}
119121

122+
private val conversations: ConversationServiceAsync by lazy {
123+
ConversationServiceAsyncImpl(clientOptionsWithUserAgent)
124+
}
125+
120126
private val evals: EvalServiceAsync by lazy { EvalServiceAsyncImpl(clientOptionsWithUserAgent) }
121127

122128
private val containers: ContainerServiceAsync by lazy {
@@ -162,6 +168,8 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
162168

163169
override fun responses(): ResponseServiceAsync = responses
164170

171+
override fun conversations(): ConversationServiceAsync = conversations
172+
165173
override fun evals(): EvalServiceAsync = evals
166174

167175
override fun containers(): ContainerServiceAsync = containers
@@ -235,6 +243,10 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
235243
ResponseServiceAsyncImpl.WithRawResponseImpl(clientOptions)
236244
}
237245

246+
private val conversations: ConversationServiceAsync.WithRawResponse by lazy {
247+
ConversationServiceAsyncImpl.WithRawResponseImpl(clientOptions)
248+
}
249+
238250
private val evals: EvalServiceAsync.WithRawResponse by lazy {
239251
EvalServiceAsyncImpl.WithRawResponseImpl(clientOptions)
240252
}
@@ -282,6 +294,8 @@ class OpenAIClientAsyncImpl(private val clientOptions: ClientOptions) : OpenAICl
282294

283295
override fun responses(): ResponseServiceAsync.WithRawResponse = responses
284296

297+
override fun conversations(): ConversationServiceAsync.WithRawResponse = conversations
298+
285299
override fun evals(): EvalServiceAsync.WithRawResponse = evals
286300

287301
override fun containers(): ContainerServiceAsync.WithRawResponse = containers

openai-java-core/src/main/kotlin/com/openai/client/OpenAIClientImpl.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import com.openai.services.blocking.CompletionService
1616
import com.openai.services.blocking.CompletionServiceImpl
1717
import com.openai.services.blocking.ContainerService
1818
import com.openai.services.blocking.ContainerServiceImpl
19+
import com.openai.services.blocking.ConversationService
20+
import com.openai.services.blocking.ConversationServiceImpl
1921
import com.openai.services.blocking.EmbeddingService
2022
import com.openai.services.blocking.EmbeddingServiceImpl
2123
import com.openai.services.blocking.EvalService
@@ -103,6 +105,10 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient
103105
ResponseServiceImpl(clientOptionsWithUserAgent)
104106
}
105107

108+
private val conversations: ConversationService by lazy {
109+
ConversationServiceImpl(clientOptionsWithUserAgent)
110+
}
111+
106112
private val evals: EvalService by lazy { EvalServiceImpl(clientOptionsWithUserAgent) }
107113

108114
private val containers: ContainerService by lazy {
@@ -148,6 +154,8 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient
148154

149155
override fun responses(): ResponseService = responses
150156

157+
override fun conversations(): ConversationService = conversations
158+
151159
override fun evals(): EvalService = evals
152160

153161
override fun containers(): ContainerService = containers
@@ -221,6 +229,10 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient
221229
ResponseServiceImpl.WithRawResponseImpl(clientOptions)
222230
}
223231

232+
private val conversations: ConversationService.WithRawResponse by lazy {
233+
ConversationServiceImpl.WithRawResponseImpl(clientOptions)
234+
}
235+
224236
private val evals: EvalService.WithRawResponse by lazy {
225237
EvalServiceImpl.WithRawResponseImpl(clientOptions)
226238
}
@@ -268,6 +280,8 @@ class OpenAIClientImpl(private val clientOptions: ClientOptions) : OpenAIClient
268280

269281
override fun responses(): ResponseService.WithRawResponse = responses
270282

283+
override fun conversations(): ConversationService.WithRawResponse = conversations
284+
271285
override fun evals(): EvalService.WithRawResponse = evals
272286

273287
override fun containers(): ContainerService.WithRawResponse = containers

0 commit comments

Comments
 (0)