Skip to content

Commit be32489

Browse files
feat(evaluators): add list evaluators (GET /api/v1/runs/rules)
Exposes `GET /api/v1/runs/rules`. Will result in `client.evaluators.list()` in the Go SDK. The endpoint returns online evaluators (internally called "run rules") — automated rules that trigger on incoming runs to apply LLM/code evaluators, add runs to annotation queues, trigger webhooks, etc. The `runs/rules` URL path is an implementation detail; `evaluators` matches the user-facing branding.
1 parent fab0c6f commit be32489

24 files changed

Lines changed: 5594 additions & 2 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 123
1+
configured_endpoints: 124
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-5a6f864c9ef46e4f4fcce4e718a441bd4aa0d65bdd43f0d87160c104e6a82c98.yml
33
openapi_spec_hash: 8ae7e385497fed968338aeb199ad792b
4-
config_hash: 0147e25a53ffe0e5055ad212e0c985ba
4+
config_hash: 8c719b00376bf1f08b02565111a88d38

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
@@ -6,6 +6,7 @@ import com.langchain.smith.core.ClientOptions
66
import com.langchain.smith.services.blocking.AnnotationQueueService
77
import com.langchain.smith.services.blocking.CommitService
88
import com.langchain.smith.services.blocking.DatasetService
9+
import com.langchain.smith.services.blocking.EvaluatorService
910
import com.langchain.smith.services.blocking.ExampleService
1011
import com.langchain.smith.services.blocking.FeedbackService
1112
import com.langchain.smith.services.blocking.PublicService
@@ -60,6 +61,8 @@ interface LangsmithClient {
6061

6162
fun runs(): RunService
6263

64+
fun evaluators(): EvaluatorService
65+
6366
fun feedback(): FeedbackService
6467

6568
fun public_(): PublicService
@@ -105,6 +108,8 @@ interface LangsmithClient {
105108

106109
fun runs(): RunService.WithRawResponse
107110

111+
fun evaluators(): EvaluatorService.WithRawResponse
112+
108113
fun feedback(): FeedbackService.WithRawResponse
109114

110115
fun public_(): PublicService.WithRawResponse

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
@@ -6,6 +6,7 @@ import com.langchain.smith.core.ClientOptions
66
import com.langchain.smith.services.async.AnnotationQueueServiceAsync
77
import com.langchain.smith.services.async.CommitServiceAsync
88
import com.langchain.smith.services.async.DatasetServiceAsync
9+
import com.langchain.smith.services.async.EvaluatorServiceAsync
910
import com.langchain.smith.services.async.ExampleServiceAsync
1011
import com.langchain.smith.services.async.FeedbackServiceAsync
1112
import com.langchain.smith.services.async.PublicServiceAsync
@@ -60,6 +61,8 @@ interface LangsmithClientAsync {
6061

6162
fun runs(): RunServiceAsync
6263

64+
fun evaluators(): EvaluatorServiceAsync
65+
6366
fun feedback(): FeedbackServiceAsync
6467

6568
fun public_(): PublicServiceAsync
@@ -109,6 +112,8 @@ interface LangsmithClientAsync {
109112

110113
fun runs(): RunServiceAsync.WithRawResponse
111114

115+
fun evaluators(): EvaluatorServiceAsync.WithRawResponse
116+
112117
fun feedback(): FeedbackServiceAsync.WithRawResponse
113118

114119
fun public_(): PublicServiceAsync.WithRawResponse

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
@@ -10,6 +10,8 @@ import com.langchain.smith.services.async.CommitServiceAsync
1010
import com.langchain.smith.services.async.CommitServiceAsyncImpl
1111
import com.langchain.smith.services.async.DatasetServiceAsync
1212
import com.langchain.smith.services.async.DatasetServiceAsyncImpl
13+
import com.langchain.smith.services.async.EvaluatorServiceAsync
14+
import com.langchain.smith.services.async.EvaluatorServiceAsyncImpl
1315
import com.langchain.smith.services.async.ExampleServiceAsync
1416
import com.langchain.smith.services.async.ExampleServiceAsyncImpl
1517
import com.langchain.smith.services.async.FeedbackServiceAsync
@@ -59,6 +61,10 @@ class LangsmithClientAsyncImpl(private val clientOptions: ClientOptions) : Langs
5961

6062
private val runs: RunServiceAsync by lazy { RunServiceAsyncImpl(clientOptionsWithUserAgent) }
6163

64+
private val evaluators: EvaluatorServiceAsync by lazy {
65+
EvaluatorServiceAsyncImpl(clientOptionsWithUserAgent)
66+
}
67+
6268
private val feedback: FeedbackServiceAsync by lazy {
6369
FeedbackServiceAsyncImpl(clientOptionsWithUserAgent)
6470
}
@@ -100,6 +106,8 @@ class LangsmithClientAsyncImpl(private val clientOptions: ClientOptions) : Langs
100106

101107
override fun runs(): RunServiceAsync = runs
102108

109+
override fun evaluators(): EvaluatorServiceAsync = evaluators
110+
103111
override fun feedback(): FeedbackServiceAsync = feedback
104112

105113
override fun public_(): PublicServiceAsync = public_
@@ -135,6 +143,10 @@ class LangsmithClientAsyncImpl(private val clientOptions: ClientOptions) : Langs
135143
RunServiceAsyncImpl.WithRawResponseImpl(clientOptions)
136144
}
137145

146+
private val evaluators: EvaluatorServiceAsync.WithRawResponse by lazy {
147+
EvaluatorServiceAsyncImpl.WithRawResponseImpl(clientOptions)
148+
}
149+
138150
private val feedback: FeedbackServiceAsync.WithRawResponse by lazy {
139151
FeedbackServiceAsyncImpl.WithRawResponseImpl(clientOptions)
140152
}
@@ -178,6 +190,8 @@ class LangsmithClientAsyncImpl(private val clientOptions: ClientOptions) : Langs
178190

179191
override fun runs(): RunServiceAsync.WithRawResponse = runs
180192

193+
override fun evaluators(): EvaluatorServiceAsync.WithRawResponse = evaluators
194+
181195
override fun feedback(): FeedbackServiceAsync.WithRawResponse = feedback
182196

183197
override fun public_(): PublicServiceAsync.WithRawResponse = public_

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import com.langchain.smith.services.blocking.CommitService
1010
import com.langchain.smith.services.blocking.CommitServiceImpl
1111
import com.langchain.smith.services.blocking.DatasetService
1212
import com.langchain.smith.services.blocking.DatasetServiceImpl
13+
import com.langchain.smith.services.blocking.EvaluatorService
14+
import com.langchain.smith.services.blocking.EvaluatorServiceImpl
1315
import com.langchain.smith.services.blocking.ExampleService
1416
import com.langchain.smith.services.blocking.ExampleServiceImpl
1517
import com.langchain.smith.services.blocking.FeedbackService
@@ -53,6 +55,10 @@ class LangsmithClientImpl(private val clientOptions: ClientOptions) : LangsmithC
5355

5456
private val runs: RunService by lazy { RunServiceImpl(clientOptionsWithUserAgent) }
5557

58+
private val evaluators: EvaluatorService by lazy {
59+
EvaluatorServiceImpl(clientOptionsWithUserAgent)
60+
}
61+
5662
private val feedback: FeedbackService by lazy {
5763
FeedbackServiceImpl(clientOptionsWithUserAgent)
5864
}
@@ -86,6 +92,8 @@ class LangsmithClientImpl(private val clientOptions: ClientOptions) : LangsmithC
8692

8793
override fun runs(): RunService = runs
8894

95+
override fun evaluators(): EvaluatorService = evaluators
96+
8997
override fun feedback(): FeedbackService = feedback
9098

9199
override fun public_(): PublicService = public_
@@ -121,6 +129,10 @@ class LangsmithClientImpl(private val clientOptions: ClientOptions) : LangsmithC
121129
RunServiceImpl.WithRawResponseImpl(clientOptions)
122130
}
123131

132+
private val evaluators: EvaluatorService.WithRawResponse by lazy {
133+
EvaluatorServiceImpl.WithRawResponseImpl(clientOptions)
134+
}
135+
124136
private val feedback: FeedbackService.WithRawResponse by lazy {
125137
FeedbackServiceImpl.WithRawResponseImpl(clientOptions)
126138
}
@@ -164,6 +176,8 @@ class LangsmithClientImpl(private val clientOptions: ClientOptions) : LangsmithC
164176

165177
override fun runs(): RunService.WithRawResponse = runs
166178

179+
override fun evaluators(): EvaluatorService.WithRawResponse = evaluators
180+
167181
override fun feedback(): FeedbackService.WithRawResponse = feedback
168182

169183
override fun public_(): PublicService.WithRawResponse = public_

0 commit comments

Comments
 (0)