@dremio/js-sdk 0.42.0 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +274 -0
- package/dist/cloud/ai/AIResource.d.ts +716 -17
- package/dist/cloud/ai/AIResource.js +40 -18
- package/dist/cloud/ai/AIResource.js.map +1 -1
- package/dist/cloud/ai/DremioModelProvider.d.ts +1 -1
- package/dist/cloud/ai/DremioModelProvider.js +6 -13
- package/dist/cloud/ai/DremioModelProvider.js.map +1 -1
- package/dist/cloud/ai/modelProviderCodec.d.ts +12 -0
- package/dist/cloud/replaceOriginResource.js +4 -0
- package/dist/cloud/replaceOriginResource.js.map +1 -1
- package/dist/common/ConflictResolver.d.ts +9 -1
- package/dist/common/ConflictResolver.js +10 -1
- package/dist/common/ConflictResolver.js.map +1 -1
- package/dist/common/refineRfc9557Schema.d.ts +1 -0
- package/dist/common/refineRfc9557Schema.js +26 -0
- package/dist/common/refineRfc9557Schema.js.map +1 -0
- package/dist/common/sharedExports.d.ts +1 -0
- package/dist/common/sharedExports.js +1 -0
- package/dist/common/sharedExports.js.map +1 -1
- package/dist/enterprise/Dremio.d.ts +1 -1
- package/dist/enterprise/Dremio.js +3 -2
- package/dist/enterprise/Dremio.js.map +1 -1
- package/dist/enterprise/ai/AIResource.d.ts +699 -18
- package/dist/enterprise/ai/AIResource.js +41 -19
- package/dist/enterprise/ai/AIResource.js.map +1 -1
- package/dist/enterprise/ai/chat/ChatSession.d.ts +4 -25
- package/dist/enterprise/ai/chat/ChatSession.js +6 -55
- package/dist/enterprise/ai/chat/ChatSession.js.map +1 -1
- package/dist/enterprise/ai/chat/UserChatMessage.d.ts +38 -22
- package/dist/enterprise/ai/chat/UserChatMessage.js +33 -41
- package/dist/enterprise/ai/chat/UserChatMessage.js.map +1 -1
- package/dist/enterprise/ai/chat/chatEventSchema.d.ts +169 -11
- package/dist/enterprise/ai/chat/chatEventSchema.js +183 -35
- package/dist/enterprise/ai/chat/chatEventSchema.js.map +1 -1
- package/dist/enterprise/ai/chat/eventWrappers/AgentChatPartialResponse.d.ts +0 -6
- package/dist/enterprise/ai/chat/eventWrappers/AgentChatResponse.d.ts +6 -6
- package/dist/enterprise/ai/chat/eventWrappers/AgentChatResponse.js +2 -2
- package/dist/enterprise/ai/chat/eventWrappers/AgentChatResponse.js.map +1 -1
- package/dist/enterprise/ai/chat/index.d.ts +0 -3
- package/dist/enterprise/ai/chat/index.js +0 -1
- package/dist/enterprise/ai/chat/index.js.map +1 -1
- package/dist/enterprise/ai/chat/methods/sendChatMessage.js +4 -1
- package/dist/enterprise/ai/chat/methods/sendChatMessage.js.map +1 -1
- package/dist/enterprise/ai/chat/responseContent/AgentModelResponseContent.d.ts +1 -2
- package/dist/enterprise/ai/chat/responseContent/AgentModelResponseContent.js.map +1 -1
- package/dist/enterprise/ai/chat/responseContent/AgentToolRequestResponseContent.d.ts +1 -2
- package/dist/enterprise/ai/chat/responseContent/AgentToolRequestResponseContent.js +0 -1
- package/dist/enterprise/ai/chat/responseContent/AgentToolRequestResponseContent.js.map +1 -1
- package/dist/enterprise/ai/chat/responseContent/AgentToolResultResponseContent.d.ts +1 -2
- package/dist/enterprise/ai/chat/responseContent/AgentToolResultResponseContent.js +0 -1
- package/dist/enterprise/ai/chat/responseContent/AgentToolResultResponseContent.js.map +1 -1
- package/dist/enterprise/ai/conversations/AgentConversation.d.ts +215 -0
- package/dist/enterprise/ai/conversations/AgentConversation.js +180 -0
- package/dist/enterprise/ai/conversations/AgentConversation.js.map +1 -0
- package/dist/enterprise/ai/conversations/conversationPropertiesCodec.d.ts +22 -0
- package/dist/enterprise/ai/conversations/conversationPropertiesCodec.js +62 -0
- package/dist/enterprise/ai/conversations/conversationPropertiesCodec.js.map +1 -0
- package/dist/enterprise/ai/conversations/createConversationMachine.d.ts +682 -0
- package/dist/enterprise/ai/conversations/createConversationMachine.js +354 -0
- package/dist/enterprise/ai/conversations/createConversationMachine.js.map +1 -0
- package/dist/enterprise/ai/conversations/methods/createConversation.d.ts +28 -0
- package/dist/enterprise/ai/conversations/methods/createConversation.js +68 -0
- package/dist/enterprise/ai/conversations/methods/createConversation.js.map +1 -0
- package/dist/enterprise/ai/conversations/methods/createExchangeRun.d.ts +16 -0
- package/dist/enterprise/ai/conversations/methods/createExchangeRun.js +36 -0
- package/dist/enterprise/ai/conversations/methods/createExchangeRun.js.map +1 -0
- package/dist/enterprise/ai/conversations/methods/deleteConversation.d.ts +2 -0
- package/dist/enterprise/ai/conversations/methods/deleteConversation.js +24 -0
- package/dist/enterprise/ai/conversations/methods/deleteConversation.js.map +1 -0
- package/dist/enterprise/ai/conversations/methods/listConversations.d.ts +8 -0
- package/dist/enterprise/ai/conversations/methods/listConversations.js +30 -0
- package/dist/enterprise/ai/conversations/methods/listConversations.js.map +1 -0
- package/dist/enterprise/ai/conversations/methods/retrieveConversation.d.ts +12 -0
- package/dist/enterprise/ai/conversations/methods/retrieveConversation.js +29 -0
- package/dist/enterprise/ai/conversations/methods/retrieveConversation.js.map +1 -0
- package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.d.ts +86 -0
- package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.js +32 -0
- package/dist/enterprise/ai/conversations/methods/retrieveConversationHistory.js.map +1 -0
- package/dist/enterprise/ai/conversations/methods/stopExchangeRun.d.ts +2 -0
- package/dist/enterprise/ai/conversations/methods/stopExchangeRun.js +24 -0
- package/dist/enterprise/ai/conversations/methods/stopExchangeRun.js.map +1 -0
- package/dist/enterprise/ai/conversations/methods/streamRunEvents.d.ts +6 -0
- package/dist/enterprise/ai/conversations/methods/streamRunEvents.js +33 -0
- package/dist/enterprise/ai/conversations/methods/streamRunEvents.js.map +1 -0
- package/dist/enterprise/ai/conversations/methods/updateConversation.d.ts +15 -0
- package/dist/enterprise/ai/conversations/methods/updateConversation.js +35 -0
- package/dist/enterprise/ai/conversations/methods/updateConversation.js.map +1 -0
- package/dist/enterprise/ai/conversations/reduceChatEvents.d.ts +17 -0
- package/dist/enterprise/ai/conversations/reduceChatEvents.js +74 -0
- package/dist/enterprise/ai/conversations/reduceChatEvents.js.map +1 -0
- package/dist/enterprise/ai/index.d.ts +5 -1
- package/dist/enterprise/ai/index.js +4 -1
- package/dist/enterprise/ai/index.js.map +1 -1
- package/dist/enterprise/ai/modelProvider/ModelProvider.d.ts +15 -1
- package/dist/enterprise/ai/modelProvider/ModelProvider.js +12 -1
- package/dist/enterprise/ai/modelProvider/ModelProvider.js.map +1 -1
- package/dist/enterprise/ai/modelProvider/modelProviderCodec.d.ts +40 -0
- package/dist/enterprise/ai/modelProvider/modelProviderCodec.js +10 -1
- package/dist/enterprise/ai/modelProvider/modelProviderCodec.js.map +1 -1
- package/dist/enterprise/ai/modelProvider/modelProviderConfigSchemas.d.ts +21 -0
- package/dist/enterprise/ai/modelProvider/modelProviderConfigSchemas.js +17 -0
- package/dist/enterprise/ai/modelProvider/modelProviderConfigSchemas.js.map +1 -1
- package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.d.ts +1 -0
- package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js +1 -0
- package/dist/oss/catalog/CatalogReferences/DatasetCatalogReference.js.map +1 -1
- package/dist-iife/cloud.js +21620 -6202
- package/dist-iife/community.js +14 -0
- package/dist-iife/enterprise.js +19404 -4038
- package/package.json +5 -2
- package/dist/enterprise/ai/chat/ChatSessionClient.d.ts +0 -18
- package/dist/enterprise/ai/chat/ChatSessionClient.js +0 -55
- package/dist/enterprise/ai/chat/ChatSessionClient.js.map +0 -1
- package/dist/enterprise/ai/chat/UserChatMessageContent.d.ts +0 -19
- package/dist/enterprise/ai/chat/UserChatMessageContent.js +0 -44
- package/dist/enterprise/ai/chat/UserChatMessageContent.js.map +0 -1
|
@@ -1,20 +1,688 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
1
|
import { ChatSession } from "./chat/ChatSession.ts";
|
|
3
2
|
import type { UserChatMessage } from "./chat/UserChatMessage.ts";
|
|
4
|
-
import { AgentChatResponse, type AgentResponseContent } from "./chat/eventWrappers/AgentChatResponse.ts";
|
|
5
3
|
import type { Logger, SonarV4Config, V4Config } from "../../common/Config.ts";
|
|
6
4
|
import { ModelProvider } from "./modelProvider/ModelProvider.ts";
|
|
7
5
|
import * as z from "zod/mini";
|
|
8
6
|
import { modelProviderCreateCodec } from "./modelProvider/modelProviderCodec.ts";
|
|
9
7
|
import type { SignalParam } from "../../common/Params.ts";
|
|
10
8
|
import { listModelsPropertiesSchema } from "./modelProvider/modelProviderConfigSchemas.ts";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
9
|
+
import { createConversationCodec } from "./conversations/methods/createConversation.ts";
|
|
10
|
+
import { AgentConversation, type ChatEvent } from "../interfaces.ts";
|
|
11
|
+
import type { HttpError } from "../../common/HttpError.ts";
|
|
12
|
+
export declare function listAvailableModels(config: V4Config): (properties: z.infer<typeof listModelsPropertiesSchema>, { signal }?: SignalParam) => import("ts-results-es").AsyncResult<Set<{
|
|
13
|
+
name: string;
|
|
14
|
+
isRecommended: boolean;
|
|
15
|
+
}>, HttpError>;
|
|
14
16
|
export declare class AIResource {
|
|
15
17
|
#private;
|
|
16
18
|
constructor(config: Logger & V4Config & SonarV4Config);
|
|
17
|
-
|
|
19
|
+
get conversationMachine(): import("xstate").StateMachine<import("./conversations/createConversationMachine.ts").ConversationMachineContext, {
|
|
20
|
+
type: "STOP_RUN";
|
|
21
|
+
} | {
|
|
22
|
+
type: "SUBMIT_USER_MESSAGE";
|
|
23
|
+
message: UserChatMessage;
|
|
24
|
+
} | {
|
|
25
|
+
type: "RETRY_MESSAGE";
|
|
26
|
+
} | {
|
|
27
|
+
type: "REFRESH_HISTORY";
|
|
28
|
+
}, {
|
|
29
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<AgentConversation, {
|
|
30
|
+
message: UserChatMessage;
|
|
31
|
+
modelName?: string | undefined;
|
|
32
|
+
modelProviderId?: string | undefined;
|
|
33
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
|
|
34
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
35
|
+
currentRunId: string | null;
|
|
36
|
+
id: string;
|
|
37
|
+
modelName: string | null;
|
|
38
|
+
modelProviderId: string | null;
|
|
39
|
+
modifiedAt: import("temporal-polyfill").Temporal.Instant;
|
|
40
|
+
tag: string;
|
|
41
|
+
title: string;
|
|
42
|
+
}, {
|
|
43
|
+
conversationId: string;
|
|
44
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
|
|
45
|
+
data: ({
|
|
46
|
+
conversationId: string;
|
|
47
|
+
modelName: string;
|
|
48
|
+
modelProviderId: string;
|
|
49
|
+
runId: string;
|
|
50
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
51
|
+
id: string;
|
|
52
|
+
content: {
|
|
53
|
+
chunkType: "conversationUpdate";
|
|
54
|
+
summary?: string | undefined;
|
|
55
|
+
title?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
role: "agent";
|
|
58
|
+
} | {
|
|
59
|
+
conversationId: string;
|
|
60
|
+
modelName: string;
|
|
61
|
+
modelProviderId: string;
|
|
62
|
+
runId: string;
|
|
63
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
64
|
+
id: string;
|
|
65
|
+
content: {
|
|
66
|
+
chunkType: "error";
|
|
67
|
+
message: string;
|
|
68
|
+
};
|
|
69
|
+
role: "agent";
|
|
70
|
+
} | {
|
|
71
|
+
conversationId: string;
|
|
72
|
+
modelName: string;
|
|
73
|
+
modelProviderId: string;
|
|
74
|
+
runId: string;
|
|
75
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
76
|
+
id: string;
|
|
77
|
+
content: {
|
|
78
|
+
chunkType: "model";
|
|
79
|
+
name: string;
|
|
80
|
+
result: Record<string, unknown>;
|
|
81
|
+
};
|
|
82
|
+
role: "agent";
|
|
83
|
+
} | {
|
|
84
|
+
conversationId: string;
|
|
85
|
+
modelName: string;
|
|
86
|
+
modelProviderId: string;
|
|
87
|
+
runId: string;
|
|
88
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
89
|
+
id: string;
|
|
90
|
+
content: {
|
|
91
|
+
arguments: Record<string, unknown>;
|
|
92
|
+
callId: string;
|
|
93
|
+
chunkType: "toolRequest";
|
|
94
|
+
name: string;
|
|
95
|
+
commentary?: string | undefined;
|
|
96
|
+
summarizedTitle?: string | undefined;
|
|
97
|
+
};
|
|
98
|
+
role: "agent";
|
|
99
|
+
} | {
|
|
100
|
+
conversationId: string;
|
|
101
|
+
modelName: string;
|
|
102
|
+
modelProviderId: string;
|
|
103
|
+
runId: string;
|
|
104
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
105
|
+
id: string;
|
|
106
|
+
content: {
|
|
107
|
+
callId: string;
|
|
108
|
+
chunkType: "toolResponse";
|
|
109
|
+
name: string;
|
|
110
|
+
result: Record<string, unknown>;
|
|
111
|
+
commentary?: string | undefined;
|
|
112
|
+
};
|
|
113
|
+
role: "agent";
|
|
114
|
+
} | {
|
|
115
|
+
conversationId: string;
|
|
116
|
+
modelName: string;
|
|
117
|
+
modelProviderId: string;
|
|
118
|
+
runId: string;
|
|
119
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
120
|
+
id: string;
|
|
121
|
+
content: {
|
|
122
|
+
chunkType: "userMessage";
|
|
123
|
+
text: string;
|
|
124
|
+
};
|
|
125
|
+
role: "user";
|
|
126
|
+
})[];
|
|
127
|
+
}, {
|
|
128
|
+
conversationId: string;
|
|
129
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
|
|
130
|
+
conversation: {
|
|
131
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
132
|
+
currentRunId: string | null;
|
|
133
|
+
id: string;
|
|
134
|
+
modelName: string | null;
|
|
135
|
+
modelProviderId: string | null;
|
|
136
|
+
modifiedAt: import("temporal-polyfill").Temporal.Instant;
|
|
137
|
+
tag: string;
|
|
138
|
+
title: string;
|
|
139
|
+
};
|
|
140
|
+
history: {
|
|
141
|
+
data: ({
|
|
142
|
+
conversationId: string;
|
|
143
|
+
modelName: string;
|
|
144
|
+
modelProviderId: string;
|
|
145
|
+
runId: string;
|
|
146
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
147
|
+
id: string;
|
|
148
|
+
content: {
|
|
149
|
+
chunkType: "conversationUpdate";
|
|
150
|
+
summary?: string | undefined;
|
|
151
|
+
title?: string | undefined;
|
|
152
|
+
};
|
|
153
|
+
role: "agent";
|
|
154
|
+
} | {
|
|
155
|
+
conversationId: string;
|
|
156
|
+
modelName: string;
|
|
157
|
+
modelProviderId: string;
|
|
158
|
+
runId: string;
|
|
159
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
160
|
+
id: string;
|
|
161
|
+
content: {
|
|
162
|
+
chunkType: "error";
|
|
163
|
+
message: string;
|
|
164
|
+
};
|
|
165
|
+
role: "agent";
|
|
166
|
+
} | {
|
|
167
|
+
conversationId: string;
|
|
168
|
+
modelName: string;
|
|
169
|
+
modelProviderId: string;
|
|
170
|
+
runId: string;
|
|
171
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
172
|
+
id: string;
|
|
173
|
+
content: {
|
|
174
|
+
chunkType: "model";
|
|
175
|
+
name: string;
|
|
176
|
+
result: Record<string, unknown>;
|
|
177
|
+
};
|
|
178
|
+
role: "agent";
|
|
179
|
+
} | {
|
|
180
|
+
conversationId: string;
|
|
181
|
+
modelName: string;
|
|
182
|
+
modelProviderId: string;
|
|
183
|
+
runId: string;
|
|
184
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
185
|
+
id: string;
|
|
186
|
+
content: {
|
|
187
|
+
arguments: Record<string, unknown>;
|
|
188
|
+
callId: string;
|
|
189
|
+
chunkType: "toolRequest";
|
|
190
|
+
name: string;
|
|
191
|
+
commentary?: string | undefined;
|
|
192
|
+
summarizedTitle?: string | undefined;
|
|
193
|
+
};
|
|
194
|
+
role: "agent";
|
|
195
|
+
} | {
|
|
196
|
+
conversationId: string;
|
|
197
|
+
modelName: string;
|
|
198
|
+
modelProviderId: string;
|
|
199
|
+
runId: string;
|
|
200
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
201
|
+
id: string;
|
|
202
|
+
content: {
|
|
203
|
+
callId: string;
|
|
204
|
+
chunkType: "toolResponse";
|
|
205
|
+
name: string;
|
|
206
|
+
result: Record<string, unknown>;
|
|
207
|
+
commentary?: string | undefined;
|
|
208
|
+
};
|
|
209
|
+
role: "agent";
|
|
210
|
+
} | {
|
|
211
|
+
conversationId: string;
|
|
212
|
+
modelName: string;
|
|
213
|
+
modelProviderId: string;
|
|
214
|
+
runId: string;
|
|
215
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
216
|
+
id: string;
|
|
217
|
+
content: {
|
|
218
|
+
chunkType: "userMessage";
|
|
219
|
+
text: string;
|
|
220
|
+
};
|
|
221
|
+
role: "user";
|
|
222
|
+
})[];
|
|
223
|
+
};
|
|
224
|
+
}, {
|
|
225
|
+
conversationId: string;
|
|
226
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
|
|
227
|
+
conversationProperties: {
|
|
228
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
229
|
+
currentRunId: string | null;
|
|
230
|
+
id: string;
|
|
231
|
+
modelName: string | null;
|
|
232
|
+
modelProviderId: string | null;
|
|
233
|
+
modifiedAt: import("temporal-polyfill").Temporal.Instant;
|
|
234
|
+
tag: string;
|
|
235
|
+
title: string;
|
|
236
|
+
};
|
|
237
|
+
currentRunId: string;
|
|
238
|
+
}, {
|
|
239
|
+
conversationId: string;
|
|
240
|
+
message: UserChatMessage;
|
|
241
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
|
|
242
|
+
conversationId: string;
|
|
243
|
+
runId: string;
|
|
244
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").ObservableActorLogic<{
|
|
245
|
+
conversationId: string;
|
|
246
|
+
modelName: string;
|
|
247
|
+
modelProviderId: string;
|
|
248
|
+
runId: string;
|
|
249
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
250
|
+
id: string;
|
|
251
|
+
content: {
|
|
252
|
+
chunkType: "conversationUpdate";
|
|
253
|
+
summary?: string | undefined;
|
|
254
|
+
title?: string | undefined;
|
|
255
|
+
};
|
|
256
|
+
role: "agent";
|
|
257
|
+
} | {
|
|
258
|
+
conversationId: string;
|
|
259
|
+
modelName: string;
|
|
260
|
+
modelProviderId: string;
|
|
261
|
+
runId: string;
|
|
262
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
263
|
+
id: string;
|
|
264
|
+
content: {
|
|
265
|
+
chunkType: "error";
|
|
266
|
+
message: string;
|
|
267
|
+
};
|
|
268
|
+
role: "agent";
|
|
269
|
+
} | {
|
|
270
|
+
conversationId: string;
|
|
271
|
+
modelName: string;
|
|
272
|
+
modelProviderId: string;
|
|
273
|
+
runId: string;
|
|
274
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
275
|
+
id: string;
|
|
276
|
+
content: {
|
|
277
|
+
chunkType: "model";
|
|
278
|
+
name: string;
|
|
279
|
+
result: Record<string, unknown>;
|
|
280
|
+
};
|
|
281
|
+
role: "agent";
|
|
282
|
+
} | {
|
|
283
|
+
conversationId: string;
|
|
284
|
+
modelName: string;
|
|
285
|
+
modelProviderId: string;
|
|
286
|
+
runId: string;
|
|
287
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
288
|
+
id: string;
|
|
289
|
+
content: {
|
|
290
|
+
arguments: Record<string, unknown>;
|
|
291
|
+
callId: string;
|
|
292
|
+
chunkType: "toolRequest";
|
|
293
|
+
name: string;
|
|
294
|
+
commentary?: string | undefined;
|
|
295
|
+
summarizedTitle?: string | undefined;
|
|
296
|
+
};
|
|
297
|
+
role: "agent";
|
|
298
|
+
} | {
|
|
299
|
+
conversationId: string;
|
|
300
|
+
modelName: string;
|
|
301
|
+
modelProviderId: string;
|
|
302
|
+
runId: string;
|
|
303
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
304
|
+
id: string;
|
|
305
|
+
content: {
|
|
306
|
+
callId: string;
|
|
307
|
+
chunkType: "toolResponse";
|
|
308
|
+
name: string;
|
|
309
|
+
result: Record<string, unknown>;
|
|
310
|
+
commentary?: string | undefined;
|
|
311
|
+
};
|
|
312
|
+
role: "agent";
|
|
313
|
+
} | {
|
|
314
|
+
conversationId: string;
|
|
315
|
+
modelName: string;
|
|
316
|
+
modelProviderId: string;
|
|
317
|
+
runId: string;
|
|
318
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
319
|
+
id: string;
|
|
320
|
+
content: {
|
|
321
|
+
chunkType: "userMessage";
|
|
322
|
+
text: string;
|
|
323
|
+
};
|
|
324
|
+
role: "user";
|
|
325
|
+
}, {
|
|
326
|
+
conversationId: string;
|
|
327
|
+
runId: string;
|
|
328
|
+
}, import("xstate").EventObject>> | undefined;
|
|
329
|
+
}, {
|
|
330
|
+
src: "createConversation";
|
|
331
|
+
logic: import("xstate").PromiseActorLogic<AgentConversation, {
|
|
332
|
+
message: UserChatMessage;
|
|
333
|
+
modelName?: string | undefined;
|
|
334
|
+
modelProviderId?: string | undefined;
|
|
335
|
+
}, import("xstate").EventObject>;
|
|
336
|
+
id: string | undefined;
|
|
337
|
+
} | {
|
|
338
|
+
src: "retrieveConversation";
|
|
339
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
340
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
341
|
+
currentRunId: string | null;
|
|
342
|
+
id: string;
|
|
343
|
+
modelName: string | null;
|
|
344
|
+
modelProviderId: string | null;
|
|
345
|
+
modifiedAt: import("temporal-polyfill").Temporal.Instant;
|
|
346
|
+
tag: string;
|
|
347
|
+
title: string;
|
|
348
|
+
}, {
|
|
349
|
+
conversationId: string;
|
|
350
|
+
}, import("xstate").EventObject>;
|
|
351
|
+
id: string | undefined;
|
|
352
|
+
} | {
|
|
353
|
+
src: "retrieveHistory";
|
|
354
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
355
|
+
data: ({
|
|
356
|
+
conversationId: string;
|
|
357
|
+
modelName: string;
|
|
358
|
+
modelProviderId: string;
|
|
359
|
+
runId: string;
|
|
360
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
361
|
+
id: string;
|
|
362
|
+
content: {
|
|
363
|
+
chunkType: "conversationUpdate";
|
|
364
|
+
summary?: string | undefined;
|
|
365
|
+
title?: string | undefined;
|
|
366
|
+
};
|
|
367
|
+
role: "agent";
|
|
368
|
+
} | {
|
|
369
|
+
conversationId: string;
|
|
370
|
+
modelName: string;
|
|
371
|
+
modelProviderId: string;
|
|
372
|
+
runId: string;
|
|
373
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
374
|
+
id: string;
|
|
375
|
+
content: {
|
|
376
|
+
chunkType: "error";
|
|
377
|
+
message: string;
|
|
378
|
+
};
|
|
379
|
+
role: "agent";
|
|
380
|
+
} | {
|
|
381
|
+
conversationId: string;
|
|
382
|
+
modelName: string;
|
|
383
|
+
modelProviderId: string;
|
|
384
|
+
runId: string;
|
|
385
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
386
|
+
id: string;
|
|
387
|
+
content: {
|
|
388
|
+
chunkType: "model";
|
|
389
|
+
name: string;
|
|
390
|
+
result: Record<string, unknown>;
|
|
391
|
+
};
|
|
392
|
+
role: "agent";
|
|
393
|
+
} | {
|
|
394
|
+
conversationId: string;
|
|
395
|
+
modelName: string;
|
|
396
|
+
modelProviderId: string;
|
|
397
|
+
runId: string;
|
|
398
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
399
|
+
id: string;
|
|
400
|
+
content: {
|
|
401
|
+
arguments: Record<string, unknown>;
|
|
402
|
+
callId: string;
|
|
403
|
+
chunkType: "toolRequest";
|
|
404
|
+
name: string;
|
|
405
|
+
commentary?: string | undefined;
|
|
406
|
+
summarizedTitle?: string | undefined;
|
|
407
|
+
};
|
|
408
|
+
role: "agent";
|
|
409
|
+
} | {
|
|
410
|
+
conversationId: string;
|
|
411
|
+
modelName: string;
|
|
412
|
+
modelProviderId: string;
|
|
413
|
+
runId: string;
|
|
414
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
415
|
+
id: string;
|
|
416
|
+
content: {
|
|
417
|
+
callId: string;
|
|
418
|
+
chunkType: "toolResponse";
|
|
419
|
+
name: string;
|
|
420
|
+
result: Record<string, unknown>;
|
|
421
|
+
commentary?: string | undefined;
|
|
422
|
+
};
|
|
423
|
+
role: "agent";
|
|
424
|
+
} | {
|
|
425
|
+
conversationId: string;
|
|
426
|
+
modelName: string;
|
|
427
|
+
modelProviderId: string;
|
|
428
|
+
runId: string;
|
|
429
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
430
|
+
id: string;
|
|
431
|
+
content: {
|
|
432
|
+
chunkType: "userMessage";
|
|
433
|
+
text: string;
|
|
434
|
+
};
|
|
435
|
+
role: "user";
|
|
436
|
+
})[];
|
|
437
|
+
}, {
|
|
438
|
+
conversationId: string;
|
|
439
|
+
}, import("xstate").EventObject>;
|
|
440
|
+
id: string | undefined;
|
|
441
|
+
} | {
|
|
442
|
+
src: "retrieveState";
|
|
443
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
444
|
+
conversation: {
|
|
445
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
446
|
+
currentRunId: string | null;
|
|
447
|
+
id: string;
|
|
448
|
+
modelName: string | null;
|
|
449
|
+
modelProviderId: string | null;
|
|
450
|
+
modifiedAt: import("temporal-polyfill").Temporal.Instant;
|
|
451
|
+
tag: string;
|
|
452
|
+
title: string;
|
|
453
|
+
};
|
|
454
|
+
history: {
|
|
455
|
+
data: ({
|
|
456
|
+
conversationId: string;
|
|
457
|
+
modelName: string;
|
|
458
|
+
modelProviderId: string;
|
|
459
|
+
runId: string;
|
|
460
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
461
|
+
id: string;
|
|
462
|
+
content: {
|
|
463
|
+
chunkType: "conversationUpdate";
|
|
464
|
+
summary?: string | undefined;
|
|
465
|
+
title?: string | undefined;
|
|
466
|
+
};
|
|
467
|
+
role: "agent";
|
|
468
|
+
} | {
|
|
469
|
+
conversationId: string;
|
|
470
|
+
modelName: string;
|
|
471
|
+
modelProviderId: string;
|
|
472
|
+
runId: string;
|
|
473
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
474
|
+
id: string;
|
|
475
|
+
content: {
|
|
476
|
+
chunkType: "error";
|
|
477
|
+
message: string;
|
|
478
|
+
};
|
|
479
|
+
role: "agent";
|
|
480
|
+
} | {
|
|
481
|
+
conversationId: string;
|
|
482
|
+
modelName: string;
|
|
483
|
+
modelProviderId: string;
|
|
484
|
+
runId: string;
|
|
485
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
486
|
+
id: string;
|
|
487
|
+
content: {
|
|
488
|
+
chunkType: "model";
|
|
489
|
+
name: string;
|
|
490
|
+
result: Record<string, unknown>;
|
|
491
|
+
};
|
|
492
|
+
role: "agent";
|
|
493
|
+
} | {
|
|
494
|
+
conversationId: string;
|
|
495
|
+
modelName: string;
|
|
496
|
+
modelProviderId: string;
|
|
497
|
+
runId: string;
|
|
498
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
499
|
+
id: string;
|
|
500
|
+
content: {
|
|
501
|
+
arguments: Record<string, unknown>;
|
|
502
|
+
callId: string;
|
|
503
|
+
chunkType: "toolRequest";
|
|
504
|
+
name: string;
|
|
505
|
+
commentary?: string | undefined;
|
|
506
|
+
summarizedTitle?: string | undefined;
|
|
507
|
+
};
|
|
508
|
+
role: "agent";
|
|
509
|
+
} | {
|
|
510
|
+
conversationId: string;
|
|
511
|
+
modelName: string;
|
|
512
|
+
modelProviderId: string;
|
|
513
|
+
runId: string;
|
|
514
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
515
|
+
id: string;
|
|
516
|
+
content: {
|
|
517
|
+
callId: string;
|
|
518
|
+
chunkType: "toolResponse";
|
|
519
|
+
name: string;
|
|
520
|
+
result: Record<string, unknown>;
|
|
521
|
+
commentary?: string | undefined;
|
|
522
|
+
};
|
|
523
|
+
role: "agent";
|
|
524
|
+
} | {
|
|
525
|
+
conversationId: string;
|
|
526
|
+
modelName: string;
|
|
527
|
+
modelProviderId: string;
|
|
528
|
+
runId: string;
|
|
529
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
530
|
+
id: string;
|
|
531
|
+
content: {
|
|
532
|
+
chunkType: "userMessage";
|
|
533
|
+
text: string;
|
|
534
|
+
};
|
|
535
|
+
role: "user";
|
|
536
|
+
})[];
|
|
537
|
+
};
|
|
538
|
+
}, {
|
|
539
|
+
conversationId: string;
|
|
540
|
+
}, import("xstate").EventObject>;
|
|
541
|
+
id: string | undefined;
|
|
542
|
+
} | {
|
|
543
|
+
src: "startRun";
|
|
544
|
+
logic: import("xstate").PromiseActorLogic<{
|
|
545
|
+
conversationProperties: {
|
|
546
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
547
|
+
currentRunId: string | null;
|
|
548
|
+
id: string;
|
|
549
|
+
modelName: string | null;
|
|
550
|
+
modelProviderId: string | null;
|
|
551
|
+
modifiedAt: import("temporal-polyfill").Temporal.Instant;
|
|
552
|
+
tag: string;
|
|
553
|
+
title: string;
|
|
554
|
+
};
|
|
555
|
+
currentRunId: string;
|
|
556
|
+
}, {
|
|
557
|
+
conversationId: string;
|
|
558
|
+
message: UserChatMessage;
|
|
559
|
+
}, import("xstate").EventObject>;
|
|
560
|
+
id: string | undefined;
|
|
561
|
+
} | {
|
|
562
|
+
src: "stopRun";
|
|
563
|
+
logic: import("xstate").PromiseActorLogic<void, {
|
|
564
|
+
conversationId: string;
|
|
565
|
+
runId: string;
|
|
566
|
+
}, import("xstate").EventObject>;
|
|
567
|
+
id: string | undefined;
|
|
568
|
+
} | {
|
|
569
|
+
src: "streamRun";
|
|
570
|
+
logic: import("xstate").ObservableActorLogic<{
|
|
571
|
+
conversationId: string;
|
|
572
|
+
modelName: string;
|
|
573
|
+
modelProviderId: string;
|
|
574
|
+
runId: string;
|
|
575
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
576
|
+
id: string;
|
|
577
|
+
content: {
|
|
578
|
+
chunkType: "conversationUpdate";
|
|
579
|
+
summary?: string | undefined;
|
|
580
|
+
title?: string | undefined;
|
|
581
|
+
};
|
|
582
|
+
role: "agent";
|
|
583
|
+
} | {
|
|
584
|
+
conversationId: string;
|
|
585
|
+
modelName: string;
|
|
586
|
+
modelProviderId: string;
|
|
587
|
+
runId: string;
|
|
588
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
589
|
+
id: string;
|
|
590
|
+
content: {
|
|
591
|
+
chunkType: "error";
|
|
592
|
+
message: string;
|
|
593
|
+
};
|
|
594
|
+
role: "agent";
|
|
595
|
+
} | {
|
|
596
|
+
conversationId: string;
|
|
597
|
+
modelName: string;
|
|
598
|
+
modelProviderId: string;
|
|
599
|
+
runId: string;
|
|
600
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
601
|
+
id: string;
|
|
602
|
+
content: {
|
|
603
|
+
chunkType: "model";
|
|
604
|
+
name: string;
|
|
605
|
+
result: Record<string, unknown>;
|
|
606
|
+
};
|
|
607
|
+
role: "agent";
|
|
608
|
+
} | {
|
|
609
|
+
conversationId: string;
|
|
610
|
+
modelName: string;
|
|
611
|
+
modelProviderId: string;
|
|
612
|
+
runId: string;
|
|
613
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
614
|
+
id: string;
|
|
615
|
+
content: {
|
|
616
|
+
arguments: Record<string, unknown>;
|
|
617
|
+
callId: string;
|
|
618
|
+
chunkType: "toolRequest";
|
|
619
|
+
name: string;
|
|
620
|
+
commentary?: string | undefined;
|
|
621
|
+
summarizedTitle?: string | undefined;
|
|
622
|
+
};
|
|
623
|
+
role: "agent";
|
|
624
|
+
} | {
|
|
625
|
+
conversationId: string;
|
|
626
|
+
modelName: string;
|
|
627
|
+
modelProviderId: string;
|
|
628
|
+
runId: string;
|
|
629
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
630
|
+
id: string;
|
|
631
|
+
content: {
|
|
632
|
+
callId: string;
|
|
633
|
+
chunkType: "toolResponse";
|
|
634
|
+
name: string;
|
|
635
|
+
result: Record<string, unknown>;
|
|
636
|
+
commentary?: string | undefined;
|
|
637
|
+
};
|
|
638
|
+
role: "agent";
|
|
639
|
+
} | {
|
|
640
|
+
conversationId: string;
|
|
641
|
+
modelName: string;
|
|
642
|
+
modelProviderId: string;
|
|
643
|
+
runId: string;
|
|
644
|
+
createdAt: import("temporal-polyfill").Temporal.Instant;
|
|
645
|
+
id: string;
|
|
646
|
+
content: {
|
|
647
|
+
chunkType: "userMessage";
|
|
648
|
+
text: string;
|
|
649
|
+
};
|
|
650
|
+
role: "user";
|
|
651
|
+
}, {
|
|
652
|
+
conversationId: string;
|
|
653
|
+
runId: string;
|
|
654
|
+
}, import("xstate").EventObject>;
|
|
655
|
+
id: string | undefined;
|
|
656
|
+
}, never, never, never, "uninitialized" | "creating_conversation" | "retrieving_history" | "idle" | "submitting_message" | "retrieve_history_failed" | "submitting_message_failed" | {
|
|
657
|
+
streaming: "monitoring_replies" | "stopping";
|
|
658
|
+
}, string, import("./conversations/createConversationMachine.ts").ConversationMachineInput, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
659
|
+
id: "agentConversation";
|
|
660
|
+
states: {
|
|
661
|
+
readonly creating_conversation: {};
|
|
662
|
+
readonly idle: {};
|
|
663
|
+
readonly retrieve_history_failed: {};
|
|
664
|
+
readonly retrieving_history: {};
|
|
665
|
+
readonly streaming: {
|
|
666
|
+
states: {
|
|
667
|
+
readonly monitoring_replies: {};
|
|
668
|
+
readonly stopping: {};
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
readonly submitting_message: {};
|
|
672
|
+
readonly submitting_message_failed: {};
|
|
673
|
+
readonly uninitialized: {};
|
|
674
|
+
};
|
|
675
|
+
}>;
|
|
676
|
+
createConversation(body: z.input<typeof createConversationCodec>): import("ts-results-es").AsyncResult<AgentConversation, HttpError>;
|
|
677
|
+
createModelProvider(properties: z.output<typeof modelProviderCreateCodec>): import("ts-results-es").AsyncResult<ModelProvider, HttpError>;
|
|
678
|
+
listConversations(): {
|
|
679
|
+
data({ signal }?: SignalParam): AsyncGenerator<AgentConversation, void, unknown>;
|
|
680
|
+
getPage: (params: {
|
|
681
|
+
maxResults: number;
|
|
682
|
+
}, { signal }?: SignalParam) => import("ts-results-es").AsyncResult<{
|
|
683
|
+
data: AgentConversation[];
|
|
684
|
+
}, HttpError>;
|
|
685
|
+
};
|
|
18
686
|
listModelProviders(): {
|
|
19
687
|
data({ signal }?: SignalParam): AsyncGenerator<import("ts-results-es").Ok<ModelProvider> | import("ts-results-es").Err<z.core.$ZodError<{
|
|
20
688
|
name: string;
|
|
@@ -54,6 +722,12 @@ export declare class AIResource {
|
|
|
54
722
|
organizationId: string;
|
|
55
723
|
region: "GLOBAL" | "US" | "EU";
|
|
56
724
|
};
|
|
725
|
+
} | {
|
|
726
|
+
openAiCompatibleApi: {
|
|
727
|
+
completionsApiUrl: string;
|
|
728
|
+
modelParameters?: string | undefined;
|
|
729
|
+
organizationId?: string | undefined;
|
|
730
|
+
};
|
|
57
731
|
};
|
|
58
732
|
defaultModelName: string;
|
|
59
733
|
isDefault: boolean;
|
|
@@ -100,6 +774,12 @@ export declare class AIResource {
|
|
|
100
774
|
organizationId: string;
|
|
101
775
|
region: "GLOBAL" | "US" | "EU";
|
|
102
776
|
};
|
|
777
|
+
} | {
|
|
778
|
+
openAiCompatibleApi: {
|
|
779
|
+
completionsApiUrl: string;
|
|
780
|
+
modelParameters?: string | undefined;
|
|
781
|
+
organizationId?: string | undefined;
|
|
782
|
+
};
|
|
103
783
|
};
|
|
104
784
|
defaultModelName: string;
|
|
105
785
|
isDefault: boolean;
|
|
@@ -107,21 +787,22 @@ export declare class AIResource {
|
|
|
107
787
|
modifiedAt: import("temporal-polyfill").Temporal.Instant;
|
|
108
788
|
sqlModelNames: Set<string>;
|
|
109
789
|
}>>)[];
|
|
110
|
-
},
|
|
790
|
+
}, HttpError>;
|
|
111
791
|
};
|
|
112
|
-
listAvailableModels(properties: z.infer<typeof listModelsPropertiesSchema>): import("ts-results-es").AsyncResult<Set<
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}):
|
|
121
|
-
createChatSessionClient(chatSession: ChatSession): ChatSessionClient;
|
|
792
|
+
listAvailableModels(properties: z.infer<typeof listModelsPropertiesSchema>): import("ts-results-es").AsyncResult<Set<{
|
|
793
|
+
name: string;
|
|
794
|
+
isRecommended: boolean;
|
|
795
|
+
}>, HttpError>;
|
|
796
|
+
retrieveConversation(id: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<AgentConversation, HttpError>;
|
|
797
|
+
retrieveConversationHistory(id: string): {
|
|
798
|
+
data(): AsyncGenerator<ChatEvent, void, HttpError>;
|
|
799
|
+
};
|
|
800
|
+
retrieveModelProvider(id: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<ModelProvider, HttpError>;
|
|
122
801
|
/**
|
|
123
802
|
* Sends a chat message to the Dremio AI Agent and returns an Observable containing
|
|
124
803
|
* Agent replies.
|
|
804
|
+
*
|
|
805
|
+
* @deprecated
|
|
125
806
|
*/
|
|
126
|
-
sendChatMessage(chatSession: ChatSession, userChatMessage: UserChatMessage): Observable<import("ts-results-es").Ok<AgentChatResponse<AgentResponseContent>> | import("ts-results-es").Err<
|
|
807
|
+
sendChatMessage(chatSession: ChatSession, userChatMessage: UserChatMessage): import("rxjs").Observable<import("ts-results-es").Ok<import("../interfaces.ts").AgentChatResponse<import("../interfaces.ts").AgentResponseContent>> | import("ts-results-es").Err<HttpError | import("../index.ts").Problem<"https://api.dremio.dev/problems/ai-agent/chat/agent-disabled" | "https://api.dremio.dev/problems/ai-agent/chat/input-too-large" | "https://api.dremio.dev/problems/ai-agent/chat/model-provider-not-found" | "https://api.dremio.dev/problems/ai-agent/chat/no-default-model-provider" | "https://api.dremio.dev/problems/ai-agent/chat/no-model-provider-privilege" | "https://api.dremio.dev/problems/ai-agent/chat/preview-disabled" | "https://api.dremio.dev/problems/ai-agent/chat/rate-limit-exceeded", undefined>>>;
|
|
127
808
|
}
|