@databricks/sdk-genie 0.49.0 → 0.53.0
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/dist/package.js +1 -1
- package/dist/v1/client.d.ts +34 -29
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +53 -30
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +2 -2
- package/dist/v1/model.d.ts +26 -11
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +10 -1
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/transport.js +11 -3
- package/dist/v1/transport.js.map +1 -1
- package/package.json +4 -4
package/dist/package.js
CHANGED
package/dist/v1/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DownloadMessageAttachmentVisualizationRequest, DownloadMessageAttachmentVisualizationResponse, GenieCreateConversationMessageRequest, GenieCreateEvalRunRequest, GenieCreateMessageCommentRequest, GenieCreateSpaceRequest, GenieDeleteConversationMessageRequest, GenieDeleteConversationRequest, GenieEvalResultDetails, GenieEvalRunResponse, GenieExecuteMessageAttachmentQueryRequest, GenieExecuteMessageQueryRequest, GenieGenerateDownloadFullQueryResultRequest, GenieGenerateDownloadFullQueryResultResponse, GenieGetConversationMessageRequest, GenieGetDownloadFullQueryResultRequest, GenieGetDownloadFullQueryResultResponse, GenieGetEvalResultDetailsRequest, GenieGetEvalRunRequest, GenieGetMessageAttachmentQueryResultRequest, GenieGetMessageQueryResultRequest, GenieGetMessageQueryResultResponse, GenieGetQueryResultByAttachmentRequest, GenieGetSpaceRequest, GenieListConversationCommentsRequest, GenieListConversationCommentsResponse, GenieListConversationMessagesRequest, GenieListConversationMessagesResponse, GenieListConversationsRequest, GenieListConversationsResponse, GenieListEvalResultsRequest, GenieListEvalResultsResponse, GenieListEvalRunsRequest, GenieListEvalRunsResponse, GenieListMessageCommentsRequest, GenieListMessageCommentsResponse, GenieListSpacesRequest, GenieListSpacesResponse, GenieMessage, GenieMessageComment, GenieSendMessageFeedbackRequest, GenieSpace, GenieStartConversationRequest, GenieTrashSpaceRequest, GenieUpdateSpaceRequest } from "./model.js";
|
|
1
|
+
import { DownloadMessageAttachmentVisualizationRequest, DownloadMessageAttachmentVisualizationResponse, GenieCancelResponseRequest, GenieCreateConversationMessageRequest, GenieCreateEvalRunRequest, GenieCreateMessageCommentRequest, GenieCreateSpaceRequest, GenieDeleteConversationMessageRequest, GenieDeleteConversationRequest, GenieEvalResultDetails, GenieEvalRunResponse, GenieExecuteMessageAttachmentQueryRequest, GenieExecuteMessageQueryRequest, GenieGenerateDownloadFullQueryResultRequest, GenieGenerateDownloadFullQueryResultResponse, GenieGetConversationMessageRequest, GenieGetDownloadFullQueryResultRequest, GenieGetDownloadFullQueryResultResponse, GenieGetEvalResultDetailsRequest, GenieGetEvalRunRequest, GenieGetMessageAttachmentQueryResultRequest, GenieGetMessageQueryResultRequest, GenieGetMessageQueryResultResponse, GenieGetQueryResultByAttachmentRequest, GenieGetSpaceRequest, GenieListConversationCommentsRequest, GenieListConversationCommentsResponse, GenieListConversationMessagesRequest, GenieListConversationMessagesResponse, GenieListConversationsRequest, GenieListConversationsResponse, GenieListEvalResultsRequest, GenieListEvalResultsResponse, GenieListEvalRunsRequest, GenieListEvalRunsResponse, GenieListMessageCommentsRequest, GenieListMessageCommentsResponse, GenieListSpacesRequest, GenieListSpacesResponse, GenieMessage, GenieMessageComment, GenieSendMessageFeedbackRequest, GenieSpace, GenieStartConversationRequest, GenieTrashSpaceRequest, GenieUpdateSpaceRequest } from "./model.js";
|
|
2
2
|
import { CallOptions } from "@databricks/sdk-options/call";
|
|
3
3
|
import { ClientOptions } from "@databricks/sdk-options/client";
|
|
4
4
|
import { LroOptions } from "@databricks/sdk-options/lro";
|
|
@@ -21,16 +21,22 @@ declare class GenieClient {
|
|
|
21
21
|
*/
|
|
22
22
|
downloadMessageAttachmentVisualization(req: DownloadMessageAttachmentVisualizationRequest, options?: CallOptions): Promise<DownloadMessageAttachmentVisualizationResponse>;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Cancels an in-flight agent-mode response. `response_id` is the id returned in the
|
|
25
|
+
* `response.created` event from the agent-mode responses endpoint. The response stops at
|
|
26
|
+
* the next agent boundary and its terminal state is returned.
|
|
27
|
+
*/
|
|
28
|
+
genieCancelResponse(req: GenieCancelResponseRequest, options?: CallOptions): Promise<GenieMessage>;
|
|
29
|
+
/**
|
|
30
|
+
* Sends a new message in a chat-mode [conversation](:method:genie/startconversation).
|
|
25
31
|
* The AI response uses all previously created messages in the conversation to respond.
|
|
26
32
|
*/
|
|
27
33
|
private genieCreateConversationMessageBase;
|
|
28
34
|
/**
|
|
29
|
-
*
|
|
35
|
+
* Sends a new message in a chat-mode [conversation](:method:genie/startconversation).
|
|
30
36
|
* The AI response uses all previously created messages in the conversation to respond.
|
|
31
37
|
*/
|
|
32
38
|
genieCreateConversationMessage(req: GenieCreateConversationMessageRequest, options?: CallOptions): Promise<GenieCreateConversationMessageWaiter>;
|
|
33
|
-
/**
|
|
39
|
+
/** Creates and runs chat-mode evaluations for multiple benchmark questions in a Genie space. */
|
|
34
40
|
genieCreateEvalRun(req: GenieCreateEvalRunRequest, options?: CallOptions): Promise<GenieEvalRunResponse>;
|
|
35
41
|
/** Create a comment on a conversation message. */
|
|
36
42
|
genieCreateMessageComment(req: GenieCreateMessageCommentRequest, options?: CallOptions): Promise<GenieMessageComment>;
|
|
@@ -51,24 +57,23 @@ declare class GenieClient {
|
|
|
51
57
|
*
|
|
52
58
|
* ### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**
|
|
53
59
|
*
|
|
54
|
-
* When you use the `EXTERNAL_LINKS` disposition, a
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* the URL.
|
|
60
|
+
* When you use the `EXTERNAL_LINKS` disposition, a short-lived cloud-storage URL is generated to download the
|
|
61
|
+
* results. The URL contains temporary access credentials, so protect it and do not set an `Authorization` header in
|
|
62
|
+
* the download request.
|
|
63
|
+
*
|
|
64
|
+
*
|
|
65
|
+
*
|
|
61
66
|
*
|
|
62
|
-
* Because URLs are already generated with
|
|
63
|
-
* embedded temporary s,
|
|
64
|
-
* you must not set an `Authorization` header in the download requests.
|
|
65
67
|
*
|
|
66
68
|
* See [Execute Statement](:method:statementexecution/executestatement) for more details.
|
|
67
69
|
*
|
|
68
70
|
* ----
|
|
69
71
|
*/
|
|
70
72
|
genieGenerateDownloadFullQueryResult(req: GenieGenerateDownloadFullQueryResultRequest, options?: CallOptions): Promise<GenieGenerateDownloadFullQueryResultResponse>;
|
|
71
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Gets a message from a chat-mode or agent-mode conversation.
|
|
75
|
+
* For a complete agent-mode transcript, use the List conversation items endpoint.
|
|
76
|
+
*/
|
|
72
77
|
genieGetConversationMessage(req: GenieGetConversationMessageRequest, options?: CallOptions): Promise<GenieMessage>;
|
|
73
78
|
/**
|
|
74
79
|
* After [Generating a Full Query Result Download](:method:genie/generatedownloadfullqueryresult) and successfully receiving a `download_id` and `download_id_signature`, use this API to poll the download progress.
|
|
@@ -79,17 +84,13 @@ declare class GenieClient {
|
|
|
79
84
|
*
|
|
80
85
|
* ### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**
|
|
81
86
|
*
|
|
82
|
-
* When you use the `EXTERNAL_LINKS` disposition, a
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* the URL.
|
|
87
|
+
* When you use the `EXTERNAL_LINKS` disposition, a short-lived cloud-storage URL is generated to download the
|
|
88
|
+
* results. The URL contains temporary access credentials, so protect it and do not set an `Authorization` header in
|
|
89
|
+
* the download request.
|
|
90
|
+
*
|
|
91
|
+
*
|
|
92
|
+
*
|
|
89
93
|
*
|
|
90
|
-
* Because URLs are already generated with
|
|
91
|
-
* embedded temporary s,
|
|
92
|
-
* you must not set an `Authorization` header in the download requests.
|
|
93
94
|
*
|
|
94
95
|
* See [Execute Statement](:method:statementexecution/executestatement) for more details.
|
|
95
96
|
*
|
|
@@ -113,7 +114,11 @@ declare class GenieClient {
|
|
|
113
114
|
genieGetSpace(req: GenieGetSpaceRequest, options?: CallOptions): Promise<GenieSpace>;
|
|
114
115
|
/** List all comments across all messages in a conversation. */
|
|
115
116
|
genieListConversationComments(req: GenieListConversationCommentsRequest, options?: CallOptions): Promise<GenieListConversationCommentsResponse>;
|
|
116
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* Lists messages in a chat-mode or agent-mode conversation.
|
|
119
|
+
* Agent-mode messages are returned as GenieMessage projections. Use the List conversation items
|
|
120
|
+
* endpoint for the complete reasoning and tool-call history.
|
|
121
|
+
*/
|
|
117
122
|
genieListConversationMessages(req: GenieListConversationMessagesRequest, options?: CallOptions): Promise<GenieListConversationMessagesResponse>;
|
|
118
123
|
/** Get a list of conversations in a Genie Space. */
|
|
119
124
|
genieListConversations(req: GenieListConversationsRequest, options?: CallOptions): Promise<GenieListConversationsResponse>;
|
|
@@ -125,11 +130,11 @@ declare class GenieClient {
|
|
|
125
130
|
genieListMessageComments(req: GenieListMessageCommentsRequest, options?: CallOptions): Promise<GenieListMessageCommentsResponse>;
|
|
126
131
|
/** Get list of Genie Spaces. */
|
|
127
132
|
genieListSpaces(req: GenieListSpacesRequest, options?: CallOptions): Promise<GenieListSpacesResponse>;
|
|
128
|
-
/**
|
|
133
|
+
/** Sends feedback for a message in a chat-mode or agent-mode conversation. */
|
|
129
134
|
genieSendMessageFeedback(req: GenieSendMessageFeedbackRequest, options?: CallOptions): Promise<void>;
|
|
130
|
-
/**
|
|
135
|
+
/** Starts a new chat-mode conversation and sends its first message. */
|
|
131
136
|
private genieStartConversationBase;
|
|
132
|
-
/**
|
|
137
|
+
/** Starts a new chat-mode conversation and sends its first message. */
|
|
133
138
|
genieStartConversation(req: GenieStartConversationRequest, options?: CallOptions): Promise<GenieStartConversationWaiter>;
|
|
134
139
|
/** Move a Genie Space to the trash. */
|
|
135
140
|
genieTrashSpace(req: GenieTrashSpaceRequest, options?: CallOptions): Promise<void>;
|
package/dist/v1/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","names":[],"sources":["../../src/v1/client.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../../src/v1/client.ts"],"mappings":";;;;;;cA4Ga,WAAA;EAAA,iBACM,OAAA;EAAA,iBACA,MAAA;EAAA,iBAIA,SAAA;EAAA,QAIT,MAAA;cAEI,OAAA,EAAS,aAAA;EAAA,QAUb,aAAA;EAQI;EAFN,WAAA,CACJ,GAAA,EAAK,uBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,UAAA;EAAR;;;;;;EAgCG,sCAAA,CACJ,GAAA,EAAK,6CAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,8CAAA;EAmCA;;;;;EAHL,mBAAA,CACJ,GAAA,EAAK,0BAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,YAAA;EA8FJ;;;;EAAA,QAhEO,kCAAA;EA+FF;;;;EA3DN,8BAAA,CACJ,GAAA,EAAK,qCAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,oCAAA;EA0FR;EAlEG,kBAAA,CACJ,GAAA,EAAK,yBAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,oBAAA;EAqFC;EA1DN,yBAAA,CACJ,GAAA,EAAK,gCAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,mBAAA;EA6EJ;EA/CD,uBAAA,CACJ,GAAA,EAAK,8BAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA;EA8CQ;EA1BL,8BAAA,CACJ,GAAA,EAAK,qCAAA,EACL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AAAA;AAAA,cAyBxB,4BAAA;EAAA,iBAEQ,MAAA;EAAA,SACR,SAAA;EAAA,SACA,cAAA;EAAA,SACA,OAAA;cAHQ,MAAA,EAAQ,WAAA,EAChB,SAAA,UACA,cAAA,UACA,OAAA;EApiCT;;;;;EA4iCI,IAAA,CAAK,OAAA,GAAU,UAAA,GAAa,OAAA,CAAQ,YAAA;EAjhC9B;EAwjCN,IAAA,CAAK,OAAA,GAAU,WAAA,GAAc,OAAA;AAAA"}
|
package/dist/v1/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveClientConfig } from "./transport.js";
|
|
2
2
|
import { StillRunningError, buildHttpRequest, executeCall, executeHttpCall, executeWait, marshalRequest, parseResponse, sendAndCheckError } from "./utils.js";
|
|
3
3
|
import { name, version } from "../package.js";
|
|
4
|
-
import { MessageStatus_MessageStatus, marshalGenieCreateConversationMessageRequestSchema, marshalGenieCreateEvalRunRequestSchema, marshalGenieCreateMessageCommentRequestSchema, marshalGenieCreateSpaceRequestSchema, marshalGenieExecuteMessageAttachmentQueryRequestSchema, marshalGenieExecuteMessageQueryRequestSchema, marshalGenieGenerateDownloadFullQueryResultRequestSchema, marshalGenieSendMessageFeedbackRequestSchema, marshalGenieStartConversationRequestSchema, marshalGenieUpdateSpaceRequestSchema, unmarshalGenieEvalResultDetailsSchema, unmarshalGenieEvalRunResponseSchema, unmarshalGenieGenerateDownloadFullQueryResultResponseSchema, unmarshalGenieGetDownloadFullQueryResultResponseSchema, unmarshalGenieGetMessageQueryResultResponseSchema, unmarshalGenieListConversationCommentsResponseSchema, unmarshalGenieListConversationMessagesResponseSchema, unmarshalGenieListConversationsResponseSchema, unmarshalGenieListEvalResultsResponseSchema, unmarshalGenieListEvalRunsResponseSchema, unmarshalGenieListMessageCommentsResponseSchema, unmarshalGenieListSpacesResponseSchema, unmarshalGenieMessageCommentSchema, unmarshalGenieMessageSchema, unmarshalGenieSpaceSchema, unmarshalGenieStartConversationResponseSchema } from "./model.js";
|
|
4
|
+
import { MessageStatus_MessageStatus, marshalGenieCancelResponseRequestSchema, marshalGenieCreateConversationMessageRequestSchema, marshalGenieCreateEvalRunRequestSchema, marshalGenieCreateMessageCommentRequestSchema, marshalGenieCreateSpaceRequestSchema, marshalGenieExecuteMessageAttachmentQueryRequestSchema, marshalGenieExecuteMessageQueryRequestSchema, marshalGenieGenerateDownloadFullQueryResultRequestSchema, marshalGenieSendMessageFeedbackRequestSchema, marshalGenieStartConversationRequestSchema, marshalGenieUpdateSpaceRequestSchema, unmarshalGenieEvalResultDetailsSchema, unmarshalGenieEvalRunResponseSchema, unmarshalGenieGenerateDownloadFullQueryResultResponseSchema, unmarshalGenieGetDownloadFullQueryResultResponseSchema, unmarshalGenieGetMessageQueryResultResponseSchema, unmarshalGenieListConversationCommentsResponseSchema, unmarshalGenieListConversationMessagesResponseSchema, unmarshalGenieListConversationsResponseSchema, unmarshalGenieListEvalResultsResponseSchema, unmarshalGenieListEvalRunsResponseSchema, unmarshalGenieListMessageCommentsResponseSchema, unmarshalGenieListSpacesResponseSchema, unmarshalGenieMessageCommentSchema, unmarshalGenieMessageSchema, unmarshalGenieSpaceSchema, unmarshalGenieStartConversationResponseSchema } from "./model.js";
|
|
5
5
|
import { VERSION } from "@databricks/sdk-auth";
|
|
6
6
|
import { createDefault } from "@databricks/sdk-core/clientinfo";
|
|
7
7
|
import { NoOpLogger } from "@databricks/sdk-core/logger";
|
|
@@ -62,7 +62,7 @@ var GenieClient = class {
|
|
|
62
62
|
const url = `${host}/api/2.0/genie/${req.name ?? ""}/download-visualization`;
|
|
63
63
|
let resp;
|
|
64
64
|
const call = async (callSignal) => {
|
|
65
|
-
const headers = new Headers();
|
|
65
|
+
const headers = new Headers({ Accept: "application/octet-stream" });
|
|
66
66
|
if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
|
|
67
67
|
headers.set("User-Agent", this.userAgent);
|
|
68
68
|
resp = { contents: (await sendAndCheckError({
|
|
@@ -76,7 +76,31 @@ var GenieClient = class {
|
|
|
76
76
|
return resp;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Cancels an in-flight agent-mode response. `response_id` is the id returned in the
|
|
80
|
+
* `response.created` event from the agent-mode responses endpoint. The response stops at
|
|
81
|
+
* the next agent boundary and its terminal state is returned.
|
|
82
|
+
*/
|
|
83
|
+
async genieCancelResponse(req, options) {
|
|
84
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
85
|
+
const url = `${host}/api/2.0/genie/agents/${req.agentId ?? ""}/conversations/${req.conversationId ?? ""}/responses/${req.responseId ?? ""}/cancel`;
|
|
86
|
+
const body = marshalRequest(req, marshalGenieCancelResponseRequestSchema);
|
|
87
|
+
let resp;
|
|
88
|
+
const call = async (callSignal) => {
|
|
89
|
+
const headers = new Headers({ "Content-Type": "application/json" });
|
|
90
|
+
if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
|
|
91
|
+
headers.set("User-Agent", this.userAgent);
|
|
92
|
+
resp = parseResponse(await executeHttpCall({
|
|
93
|
+
request: buildHttpRequest("POST", url, headers, callSignal, body),
|
|
94
|
+
httpClient,
|
|
95
|
+
logger: this.logger
|
|
96
|
+
}), unmarshalGenieMessageSchema);
|
|
97
|
+
};
|
|
98
|
+
await executeCall(call, options);
|
|
99
|
+
if (resp === void 0) throw new Error("operation completed without a result.");
|
|
100
|
+
return resp;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Sends a new message in a chat-mode [conversation](:method:genie/startconversation).
|
|
80
104
|
* The AI response uses all previously created messages in the conversation to respond.
|
|
81
105
|
*/
|
|
82
106
|
async genieCreateConversationMessageBase(req, options) {
|
|
@@ -99,7 +123,7 @@ var GenieClient = class {
|
|
|
99
123
|
return resp;
|
|
100
124
|
}
|
|
101
125
|
/**
|
|
102
|
-
*
|
|
126
|
+
* Sends a new message in a chat-mode [conversation](:method:genie/startconversation).
|
|
103
127
|
* The AI response uses all previously created messages in the conversation to respond.
|
|
104
128
|
*/
|
|
105
129
|
async genieCreateConversationMessage(req, options) {
|
|
@@ -109,7 +133,7 @@ var GenieClient = class {
|
|
|
109
133
|
if (req.spaceId === void 0) throw new Error("request field spaceId required for polling is missing");
|
|
110
134
|
return new GenieCreateConversationMessageWaiter(this, resp.messageId, req.conversationId, req.spaceId);
|
|
111
135
|
}
|
|
112
|
-
/**
|
|
136
|
+
/** Creates and runs chat-mode evaluations for multiple benchmark questions in a Genie space. */
|
|
113
137
|
async genieCreateEvalRun(req, options) {
|
|
114
138
|
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
115
139
|
const url = `${host}/api/2.0/genie/spaces/${req.spaceId ?? ""}/eval-runs`;
|
|
@@ -230,17 +254,13 @@ var GenieClient = class {
|
|
|
230
254
|
*
|
|
231
255
|
* ### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**
|
|
232
256
|
*
|
|
233
|
-
* When you use the `EXTERNAL_LINKS` disposition, a
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* the URL.
|
|
257
|
+
* When you use the `EXTERNAL_LINKS` disposition, a short-lived cloud-storage URL is generated to download the
|
|
258
|
+
* results. The URL contains temporary access credentials, so protect it and do not set an `Authorization` header in
|
|
259
|
+
* the download request.
|
|
260
|
+
*
|
|
261
|
+
*
|
|
262
|
+
*
|
|
240
263
|
*
|
|
241
|
-
* Because URLs are already generated with
|
|
242
|
-
* embedded temporary s,
|
|
243
|
-
* you must not set an `Authorization` header in the download requests.
|
|
244
264
|
*
|
|
245
265
|
* See [Execute Statement](:method:statementexecution/executestatement) for more details.
|
|
246
266
|
*
|
|
@@ -265,7 +285,10 @@ var GenieClient = class {
|
|
|
265
285
|
if (resp === void 0) throw new Error("operation completed without a result.");
|
|
266
286
|
return resp;
|
|
267
287
|
}
|
|
268
|
-
/**
|
|
288
|
+
/**
|
|
289
|
+
* Gets a message from a chat-mode or agent-mode conversation.
|
|
290
|
+
* For a complete agent-mode transcript, use the List conversation items endpoint.
|
|
291
|
+
*/
|
|
269
292
|
async genieGetConversationMessage(req, options) {
|
|
270
293
|
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
271
294
|
const url = `${host}/api/2.0/genie/spaces/${req.spaceId ?? ""}/conversations/${req.conversationId ?? ""}/messages/${req.messageId ?? ""}`;
|
|
@@ -293,17 +316,13 @@ var GenieClient = class {
|
|
|
293
316
|
*
|
|
294
317
|
* ### **Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition.**
|
|
295
318
|
*
|
|
296
|
-
* When you use the `EXTERNAL_LINKS` disposition, a
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
* the URL.
|
|
319
|
+
* When you use the `EXTERNAL_LINKS` disposition, a short-lived cloud-storage URL is generated to download the
|
|
320
|
+
* results. The URL contains temporary access credentials, so protect it and do not set an `Authorization` header in
|
|
321
|
+
* the download request.
|
|
322
|
+
*
|
|
323
|
+
*
|
|
324
|
+
*
|
|
303
325
|
*
|
|
304
|
-
* Because URLs are already generated with
|
|
305
|
-
* embedded temporary s,
|
|
306
|
-
* you must not set an `Authorization` header in the download requests.
|
|
307
326
|
*
|
|
308
327
|
* See [Execute Statement](:method:statementexecution/executestatement) for more details.
|
|
309
328
|
*
|
|
@@ -476,7 +495,11 @@ var GenieClient = class {
|
|
|
476
495
|
if (resp === void 0) throw new Error("operation completed without a result.");
|
|
477
496
|
return resp;
|
|
478
497
|
}
|
|
479
|
-
/**
|
|
498
|
+
/**
|
|
499
|
+
* Lists messages in a chat-mode or agent-mode conversation.
|
|
500
|
+
* Agent-mode messages are returned as GenieMessage projections. Use the List conversation items
|
|
501
|
+
* endpoint for the complete reasoning and tool-call history.
|
|
502
|
+
*/
|
|
480
503
|
async genieListConversationMessages(req, options) {
|
|
481
504
|
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
482
505
|
const url = `${host}/api/2.0/genie/spaces/${req.spaceId ?? ""}/conversations/${req.conversationId ?? ""}/messages`;
|
|
@@ -621,7 +644,7 @@ var GenieClient = class {
|
|
|
621
644
|
if (resp === void 0) throw new Error("operation completed without a result.");
|
|
622
645
|
return resp;
|
|
623
646
|
}
|
|
624
|
-
/**
|
|
647
|
+
/** Sends feedback for a message in a chat-mode or agent-mode conversation. */
|
|
625
648
|
async genieSendMessageFeedback(req, options) {
|
|
626
649
|
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
627
650
|
const url = `${host}/api/2.0/genie/spaces/${req.spaceId ?? ""}/conversations/${req.conversationId ?? ""}/messages/${req.messageId ?? ""}/feedback`;
|
|
@@ -638,7 +661,7 @@ var GenieClient = class {
|
|
|
638
661
|
};
|
|
639
662
|
await executeCall(call, options);
|
|
640
663
|
}
|
|
641
|
-
/**
|
|
664
|
+
/** Starts a new chat-mode conversation and sends its first message. */
|
|
642
665
|
async genieStartConversationBase(req, options) {
|
|
643
666
|
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
644
667
|
const url = `${host}/api/2.0/genie/spaces/${req.spaceId ?? ""}/start-conversation`;
|
|
@@ -658,7 +681,7 @@ var GenieClient = class {
|
|
|
658
681
|
if (resp === void 0) throw new Error("operation completed without a result.");
|
|
659
682
|
return resp;
|
|
660
683
|
}
|
|
661
|
-
/**
|
|
684
|
+
/** Starts a new chat-mode conversation and sends its first message. */
|
|
662
685
|
async genieStartConversation(req, options) {
|
|
663
686
|
const resp = await this.genieStartConversationBase(req, options);
|
|
664
687
|
if (resp.messageId === void 0) throw new Error("response field messageId required for polling is missing");
|