-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathAsyncLangfuseClient.java
More file actions
227 lines (171 loc) · 8.78 KB
/
AsyncLangfuseClient.java
File metadata and controls
227 lines (171 loc) · 8.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
package com.langfuse.client; /**
* This file was auto-generated by Fern from our API Definition.
*/
import com.langfuse.client.core.ClientOptions;
import com.langfuse.client.core.Suppliers;
import java.util.function.Supplier;
import com.langfuse.client.resources.annotationqueues.AsyncAnnotationQueuesClient;
import com.langfuse.client.resources.blobstorageintegrations.AsyncBlobStorageIntegrationsClient;
import com.langfuse.client.resources.comments.AsyncCommentsClient;
import com.langfuse.client.resources.datasetitems.AsyncDatasetItemsClient;
import com.langfuse.client.resources.datasetrunitems.AsyncDatasetRunItemsClient;
import com.langfuse.client.resources.datasets.AsyncDatasetsClient;
import com.langfuse.client.resources.health.AsyncHealthClient;
import com.langfuse.client.resources.ingestion.AsyncIngestionClient;
import com.langfuse.client.resources.llmconnections.AsyncLlmConnectionsClient;
import com.langfuse.client.resources.media.AsyncMediaClient;
import com.langfuse.client.resources.metrics.AsyncMetricsClient;
import com.langfuse.client.resources.metricsv2.AsyncMetricsV2Client;
import com.langfuse.client.resources.models.AsyncModelsClient;
import com.langfuse.client.resources.observations.AsyncObservationsClient;
import com.langfuse.client.resources.observationsv2.AsyncObservationsV2Client;
import com.langfuse.client.resources.opentelemetry.AsyncOpentelemetryClient;
import com.langfuse.client.resources.organizations.AsyncOrganizationsClient;
import com.langfuse.client.resources.projects.AsyncProjectsClient;
import com.langfuse.client.resources.prompts.AsyncPromptsClient;
import com.langfuse.client.resources.promptversion.AsyncPromptVersionClient;
import com.langfuse.client.resources.scim.AsyncScimClient;
import com.langfuse.client.resources.score.AsyncScoreClient;
import com.langfuse.client.resources.scoreconfigs.AsyncScoreConfigsClient;
import com.langfuse.client.resources.scorev2.AsyncScoreV2Client;
import com.langfuse.client.resources.sessions.AsyncSessionsClient;
import com.langfuse.client.resources.trace.AsyncTraceClient;
public class AsyncLangfuseClient {
protected final ClientOptions clientOptions;
protected final Supplier<AsyncAnnotationQueuesClient> annotationQueuesClient;
protected final Supplier<AsyncBlobStorageIntegrationsClient> blobStorageIntegrationsClient;
protected final Supplier<AsyncCommentsClient> commentsClient;
protected final Supplier<AsyncDatasetItemsClient> datasetItemsClient;
protected final Supplier<AsyncDatasetRunItemsClient> datasetRunItemsClient;
protected final Supplier<AsyncDatasetsClient> datasetsClient;
protected final Supplier<AsyncHealthClient> healthClient;
protected final Supplier<AsyncIngestionClient> ingestionClient;
protected final Supplier<AsyncLlmConnectionsClient> llmConnectionsClient;
protected final Supplier<AsyncMediaClient> mediaClient;
protected final Supplier<AsyncMetricsV2Client> metricsV2Client;
protected final Supplier<AsyncMetricsClient> metricsClient;
protected final Supplier<AsyncModelsClient> modelsClient;
protected final Supplier<AsyncObservationsV2Client> observationsV2Client;
protected final Supplier<AsyncObservationsClient> observationsClient;
protected final Supplier<AsyncOpentelemetryClient> opentelemetryClient;
protected final Supplier<AsyncOrganizationsClient> organizationsClient;
protected final Supplier<AsyncProjectsClient> projectsClient;
protected final Supplier<AsyncPromptVersionClient> promptVersionClient;
protected final Supplier<AsyncPromptsClient> promptsClient;
protected final Supplier<AsyncScimClient> scimClient;
protected final Supplier<AsyncScoreConfigsClient> scoreConfigsClient;
protected final Supplier<AsyncScoreV2Client> scoreV2Client;
protected final Supplier<AsyncScoreClient> scoreClient;
protected final Supplier<AsyncSessionsClient> sessionsClient;
protected final Supplier<AsyncTraceClient> traceClient;
public AsyncLangfuseClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.annotationQueuesClient = Suppliers.memoize(() -> new AsyncAnnotationQueuesClient(clientOptions));
this.blobStorageIntegrationsClient = Suppliers.memoize(() -> new AsyncBlobStorageIntegrationsClient(clientOptions));
this.commentsClient = Suppliers.memoize(() -> new AsyncCommentsClient(clientOptions));
this.datasetItemsClient = Suppliers.memoize(() -> new AsyncDatasetItemsClient(clientOptions));
this.datasetRunItemsClient = Suppliers.memoize(() -> new AsyncDatasetRunItemsClient(clientOptions));
this.datasetsClient = Suppliers.memoize(() -> new AsyncDatasetsClient(clientOptions));
this.healthClient = Suppliers.memoize(() -> new AsyncHealthClient(clientOptions));
this.ingestionClient = Suppliers.memoize(() -> new AsyncIngestionClient(clientOptions));
this.llmConnectionsClient = Suppliers.memoize(() -> new AsyncLlmConnectionsClient(clientOptions));
this.mediaClient = Suppliers.memoize(() -> new AsyncMediaClient(clientOptions));
this.metricsV2Client = Suppliers.memoize(() -> new AsyncMetricsV2Client(clientOptions));
this.metricsClient = Suppliers.memoize(() -> new AsyncMetricsClient(clientOptions));
this.modelsClient = Suppliers.memoize(() -> new AsyncModelsClient(clientOptions));
this.observationsV2Client = Suppliers.memoize(() -> new AsyncObservationsV2Client(clientOptions));
this.observationsClient = Suppliers.memoize(() -> new AsyncObservationsClient(clientOptions));
this.opentelemetryClient = Suppliers.memoize(() -> new AsyncOpentelemetryClient(clientOptions));
this.organizationsClient = Suppliers.memoize(() -> new AsyncOrganizationsClient(clientOptions));
this.projectsClient = Suppliers.memoize(() -> new AsyncProjectsClient(clientOptions));
this.promptVersionClient = Suppliers.memoize(() -> new AsyncPromptVersionClient(clientOptions));
this.promptsClient = Suppliers.memoize(() -> new AsyncPromptsClient(clientOptions));
this.scimClient = Suppliers.memoize(() -> new AsyncScimClient(clientOptions));
this.scoreConfigsClient = Suppliers.memoize(() -> new AsyncScoreConfigsClient(clientOptions));
this.scoreV2Client = Suppliers.memoize(() -> new AsyncScoreV2Client(clientOptions));
this.scoreClient = Suppliers.memoize(() -> new AsyncScoreClient(clientOptions));
this.sessionsClient = Suppliers.memoize(() -> new AsyncSessionsClient(clientOptions));
this.traceClient = Suppliers.memoize(() -> new AsyncTraceClient(clientOptions));
}
public AsyncAnnotationQueuesClient annotationQueues() {
return this.annotationQueuesClient.get();
}
public AsyncBlobStorageIntegrationsClient blobStorageIntegrations() {
return this.blobStorageIntegrationsClient.get();
}
public AsyncCommentsClient comments() {
return this.commentsClient.get();
}
public AsyncDatasetItemsClient datasetItems() {
return this.datasetItemsClient.get();
}
public AsyncDatasetRunItemsClient datasetRunItems() {
return this.datasetRunItemsClient.get();
}
public AsyncDatasetsClient datasets() {
return this.datasetsClient.get();
}
public AsyncHealthClient health() {
return this.healthClient.get();
}
public AsyncIngestionClient ingestion() {
return this.ingestionClient.get();
}
public AsyncLlmConnectionsClient llmConnections() {
return this.llmConnectionsClient.get();
}
public AsyncMediaClient media() {
return this.mediaClient.get();
}
public AsyncMetricsV2Client metricsV2() {
return this.metricsV2Client.get();
}
public AsyncMetricsClient metrics() {
return this.metricsClient.get();
}
public AsyncModelsClient models() {
return this.modelsClient.get();
}
public AsyncObservationsV2Client observationsV2() {
return this.observationsV2Client.get();
}
public AsyncObservationsClient observations() {
return this.observationsClient.get();
}
public AsyncOpentelemetryClient opentelemetry() {
return this.opentelemetryClient.get();
}
public AsyncOrganizationsClient organizations() {
return this.organizationsClient.get();
}
public AsyncProjectsClient projects() {
return this.projectsClient.get();
}
public AsyncPromptVersionClient promptVersion() {
return this.promptVersionClient.get();
}
public AsyncPromptsClient prompts() {
return this.promptsClient.get();
}
public AsyncScimClient scim() {
return this.scimClient.get();
}
public AsyncScoreConfigsClient scoreConfigs() {
return this.scoreConfigsClient.get();
}
public AsyncScoreV2Client scoreV2() {
return this.scoreV2Client.get();
}
public AsyncScoreClient score() {
return this.scoreClient.get();
}
public AsyncSessionsClient sessions() {
return this.sessionsClient.get();
}
public AsyncTraceClient trace() {
return this.traceClient.get();
}
public static AsyncLangfuseClientBuilder builder() {
return new AsyncLangfuseClientBuilder();
}
}