lemma-sdk 0.2.35 → 0.2.37
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 +126 -43
- package/dist/browser/lemma-client.js +456 -169
- package/dist/client.d.ts +1 -2
- package/dist/client.js +1 -3
- package/dist/index.d.ts +1 -1
- package/dist/namespaces/agents.js +1 -1
- package/dist/namespaces/conversations.d.ts +73 -0
- package/dist/namespaces/conversations.js +174 -0
- package/dist/namespaces/files.d.ts +24 -6
- package/dist/namespaces/files.js +25 -12
- package/dist/namespaces/integrations.d.ts +10 -2
- package/dist/namespaces/integrations.js +17 -2
- package/dist/namespaces/pod-surfaces.d.ts +1 -1
- package/dist/namespaces/pod-surfaces.js +6 -6
- package/dist/namespaces/tasks.d.ts +1 -5
- package/dist/namespaces/tasks.js +54 -12
- package/dist/openapi_client/index.d.ts +27 -34
- package/dist/openapi_client/index.js +9 -12
- package/dist/openapi_client/models/AdminConsentInfoResponse.d.ts +2 -2
- package/dist/openapi_client/models/AgentListResponse.d.ts +2 -4
- package/dist/openapi_client/models/AgentMessageResponse.d.ts +0 -3
- package/dist/openapi_client/models/{AvailableModels.d.ts → AgentModelName.d.ts} +4 -1
- package/dist/openapi_client/models/AgentModelName.js +18 -0
- package/dist/openapi_client/models/AgentResponse.d.ts +18 -13
- package/dist/openapi_client/models/AgentSurfaceListResponse.d.ts +6 -0
- package/dist/openapi_client/models/{AssistantSurfaceResponse.d.ts → AgentSurfaceResponse.d.ts} +6 -5
- package/dist/openapi_client/models/{AssistantSurfaceStatus.d.ts → AgentSurfaceStatus.d.ts} +1 -1
- package/dist/openapi_client/models/AgentSurfaceStatus.js +10 -0
- package/dist/openapi_client/models/{ToolSet.d.ts → AgentToolset.d.ts} +3 -5
- package/dist/openapi_client/models/AgentToolset.js +17 -0
- package/dist/openapi_client/models/ApplicationAccessConfig.d.ts +3 -5
- package/dist/openapi_client/models/ApplicationMode.d.ts +3 -3
- package/dist/openapi_client/models/ApplicationMode.js +3 -3
- package/dist/openapi_client/models/ConversationResponse.d.ts +9 -20
- package/dist/openapi_client/models/CreateAgentRequest.d.ts +11 -7
- package/dist/openapi_client/models/CreateConversationRequest.d.ts +4 -8
- package/dist/openapi_client/models/CreateFolderRequest.d.ts +2 -5
- package/dist/openapi_client/models/CreateFunctionRequest.d.ts +2 -2
- package/dist/openapi_client/models/CreateSurfaceRequest.d.ts +1 -1
- package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +2 -2
- package/dist/openapi_client/models/FeedbackCategory.d.ts +7 -0
- package/dist/openapi_client/models/FeedbackCategory.js +12 -0
- package/dist/openapi_client/models/FileNamespace.d.ts +4 -0
- package/dist/openapi_client/models/FileNamespace.js +9 -0
- package/dist/openapi_client/models/FileResponse.d.ts +2 -2
- package/dist/openapi_client/models/FlowRunEntity.d.ts +11 -1
- package/dist/openapi_client/models/FunctionResponse.d.ts +2 -2
- package/dist/openapi_client/models/HarnessKind.d.ts +7 -0
- package/dist/openapi_client/models/HarnessKind.js +12 -0
- package/dist/openapi_client/models/IntegrationHelperAgentRequest.d.ts +13 -0
- package/dist/openapi_client/models/IntegrationHelperAgentResponse.d.ts +25 -0
- package/dist/openapi_client/models/MessageListResponse.d.ts +6 -0
- package/dist/openapi_client/models/MessageResponse.d.ts +17 -0
- package/dist/openapi_client/models/OperationDetail.d.ts +3 -0
- package/dist/openapi_client/models/OperationDetailsBatchRequest.d.ts +9 -0
- package/dist/openapi_client/models/OperationDetailsBatchResponse.d.ts +18 -0
- package/dist/openapi_client/models/OperationDiscoverResponse.d.ts +26 -0
- package/dist/openapi_client/models/OperationSummary.d.ts +3 -0
- package/dist/openapi_client/models/OrganizationCreateRequest.d.ts +2 -0
- package/dist/openapi_client/models/OrganizationInvitationRequest.d.ts +1 -0
- package/dist/openapi_client/models/OrganizationInvitationResponse.d.ts +4 -0
- package/dist/openapi_client/models/OrganizationMessageResponse.d.ts +1 -0
- package/dist/openapi_client/models/OrganizationResponse.d.ts +2 -0
- package/dist/openapi_client/models/OrganizationSlugAvailabilityResponse.d.ts +7 -0
- package/dist/openapi_client/models/ReportFeedbackRequest.d.ts +30 -0
- package/dist/openapi_client/models/ReportFeedbackResponse.d.ts +25 -0
- package/dist/openapi_client/models/ResourceType.d.ts +0 -1
- package/dist/openapi_client/models/ResourceType.js +0 -1
- package/dist/openapi_client/models/SendMessageRequest.d.ts +5 -0
- package/dist/openapi_client/models/{ToolCallRequest.d.ts → ToolCallContent.d.ts} +1 -1
- package/dist/openapi_client/models/{ToolCallResponse.d.ts → ToolReturnContent.d.ts} +2 -1
- package/dist/openapi_client/models/UpdateAgentRequest.d.ts +11 -7
- package/dist/openapi_client/models/UpdateConversationRequest.d.ts +2 -5
- package/dist/openapi_client/models/UpdateFunctionRequest.d.ts +2 -2
- package/dist/openapi_client/models/WorkflowInstallListResponse.d.ts +4 -0
- package/dist/openapi_client/models/app__modules__agent__domain__value_objects__TableAccessEntry.d.ts +8 -0
- package/dist/openapi_client/models/{TableAccessEntry.d.ts → app__modules__function__api__schemas__function_schemas__TableAccessEntry.d.ts} +1 -1
- package/dist/openapi_client/models/update.d.ts +2 -2
- package/dist/openapi_client/services/AgentConversationsService.d.ts +97 -0
- package/dist/openapi_client/services/AgentConversationsService.js +217 -0
- package/dist/openapi_client/services/{AssistantSurfacesIngressService.d.ts → AgentSurfacesIngressService.d.ts} +2 -2
- package/dist/openapi_client/services/{AssistantSurfacesIngressService.js → AgentSurfacesIngressService.js} +2 -2
- package/dist/openapi_client/services/{AssistantSurfacesService.d.ts → AgentSurfacesService.d.ts} +11 -11
- package/dist/openapi_client/services/{AssistantSurfacesService.js → AgentSurfacesService.js} +10 -10
- package/dist/openapi_client/services/AgentToolsService.d.ts +24 -4
- package/dist/openapi_client/services/AgentToolsService.js +40 -4
- package/dist/openapi_client/services/AgentsService.d.ts +7 -7
- package/dist/openapi_client/services/AgentsService.js +8 -8
- package/dist/openapi_client/services/ApplicationsService.d.ts +10 -9
- package/dist/openapi_client/services/ApplicationsService.js +11 -10
- package/dist/openapi_client/services/FilesService.d.ts +17 -8
- package/dist/openapi_client/services/FilesService.js +25 -8
- package/dist/openapi_client/services/IntegrationsService.d.ts +3 -2
- package/dist/openapi_client/services/IntegrationsService.js +4 -2
- package/dist/openapi_client/services/OrganizationsService.d.ts +18 -0
- package/dist/openapi_client/services/OrganizationsService.js +40 -0
- package/dist/openapi_client/services/WorkflowsService.d.ts +10 -0
- package/dist/openapi_client/services/WorkflowsService.js +21 -0
- package/dist/react/useAgentRun.d.ts +28 -7
- package/dist/react/useAgentRun.js +120 -27
- package/dist/react/useAssistantController.d.ts +6 -2
- package/dist/react/useAssistantController.js +57 -14
- package/dist/react/useAssistantSession.d.ts +15 -3
- package/dist/react/useAssistantSession.js +19 -15
- package/dist/react/useConversationMessages.d.ts +6 -2
- package/dist/react/useConversationMessages.js +2 -1
- package/dist/react/useConversations.d.ts +6 -2
- package/dist/react/useConversations.js +7 -5
- package/dist/react/useCreateFolder.d.ts +4 -2
- package/dist/react/useCreateFolder.js +6 -3
- package/dist/react/useDeleteFile.d.ts +4 -1
- package/dist/react/useDeleteFile.js +3 -3
- package/dist/react/useFile.d.ts +4 -2
- package/dist/react/useFile.js +3 -3
- package/dist/react/useFilePreview.d.ts +4 -1
- package/dist/react/useFilePreview.js +5 -4
- package/dist/react/useFileTree.d.ts +4 -2
- package/dist/react/useFileTree.js +3 -2
- package/dist/react/useFiles.d.ts +4 -2
- package/dist/react/useFiles.js +5 -3
- package/dist/react/useUpdateFile.d.ts +4 -2
- package/dist/react/useUpdateFile.js +6 -3
- package/dist/react/useUploadFile.d.ts +4 -2
- package/dist/react/useUploadFile.js +6 -3
- package/dist/react/useWorkflowRun.js +1 -1
- package/dist/react/useWorkflowStart.js +1 -1
- package/dist/run-utils.d.ts +2 -1
- package/dist/types.d.ts +62 -6
- package/package.json +1 -1
- package/dist/namespaces/assistants.d.ts +0 -96
- package/dist/namespaces/assistants.js +0 -160
- package/dist/openapi_client/models/AddMessageRequest.d.ts +0 -6
- package/dist/openapi_client/models/AppDescriptorResponse.d.ts +0 -5
- package/dist/openapi_client/models/AssistantListResponse.d.ts +0 -6
- package/dist/openapi_client/models/AssistantResponse.d.ts +0 -23
- package/dist/openapi_client/models/AssistantSurfaceListResponse.d.ts +0 -6
- package/dist/openapi_client/models/AssistantSurfaceStatus.js +0 -10
- package/dist/openapi_client/models/AvailableModelInfo.d.ts +0 -8
- package/dist/openapi_client/models/AvailableModels.js +0 -15
- package/dist/openapi_client/models/AvailableModelsListResponse.d.ts +0 -7
- package/dist/openapi_client/models/ConversationMessageListResponse.d.ts +0 -6
- package/dist/openapi_client/models/ConversationMessageResponse.d.ts +0 -19
- package/dist/openapi_client/models/ConversationStatus.d.ts +0 -7
- package/dist/openapi_client/models/ConversationStatus.js +0 -12
- package/dist/openapi_client/models/ConversationType.d.ts +0 -8
- package/dist/openapi_client/models/ConversationType.js +0 -13
- package/dist/openapi_client/models/CreateAssistantRequest.d.ts +0 -18
- package/dist/openapi_client/models/CreateMessageRequest.d.ts +0 -6
- package/dist/openapi_client/models/CreateTaskRequest.d.ts +0 -10
- package/dist/openapi_client/models/FileVisibility.d.ts +0 -4
- package/dist/openapi_client/models/FileVisibility.js +0 -9
- package/dist/openapi_client/models/OperationListResponse.d.ts +0 -6
- package/dist/openapi_client/models/TaskListResponse.d.ts +0 -9
- package/dist/openapi_client/models/TaskMessageListResponse.d.ts +0 -9
- package/dist/openapi_client/models/TaskMessageResponse.d.ts +0 -15
- package/dist/openapi_client/models/TaskResponse.d.ts +0 -16
- package/dist/openapi_client/models/TaskResponse.js +0 -1
- package/dist/openapi_client/models/TaskStatus.d.ts +0 -12
- package/dist/openapi_client/models/TaskStatus.js +0 -17
- package/dist/openapi_client/models/ToolCallRequest.js +0 -1
- package/dist/openapi_client/models/ToolCallResponse.js +0 -1
- package/dist/openapi_client/models/ToolSet.js +0 -19
- package/dist/openapi_client/models/UpdateAssistantRequest.d.ts +0 -17
- package/dist/openapi_client/models/UpdateAssistantRequest.js +0 -1
- package/dist/openapi_client/services/AssistantsService.d.ts +0 -49
- package/dist/openapi_client/services/AssistantsService.js +0 -112
- package/dist/openapi_client/services/ConversationsService.d.ts +0 -88
- package/dist/openapi_client/services/ConversationsService.js +0 -202
- package/dist/openapi_client/services/TasksService.d.ts +0 -76
- package/dist/openapi_client/services/TasksService.js +0 -167
- /package/dist/openapi_client/models/{AddMessageRequest.js → AgentSurfaceListResponse.js} +0 -0
- /package/dist/openapi_client/models/{AppDescriptorResponse.js → AgentSurfaceResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantListResponse.js → IntegrationHelperAgentRequest.js} +0 -0
- /package/dist/openapi_client/models/{AssistantResponse.js → IntegrationHelperAgentResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantSurfaceListResponse.js → MessageListResponse.js} +0 -0
- /package/dist/openapi_client/models/{AssistantSurfaceResponse.js → MessageResponse.js} +0 -0
- /package/dist/openapi_client/models/{AvailableModelInfo.js → OperationDetailsBatchRequest.js} +0 -0
- /package/dist/openapi_client/models/{AvailableModelsListResponse.js → OperationDetailsBatchResponse.js} +0 -0
- /package/dist/openapi_client/models/{ConversationMessageListResponse.js → OperationDiscoverResponse.js} +0 -0
- /package/dist/openapi_client/models/{ConversationMessageResponse.js → OrganizationSlugAvailabilityResponse.js} +0 -0
- /package/dist/openapi_client/models/{CreateAssistantRequest.js → ReportFeedbackRequest.js} +0 -0
- /package/dist/openapi_client/models/{CreateMessageRequest.js → ReportFeedbackResponse.js} +0 -0
- /package/dist/openapi_client/models/{CreateTaskRequest.js → SendMessageRequest.js} +0 -0
- /package/dist/openapi_client/models/{OperationListResponse.js → ToolCallContent.js} +0 -0
- /package/dist/openapi_client/models/{TableAccessEntry.js → ToolReturnContent.js} +0 -0
- /package/dist/openapi_client/models/{TaskListResponse.js → WorkflowInstallListResponse.js} +0 -0
- /package/dist/openapi_client/models/{TaskMessageListResponse.js → app__modules__agent__domain__value_objects__TableAccessEntry.js} +0 -0
- /package/dist/openapi_client/models/{TaskMessageResponse.js → app__modules__function__api__schemas__function_schemas__TableAccessEntry.js} +0 -0
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import type { HttpClient } from "../http.js";
|
|
2
|
-
import type { AvailableModelsListResponse } from "../openapi_client/models/AvailableModelsListResponse.js";
|
|
3
|
-
import type { AssistantListResponse } from "../openapi_client/models/AssistantListResponse.js";
|
|
4
|
-
import type { AssistantResponse } from "../openapi_client/models/AssistantResponse.js";
|
|
5
|
-
import type { ConversationListResponse } from "../openapi_client/models/ConversationListResponse.js";
|
|
6
|
-
import type { ConversationMessageListResponse } from "../openapi_client/models/ConversationMessageListResponse.js";
|
|
7
|
-
import type { ConversationResponse } from "../openapi_client/models/ConversationResponse.js";
|
|
8
|
-
import type { CreateAssistantRequest } from "../openapi_client/models/CreateAssistantRequest.js";
|
|
9
|
-
import type { CreateConversationRequest } from "../openapi_client/models/CreateConversationRequest.js";
|
|
10
|
-
import type { CreateMessageRequest } from "../openapi_client/models/CreateMessageRequest.js";
|
|
11
|
-
import type { UpdateAssistantRequest } from "../openapi_client/models/UpdateAssistantRequest.js";
|
|
12
|
-
import type { UpdateConversationRequest } from "../openapi_client/models/UpdateConversationRequest.js";
|
|
13
|
-
export declare class AssistantsNamespace {
|
|
14
|
-
private readonly http;
|
|
15
|
-
private readonly podId;
|
|
16
|
-
constructor(http: HttpClient, podId: () => string);
|
|
17
|
-
list(options?: {
|
|
18
|
-
limit?: number;
|
|
19
|
-
page_token?: string;
|
|
20
|
-
}): Promise<AssistantListResponse>;
|
|
21
|
-
create(payload: CreateAssistantRequest): Promise<AssistantResponse>;
|
|
22
|
-
get(assistantName: string): Promise<AssistantResponse>;
|
|
23
|
-
update(assistantName: string, payload: UpdateAssistantRequest): Promise<AssistantResponse>;
|
|
24
|
-
delete(assistantName: string): Promise<void>;
|
|
25
|
-
}
|
|
26
|
-
export declare class ConversationsNamespace {
|
|
27
|
-
private readonly http;
|
|
28
|
-
private readonly podId;
|
|
29
|
-
constructor(http: HttpClient, podId: () => string);
|
|
30
|
-
private resolvePodId;
|
|
31
|
-
private requirePodId;
|
|
32
|
-
list(options?: {
|
|
33
|
-
assistant_name?: string;
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Use assistant_name instead.
|
|
36
|
-
*/
|
|
37
|
-
assistant_id?: string;
|
|
38
|
-
pod_id?: string;
|
|
39
|
-
organization_id?: string;
|
|
40
|
-
global_only?: boolean;
|
|
41
|
-
limit?: number;
|
|
42
|
-
page_token?: string;
|
|
43
|
-
}): Promise<ConversationListResponse>;
|
|
44
|
-
listByAssistant(assistantName: string, options?: {
|
|
45
|
-
pod_id?: string;
|
|
46
|
-
organization_id?: string;
|
|
47
|
-
global_only?: boolean;
|
|
48
|
-
limit?: number;
|
|
49
|
-
page_token?: string;
|
|
50
|
-
}): Promise<ConversationListResponse>;
|
|
51
|
-
listByAssistantName(assistantName: string, options?: {
|
|
52
|
-
pod_id?: string;
|
|
53
|
-
organization_id?: string;
|
|
54
|
-
global_only?: boolean;
|
|
55
|
-
limit?: number;
|
|
56
|
-
page_token?: string;
|
|
57
|
-
}): Promise<ConversationListResponse>;
|
|
58
|
-
listModels(): Promise<AvailableModelsListResponse>;
|
|
59
|
-
create(payload: CreateConversationRequest & {
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated Use assistant_name instead.
|
|
62
|
-
*/
|
|
63
|
-
assistant_id?: string | null;
|
|
64
|
-
}): Promise<ConversationResponse>;
|
|
65
|
-
createForAssistant(assistantName: string, payload?: Omit<CreateConversationRequest, "assistant_name">): Promise<ConversationResponse>;
|
|
66
|
-
get(conversationId: string, options?: {
|
|
67
|
-
pod_id?: string;
|
|
68
|
-
}): Promise<ConversationResponse>;
|
|
69
|
-
update(conversationId: string, payload: UpdateConversationRequest, options?: {
|
|
70
|
-
pod_id?: string;
|
|
71
|
-
}): Promise<ConversationResponse>;
|
|
72
|
-
delete(conversationId: string, options?: {
|
|
73
|
-
pod_id?: string;
|
|
74
|
-
}): Promise<unknown>;
|
|
75
|
-
sendMessageStream(conversationId: string, payload: CreateMessageRequest, options?: {
|
|
76
|
-
pod_id?: string;
|
|
77
|
-
signal?: AbortSignal;
|
|
78
|
-
}): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
|
|
79
|
-
resumeStream(conversationId: string, options?: {
|
|
80
|
-
pod_id?: string;
|
|
81
|
-
signal?: AbortSignal;
|
|
82
|
-
}): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
|
|
83
|
-
stopRun(conversationId: string, options?: {
|
|
84
|
-
pod_id?: string;
|
|
85
|
-
}): Promise<unknown>;
|
|
86
|
-
readonly messages: {
|
|
87
|
-
list: (conversationId: string, options?: {
|
|
88
|
-
limit?: number;
|
|
89
|
-
page_token?: string;
|
|
90
|
-
pod_id?: string;
|
|
91
|
-
}) => Promise<ConversationMessageListResponse>;
|
|
92
|
-
send: (conversationId: string, payload: CreateMessageRequest, options?: {
|
|
93
|
-
pod_id?: string;
|
|
94
|
-
}) => Promise<unknown>;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
export class AssistantsNamespace {
|
|
2
|
-
http;
|
|
3
|
-
podId;
|
|
4
|
-
constructor(http, podId) {
|
|
5
|
-
this.http = http;
|
|
6
|
-
this.podId = podId;
|
|
7
|
-
}
|
|
8
|
-
list(options = {}) {
|
|
9
|
-
return this.http.request("GET", `/pods/${this.podId()}/assistants`, {
|
|
10
|
-
params: {
|
|
11
|
-
limit: options.limit ?? 100,
|
|
12
|
-
page_token: options.page_token,
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
create(payload) {
|
|
17
|
-
return this.http.request("POST", `/pods/${this.podId()}/assistants`, { body: payload });
|
|
18
|
-
}
|
|
19
|
-
get(assistantName) {
|
|
20
|
-
return this.http.request("GET", `/pods/${this.podId()}/assistants/${assistantName}`);
|
|
21
|
-
}
|
|
22
|
-
update(assistantName, payload) {
|
|
23
|
-
return this.http.request("PATCH", `/pods/${this.podId()}/assistants/${assistantName}`, {
|
|
24
|
-
body: payload,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
delete(assistantName) {
|
|
28
|
-
return this.http.request("DELETE", `/pods/${this.podId()}/assistants/${assistantName}`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export class ConversationsNamespace {
|
|
32
|
-
http;
|
|
33
|
-
podId;
|
|
34
|
-
constructor(http, podId) {
|
|
35
|
-
this.http = http;
|
|
36
|
-
this.podId = podId;
|
|
37
|
-
}
|
|
38
|
-
resolvePodId(explicitPodId) {
|
|
39
|
-
if (typeof explicitPodId === "string") {
|
|
40
|
-
return explicitPodId;
|
|
41
|
-
}
|
|
42
|
-
try {
|
|
43
|
-
return this.podId();
|
|
44
|
-
}
|
|
45
|
-
catch {
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
requirePodId(explicitPodId) {
|
|
50
|
-
const podId = this.resolvePodId(explicitPodId);
|
|
51
|
-
if (!podId) {
|
|
52
|
-
throw new Error("pod_id is required for this conversation operation.");
|
|
53
|
-
}
|
|
54
|
-
return podId;
|
|
55
|
-
}
|
|
56
|
-
list(options = {}) {
|
|
57
|
-
return this.http.request("GET", "/conversations", {
|
|
58
|
-
params: {
|
|
59
|
-
assistant_name: options.assistant_name ?? options.assistant_id,
|
|
60
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
61
|
-
organization_id: options.organization_id,
|
|
62
|
-
global_only: options.global_only ?? false,
|
|
63
|
-
limit: options.limit ?? 20,
|
|
64
|
-
page_token: options.page_token,
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
listByAssistant(assistantName, options = {}) {
|
|
69
|
-
return this.list({ ...options, assistant_name: assistantName });
|
|
70
|
-
}
|
|
71
|
-
listByAssistantName(assistantName, options = {}) {
|
|
72
|
-
return this.listByAssistant(assistantName, options);
|
|
73
|
-
}
|
|
74
|
-
listModels() {
|
|
75
|
-
return this.http.request("GET", "/models");
|
|
76
|
-
}
|
|
77
|
-
create(payload) {
|
|
78
|
-
const { assistant_id, ...requestBody } = payload;
|
|
79
|
-
return this.http.request("POST", "/conversations", {
|
|
80
|
-
body: {
|
|
81
|
-
...requestBody,
|
|
82
|
-
pod_id: this.resolvePodId(requestBody.pod_id),
|
|
83
|
-
assistant_name: requestBody.assistant_name ?? assistant_id,
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
createForAssistant(assistantName, payload = {}) {
|
|
88
|
-
return this.create({
|
|
89
|
-
...payload,
|
|
90
|
-
assistant_name: assistantName,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
get(conversationId, options = {}) {
|
|
94
|
-
return this.http.request("GET", `/conversations/${conversationId}`, {
|
|
95
|
-
params: {
|
|
96
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
update(conversationId, payload, options = {}) {
|
|
101
|
-
return this.http.request("PATCH", `/conversations/${conversationId}`, {
|
|
102
|
-
params: {
|
|
103
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
104
|
-
},
|
|
105
|
-
body: payload,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
delete(conversationId, options = {}) {
|
|
109
|
-
const scopedPodId = this.requirePodId(options.pod_id);
|
|
110
|
-
return this.http.request("DELETE", `/pods/${scopedPodId}/conversations/${conversationId}`);
|
|
111
|
-
}
|
|
112
|
-
sendMessageStream(conversationId, payload, options = {}) {
|
|
113
|
-
return this.http.stream(`/conversations/${conversationId}/messages`, {
|
|
114
|
-
method: "POST",
|
|
115
|
-
params: {
|
|
116
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
117
|
-
},
|
|
118
|
-
body: payload,
|
|
119
|
-
signal: options.signal,
|
|
120
|
-
headers: {
|
|
121
|
-
"Content-Type": "application/json",
|
|
122
|
-
Accept: "text/event-stream",
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
resumeStream(conversationId, options = {}) {
|
|
127
|
-
return this.http.stream(`/conversations/${conversationId}/stream`, {
|
|
128
|
-
params: {
|
|
129
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
130
|
-
},
|
|
131
|
-
signal: options.signal,
|
|
132
|
-
headers: {
|
|
133
|
-
Accept: "text/event-stream",
|
|
134
|
-
},
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
stopRun(conversationId, options = {}) {
|
|
138
|
-
return this.http.request("PATCH", `/conversations/${conversationId}/stop`, {
|
|
139
|
-
params: {
|
|
140
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
141
|
-
},
|
|
142
|
-
body: {},
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
messages = {
|
|
146
|
-
list: (conversationId, options = {}) => this.http.request("GET", `/conversations/${conversationId}/messages`, {
|
|
147
|
-
params: {
|
|
148
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
149
|
-
limit: options.limit ?? 20,
|
|
150
|
-
page_token: options.page_token,
|
|
151
|
-
},
|
|
152
|
-
}),
|
|
153
|
-
send: (conversationId, payload, options = {}) => this.http.request("POST", `/conversations/${conversationId}/messages`, {
|
|
154
|
-
params: {
|
|
155
|
-
pod_id: this.resolvePodId(options.pod_id),
|
|
156
|
-
},
|
|
157
|
-
body: payload,
|
|
158
|
-
}),
|
|
159
|
-
};
|
|
160
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ApplicationAccessConfig } from './ApplicationAccessConfig.js';
|
|
2
|
-
import type { TableAccessEntry } from './TableAccessEntry.js';
|
|
3
|
-
import type { ToolSet } from './ToolSet.js';
|
|
4
|
-
/**
|
|
5
|
-
* Response for assistant.
|
|
6
|
-
*/
|
|
7
|
-
export type AssistantResponse = {
|
|
8
|
-
accessible_applications: Array<ApplicationAccessConfig>;
|
|
9
|
-
accessible_folders: Array<string>;
|
|
10
|
-
accessible_tables: Array<TableAccessEntry>;
|
|
11
|
-
agent_names: Array<string>;
|
|
12
|
-
created_at: any;
|
|
13
|
-
description: (string | null);
|
|
14
|
-
function_names: Array<string>;
|
|
15
|
-
icon_url: (string | null);
|
|
16
|
-
id: string;
|
|
17
|
-
instruction: string;
|
|
18
|
-
name: string;
|
|
19
|
-
pod_id: string;
|
|
20
|
-
tool_sets: Array<ToolSet>;
|
|
21
|
-
updated_at: any;
|
|
22
|
-
user_id: string;
|
|
23
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
export var AssistantSurfaceStatus;
|
|
6
|
-
(function (AssistantSurfaceStatus) {
|
|
7
|
-
AssistantSurfaceStatus["ACTIVE"] = "ACTIVE";
|
|
8
|
-
AssistantSurfaceStatus["PENDING_ADMIN_CONSENT"] = "PENDING_ADMIN_CONSENT";
|
|
9
|
-
AssistantSurfaceStatus["INACTIVE"] = "INACTIVE";
|
|
10
|
-
})(AssistantSurfaceStatus || (AssistantSurfaceStatus = {}));
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
export var AvailableModels;
|
|
6
|
-
(function (AvailableModels) {
|
|
7
|
-
AvailableModels["GEMINI_PRO"] = "GEMINI_PRO";
|
|
8
|
-
AvailableModels["GEMINI_FLASH"] = "GEMINI_FLASH";
|
|
9
|
-
AvailableModels["GEMINI_FLASH_LITE"] = "GEMINI_FLASH_LITE";
|
|
10
|
-
AvailableModels["KIMI_K2"] = "KIMI_K2";
|
|
11
|
-
AvailableModels["GPT_OSS"] = "GPT_OSS";
|
|
12
|
-
AvailableModels["DEEPSEEK_V32"] = "DEEPSEEK_V32";
|
|
13
|
-
AvailableModels["GLM_5"] = "GLM_5";
|
|
14
|
-
AvailableModels["QWEN3_6"] = "QWEN3_6";
|
|
15
|
-
})(AvailableModels || (AvailableModels = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { NotificationContent } from './NotificationContent.js';
|
|
2
|
-
import type { TextContent } from './TextContent.js';
|
|
3
|
-
import type { ThinkingContent } from './ThinkingContent.js';
|
|
4
|
-
import type { ToolCallRequest } from './ToolCallRequest.js';
|
|
5
|
-
import type { ToolCallResponse } from './ToolCallResponse.js';
|
|
6
|
-
/**
|
|
7
|
-
* Saved conversation message.
|
|
8
|
-
*/
|
|
9
|
-
export type ConversationMessageResponse = {
|
|
10
|
-
content: (NotificationContent | TextContent | ThinkingContent | ToolCallRequest | ToolCallResponse);
|
|
11
|
-
conversation_id?: (string | null);
|
|
12
|
-
created_at: string;
|
|
13
|
-
external_message_id?: (string | null);
|
|
14
|
-
external_user_id?: (string | null);
|
|
15
|
-
id: string;
|
|
16
|
-
metadata?: (Record<string, any> | null);
|
|
17
|
-
role: string;
|
|
18
|
-
user_id?: (string | null);
|
|
19
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
/**
|
|
6
|
-
* Execution state of a conversation.
|
|
7
|
-
*/
|
|
8
|
-
export var ConversationStatus;
|
|
9
|
-
(function (ConversationStatus) {
|
|
10
|
-
ConversationStatus["WAITING"] = "waiting";
|
|
11
|
-
ConversationStatus["RUNNING"] = "running";
|
|
12
|
-
})(ConversationStatus || (ConversationStatus = {}));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
/**
|
|
6
|
-
* Conversation channel/source classification.
|
|
7
|
-
*/
|
|
8
|
-
export var ConversationType;
|
|
9
|
-
(function (ConversationType) {
|
|
10
|
-
ConversationType["INTERNAL"] = "INTERNAL";
|
|
11
|
-
ConversationType["EXTERNAL_DM"] = "EXTERNAL_DM";
|
|
12
|
-
ConversationType["EXTERNAL_GROUP"] = "EXTERNAL_GROUP";
|
|
13
|
-
})(ConversationType || (ConversationType = {}));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ApplicationAccessConfig } from './ApplicationAccessConfig.js';
|
|
2
|
-
import type { TableAccessEntry } from './TableAccessEntry.js';
|
|
3
|
-
import type { ToolSet } from './ToolSet.js';
|
|
4
|
-
/**
|
|
5
|
-
* Request to create an assistant.
|
|
6
|
-
*/
|
|
7
|
-
export type CreateAssistantRequest = {
|
|
8
|
-
accessible_applications?: Array<ApplicationAccessConfig>;
|
|
9
|
-
accessible_folders?: Array<string>;
|
|
10
|
-
accessible_tables?: Array<TableAccessEntry>;
|
|
11
|
-
agent_names?: Array<string>;
|
|
12
|
-
description?: (string | null);
|
|
13
|
-
function_names?: Array<string>;
|
|
14
|
-
icon_url?: (string | null);
|
|
15
|
-
instruction: string;
|
|
16
|
-
name: string;
|
|
17
|
-
tool_sets?: Array<ToolSet>;
|
|
18
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
export var FileVisibility;
|
|
6
|
-
(function (FileVisibility) {
|
|
7
|
-
FileVisibility["PRIVATE"] = "PRIVATE";
|
|
8
|
-
FileVisibility["POD"] = "POD";
|
|
9
|
-
})(FileVisibility || (FileVisibility = {}));
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { NotificationContent } from './NotificationContent.js';
|
|
2
|
-
import type { TextContent } from './TextContent.js';
|
|
3
|
-
import type { ThinkingContent } from './ThinkingContent.js';
|
|
4
|
-
import type { ToolCallRequest } from './ToolCallRequest.js';
|
|
5
|
-
import type { ToolCallResponse } from './ToolCallResponse.js';
|
|
6
|
-
/**
|
|
7
|
-
* Response schema for task message.
|
|
8
|
-
*/
|
|
9
|
-
export type TaskMessageResponse = {
|
|
10
|
-
content: (NotificationContent | TextContent | ThinkingContent | ToolCallRequest | ToolCallResponse);
|
|
11
|
-
created_at: string;
|
|
12
|
-
id: string;
|
|
13
|
-
metadata?: (Record<string, any> | null);
|
|
14
|
-
role: string;
|
|
15
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { TaskStatus } from './TaskStatus.js';
|
|
2
|
-
/**
|
|
3
|
-
* Response schema for task.
|
|
4
|
-
*/
|
|
5
|
-
export type TaskResponse = {
|
|
6
|
-
agent_id: string;
|
|
7
|
-
created_at: string;
|
|
8
|
-
error: (string | null);
|
|
9
|
-
id: string;
|
|
10
|
-
input_data: (Record<string, any> | null);
|
|
11
|
-
output_data: (Record<string, any> | null);
|
|
12
|
-
pod_id: string;
|
|
13
|
-
status: TaskStatus;
|
|
14
|
-
updated_at: string;
|
|
15
|
-
user_id: string;
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
/**
|
|
6
|
-
* Status of a task execution.
|
|
7
|
-
*/
|
|
8
|
-
export var TaskStatus;
|
|
9
|
-
(function (TaskStatus) {
|
|
10
|
-
TaskStatus["PENDING"] = "PENDING";
|
|
11
|
-
TaskStatus["RUNNING"] = "RUNNING";
|
|
12
|
-
TaskStatus["WAITING"] = "WAITING";
|
|
13
|
-
TaskStatus["COMPLETED"] = "COMPLETED";
|
|
14
|
-
TaskStatus["FAILED"] = "FAILED";
|
|
15
|
-
TaskStatus["CANCELLED"] = "CANCELLED";
|
|
16
|
-
TaskStatus["STOPPED"] = "STOPPED";
|
|
17
|
-
})(TaskStatus || (TaskStatus = {}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
/**
|
|
6
|
-
* Tool sets available for agents.
|
|
7
|
-
*/
|
|
8
|
-
export var ToolSet;
|
|
9
|
-
(function (ToolSet) {
|
|
10
|
-
ToolSet["FILE_SYSTEM"] = "FILE_SYSTEM";
|
|
11
|
-
ToolSet["CODE_EXECUTOR"] = "CODE_EXECUTOR";
|
|
12
|
-
ToolSet["WORKSPACE_CLI"] = "WORKSPACE_CLI";
|
|
13
|
-
ToolSet["SKILLS"] = "SKILLS";
|
|
14
|
-
ToolSet["WEB_SEARCH"] = "WEB_SEARCH";
|
|
15
|
-
ToolSet["USER_INTERACTION"] = "USER_INTERACTION";
|
|
16
|
-
ToolSet["IMAGE_GENERATION"] = "IMAGE_GENERATION";
|
|
17
|
-
ToolSet["AUDIO_GENERATION"] = "AUDIO_GENERATION";
|
|
18
|
-
ToolSet["WAIT_UNTIL"] = "WAIT_UNTIL";
|
|
19
|
-
})(ToolSet || (ToolSet = {}));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ApplicationAccessConfig } from './ApplicationAccessConfig.js';
|
|
2
|
-
import type { TableAccessEntry } from './TableAccessEntry.js';
|
|
3
|
-
import type { ToolSet } from './ToolSet.js';
|
|
4
|
-
/**
|
|
5
|
-
* Request to update an assistant.
|
|
6
|
-
*/
|
|
7
|
-
export type UpdateAssistantRequest = {
|
|
8
|
-
accessible_applications?: (Array<ApplicationAccessConfig> | null);
|
|
9
|
-
accessible_folders?: (Array<string> | null);
|
|
10
|
-
accessible_tables?: (Array<TableAccessEntry> | null);
|
|
11
|
-
agent_names?: (Array<string> | null);
|
|
12
|
-
description?: (string | null);
|
|
13
|
-
function_names?: (Array<string> | null);
|
|
14
|
-
icon_url?: (string | null);
|
|
15
|
-
instruction?: (string | null);
|
|
16
|
-
tool_sets?: (Array<ToolSet> | null);
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|