Skip to content

Commit bd21a1d

Browse files
feat(api): sandbox apis
add sandbox apis
1 parent e7f19bc commit bd21a1d

106 files changed

Lines changed: 35950 additions & 2 deletions

File tree

Some content is hidden

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

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 103
1+
configured_endpoints: 123
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-9c6083b4e10db17ef5bc0983dc9fb2c51efa511708e501eac3ab50eb4240458a.yml
33
openapi_spec_hash: a4680614dd4975ee0d080c862befecb3
4-
config_hash: c217b34d458f1b65f260715693d447f9
4+
config_hash: 0147e25a53ffe0e5055ad212e0c985ba

langsmith-java-core/src/main/kotlin/com/langchain/smith/client/LangsmithClient.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import com.langchain.smith.services.blocking.FeedbackService
1111
import com.langchain.smith.services.blocking.PublicService
1212
import com.langchain.smith.services.blocking.RepoService
1313
import com.langchain.smith.services.blocking.RunService
14+
import com.langchain.smith.services.blocking.SandboxService
1415
import com.langchain.smith.services.blocking.SessionService
1516
import com.langchain.smith.services.blocking.SettingService
1617
import java.util.function.Consumer
@@ -71,6 +72,8 @@ interface LangsmithClient {
7172

7273
fun settings(): SettingService
7374

75+
fun sandboxes(): SandboxService
76+
7477
/**
7578
* Closes this client, relinquishing any underlying resources.
7679
*
@@ -113,5 +116,7 @@ interface LangsmithClient {
113116
fun commits(): CommitService.WithRawResponse
114117

115118
fun settings(): SettingService.WithRawResponse
119+
120+
fun sandboxes(): SandboxService.WithRawResponse
116121
}
117122
}

langsmith-java-core/src/main/kotlin/com/langchain/smith/client/LangsmithClientAsync.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import com.langchain.smith.services.async.FeedbackServiceAsync
1111
import com.langchain.smith.services.async.PublicServiceAsync
1212
import com.langchain.smith.services.async.RepoServiceAsync
1313
import com.langchain.smith.services.async.RunServiceAsync
14+
import com.langchain.smith.services.async.SandboxServiceAsync
1415
import com.langchain.smith.services.async.SessionServiceAsync
1516
import com.langchain.smith.services.async.SettingServiceAsync
1617
import java.util.function.Consumer
@@ -71,6 +72,8 @@ interface LangsmithClientAsync {
7172

7273
fun settings(): SettingServiceAsync
7374

75+
fun sandboxes(): SandboxServiceAsync
76+
7477
/**
7578
* Closes this client, relinquishing any underlying resources.
7679
*
@@ -117,5 +120,7 @@ interface LangsmithClientAsync {
117120
fun commits(): CommitServiceAsync.WithRawResponse
118121

119122
fun settings(): SettingServiceAsync.WithRawResponse
123+
124+
fun sandboxes(): SandboxServiceAsync.WithRawResponse
120125
}
121126
}

langsmith-java-core/src/main/kotlin/com/langchain/smith/client/LangsmithClientAsyncImpl.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import com.langchain.smith.services.async.RepoServiceAsync
2020
import com.langchain.smith.services.async.RepoServiceAsyncImpl
2121
import com.langchain.smith.services.async.RunServiceAsync
2222
import com.langchain.smith.services.async.RunServiceAsyncImpl
23+
import com.langchain.smith.services.async.SandboxServiceAsync
24+
import com.langchain.smith.services.async.SandboxServiceAsyncImpl
2325
import com.langchain.smith.services.async.SessionServiceAsync
2426
import com.langchain.smith.services.async.SessionServiceAsyncImpl
2527
import com.langchain.smith.services.async.SettingServiceAsync
@@ -79,6 +81,10 @@ class LangsmithClientAsyncImpl(private val clientOptions: ClientOptions) : Langs
7981
SettingServiceAsyncImpl(clientOptionsWithUserAgent)
8082
}
8183

84+
private val sandboxes: SandboxServiceAsync by lazy {
85+
SandboxServiceAsyncImpl(clientOptionsWithUserAgent)
86+
}
87+
8288
override fun sync(): LangsmithClient = sync
8389

8490
override fun withRawResponse(): LangsmithClientAsync.WithRawResponse = withRawResponse
@@ -106,6 +112,8 @@ class LangsmithClientAsyncImpl(private val clientOptions: ClientOptions) : Langs
106112

107113
override fun settings(): SettingServiceAsync = settings
108114

115+
override fun sandboxes(): SandboxServiceAsync = sandboxes
116+
109117
override fun close() = clientOptions.close()
110118

111119
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
@@ -151,6 +159,10 @@ class LangsmithClientAsyncImpl(private val clientOptions: ClientOptions) : Langs
151159
SettingServiceAsyncImpl.WithRawResponseImpl(clientOptions)
152160
}
153161

162+
private val sandboxes: SandboxServiceAsync.WithRawResponse by lazy {
163+
SandboxServiceAsyncImpl.WithRawResponseImpl(clientOptions)
164+
}
165+
154166
override fun withOptions(
155167
modifier: Consumer<ClientOptions.Builder>
156168
): LangsmithClientAsync.WithRawResponse =
@@ -178,5 +190,7 @@ class LangsmithClientAsyncImpl(private val clientOptions: ClientOptions) : Langs
178190
override fun commits(): CommitServiceAsync.WithRawResponse = commits
179191

180192
override fun settings(): SettingServiceAsync.WithRawResponse = settings
193+
194+
override fun sandboxes(): SandboxServiceAsync.WithRawResponse = sandboxes
181195
}
182196
}

langsmith-java-core/src/main/kotlin/com/langchain/smith/client/LangsmithClientImpl.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import com.langchain.smith.services.blocking.RepoService
2020
import com.langchain.smith.services.blocking.RepoServiceImpl
2121
import com.langchain.smith.services.blocking.RunService
2222
import com.langchain.smith.services.blocking.RunServiceImpl
23+
import com.langchain.smith.services.blocking.SandboxService
24+
import com.langchain.smith.services.blocking.SandboxServiceImpl
2325
import com.langchain.smith.services.blocking.SessionService
2426
import com.langchain.smith.services.blocking.SessionServiceImpl
2527
import com.langchain.smith.services.blocking.SettingService
@@ -67,6 +69,8 @@ class LangsmithClientImpl(private val clientOptions: ClientOptions) : LangsmithC
6769

6870
private val settings: SettingService by lazy { SettingServiceImpl(clientOptionsWithUserAgent) }
6971

72+
private val sandboxes: SandboxService by lazy { SandboxServiceImpl(clientOptionsWithUserAgent) }
73+
7074
override fun async(): LangsmithClientAsync = async
7175

7276
override fun withRawResponse(): LangsmithClient.WithRawResponse = withRawResponse
@@ -94,6 +98,8 @@ class LangsmithClientImpl(private val clientOptions: ClientOptions) : LangsmithC
9498

9599
override fun settings(): SettingService = settings
96100

101+
override fun sandboxes(): SandboxService = sandboxes
102+
97103
override fun close() = clientOptions.close()
98104

99105
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
@@ -139,6 +145,10 @@ class LangsmithClientImpl(private val clientOptions: ClientOptions) : LangsmithC
139145
SettingServiceImpl.WithRawResponseImpl(clientOptions)
140146
}
141147

148+
private val sandboxes: SandboxService.WithRawResponse by lazy {
149+
SandboxServiceImpl.WithRawResponseImpl(clientOptions)
150+
}
151+
142152
override fun withOptions(
143153
modifier: Consumer<ClientOptions.Builder>
144154
): LangsmithClient.WithRawResponse =
@@ -165,5 +175,7 @@ class LangsmithClientImpl(private val clientOptions: ClientOptions) : LangsmithC
165175
override fun commits(): CommitService.WithRawResponse = commits
166176

167177
override fun settings(): SettingService.WithRawResponse = settings
178+
179+
override fun sandboxes(): SandboxService.WithRawResponse = sandboxes
168180
}
169181
}

0 commit comments

Comments
 (0)