sarvam-agents-client 0.1.2 → 0.2.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 +15 -0
- package/dist/apis/AgentConversationsApi.d.ts +44 -1
- package/dist/apis/AgentConversationsApi.js +104 -1
- package/dist/apis/AgentsApi.d.ts +77 -5
- package/dist/apis/AgentsApi.js +163 -5
- package/dist/apis/AppsApi.d.ts +43 -1
- package/dist/apis/AppsApi.js +108 -0
- package/dist/apis/ArtifactsApi.d.ts +31 -1
- package/dist/apis/ArtifactsApi.js +82 -0
- package/dist/apis/CustomAPIsApi.d.ts +124 -0
- package/dist/apis/CustomAPIsApi.js +305 -0
- package/dist/apis/ModelsApi.d.ts +26 -0
- package/dist/apis/ModelsApi.js +52 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/compose/agent.d.ts +44 -0
- package/dist/compose/agent.js +222 -0
- package/dist/compose/builtins.d.ts +4 -0
- package/dist/compose/builtins.js +22 -0
- package/dist/compose/deploy.d.ts +30 -0
- package/dist/compose/deploy.js +146 -0
- package/dist/compose/errors.d.ts +48 -0
- package/dist/compose/errors.js +68 -0
- package/dist/compose/events.d.ts +63 -0
- package/dist/compose/events.js +100 -0
- package/dist/compose/fingerprint.d.ts +6 -0
- package/dist/compose/fingerprint.js +83 -0
- package/dist/compose/index.d.ts +13 -0
- package/dist/compose/index.js +33 -0
- package/dist/compose/run.d.ts +100 -0
- package/dist/compose/run.js +536 -0
- package/dist/compose/runState.d.ts +26 -0
- package/dist/compose/runState.js +79 -0
- package/dist/compose/settingsTransport.d.ts +24 -0
- package/dist/compose/settingsTransport.js +280 -0
- package/dist/compose/tools.d.ts +17 -0
- package/dist/compose/tools.js +44 -0
- package/dist/compose/transport.d.ts +34 -0
- package/dist/compose/transport.js +2 -0
- package/dist/esm/apis/AgentConversationsApi.d.ts +44 -1
- package/dist/esm/apis/AgentConversationsApi.js +104 -1
- package/dist/esm/apis/AgentsApi.d.ts +77 -5
- package/dist/esm/apis/AgentsApi.js +163 -5
- package/dist/esm/apis/AppsApi.d.ts +43 -1
- package/dist/esm/apis/AppsApi.js +109 -1
- package/dist/esm/apis/ArtifactsApi.d.ts +31 -1
- package/dist/esm/apis/ArtifactsApi.js +83 -1
- package/dist/esm/apis/CustomAPIsApi.d.ts +124 -0
- package/dist/esm/apis/CustomAPIsApi.js +301 -0
- package/dist/esm/apis/ModelsApi.d.ts +26 -0
- package/dist/esm/apis/ModelsApi.js +48 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/compose/agent.d.ts +44 -0
- package/dist/esm/compose/agent.js +218 -0
- package/dist/esm/compose/builtins.d.ts +4 -0
- package/dist/esm/compose/builtins.js +18 -0
- package/dist/esm/compose/deploy.d.ts +30 -0
- package/dist/esm/compose/deploy.js +137 -0
- package/dist/esm/compose/errors.d.ts +48 -0
- package/dist/esm/compose/errors.js +53 -0
- package/dist/esm/compose/events.d.ts +63 -0
- package/dist/esm/compose/events.js +97 -0
- package/dist/esm/compose/fingerprint.d.ts +6 -0
- package/dist/esm/compose/fingerprint.js +78 -0
- package/dist/esm/compose/index.d.ts +13 -0
- package/dist/esm/compose/index.js +8 -0
- package/dist/esm/compose/run.d.ts +100 -0
- package/dist/esm/compose/run.js +530 -0
- package/dist/esm/compose/runState.d.ts +26 -0
- package/dist/esm/compose/runState.js +75 -0
- package/dist/esm/compose/settingsTransport.d.ts +24 -0
- package/dist/esm/compose/settingsTransport.js +276 -0
- package/dist/esm/compose/tools.d.ts +17 -0
- package/dist/esm/compose/tools.js +34 -0
- package/dist/esm/compose/transport.d.ts +34 -0
- package/dist/esm/compose/transport.js +1 -0
- package/dist/esm/models/AgentChannelRef.d.ts +1 -0
- package/dist/esm/models/AgentChannelRef.js +2 -1
- package/dist/esm/models/AgentConversationDetail.d.ts +15 -2
- package/dist/esm/models/AgentConversationDetail.js +6 -4
- package/dist/esm/models/AgentConversationView.d.ts +11 -5
- package/dist/esm/models/AgentConversationView.js +4 -4
- package/dist/esm/models/AgentCreate.d.ts +8 -0
- package/dist/esm/models/AgentCreate.js +2 -0
- package/dist/esm/models/AgentCustomApiList.d.ts +33 -0
- package/dist/esm/models/AgentCustomApiList.js +44 -0
- package/dist/esm/models/AgentResource.d.ts +14 -0
- package/dist/esm/models/AgentResource.js +4 -0
- package/dist/esm/models/AgentSettingsResponse.d.ts +53 -0
- package/dist/esm/models/AgentSettingsResponse.js +52 -0
- package/dist/esm/models/AgentUpdate.d.ts +8 -0
- package/dist/esm/models/AgentUpdate.js +2 -0
- package/dist/esm/models/AppAccountView.d.ts +88 -0
- package/dist/esm/models/AppAccountView.js +79 -0
- package/dist/esm/models/AppAccountsView.d.ts +66 -0
- package/dist/esm/models/AppAccountsView.js +60 -0
- package/dist/esm/models/AppResource.d.ts +36 -0
- package/dist/esm/models/AppResource.js +12 -0
- package/dist/esm/models/AppResourceCheckView.d.ts +74 -0
- package/dist/esm/models/AppResourceCheckView.js +63 -0
- package/dist/esm/models/AppResourceView.d.ts +68 -0
- package/dist/esm/models/AppResourceView.js +67 -0
- package/dist/esm/models/AppResourcesView.d.ts +54 -0
- package/dist/esm/models/AppResourcesView.js +56 -0
- package/dist/esm/models/AppToolsResponse.d.ts +14 -0
- package/dist/esm/models/AppToolsResponse.js +4 -0
- package/dist/esm/models/AppView.d.ts +42 -0
- package/dist/esm/models/AppView.js +14 -0
- package/dist/esm/models/ArtifactVersionResponse.d.ts +94 -0
- package/dist/esm/models/ArtifactVersionResponse.js +80 -0
- package/dist/esm/models/AttachedAgent.d.ts +44 -0
- package/dist/esm/models/AttachedAgent.js +49 -0
- package/dist/esm/models/Auth.d.ts +30 -0
- package/dist/esm/models/Auth.js +52 -0
- package/dist/esm/models/BindCustomApiBody.d.ts +32 -0
- package/dist/esm/models/BindCustomApiBody.js +43 -0
- package/dist/esm/models/ConversationArtifact.d.ts +14 -0
- package/dist/esm/models/ConversationArtifact.js +9 -0
- package/dist/esm/models/CustomApi.d.ts +102 -0
- package/dist/esm/models/CustomApi.js +90 -0
- package/dist/esm/models/CustomApiBasicAuth.d.ts +51 -0
- package/dist/esm/models/CustomApiBasicAuth.js +57 -0
- package/dist/esm/models/CustomApiBearerAuth.d.ts +45 -0
- package/dist/esm/models/CustomApiBearerAuth.js +53 -0
- package/dist/esm/models/CustomApiCreate.d.ts +57 -0
- package/dist/esm/models/CustomApiCreate.js +56 -0
- package/dist/esm/models/CustomApiHeader.d.ts +44 -0
- package/dist/esm/models/CustomApiHeader.js +47 -0
- package/dist/esm/models/CustomApiHeadersAuth.d.ts +46 -0
- package/dist/esm/models/CustomApiHeadersAuth.js +54 -0
- package/dist/esm/models/CustomApiList.d.ts +64 -0
- package/dist/esm/models/CustomApiList.js +64 -0
- package/dist/esm/models/CustomApiName.d.ts +44 -0
- package/dist/esm/models/CustomApiName.js +49 -0
- package/dist/esm/models/CustomApiUpdate.d.ts +58 -0
- package/dist/esm/models/CustomApiUpdate.js +50 -0
- package/dist/esm/models/CustomApiUpdateAuth.d.ts +30 -0
- package/dist/esm/models/CustomApiUpdateAuth.js +52 -0
- package/dist/esm/models/ErrorDetailItem.d.ts +5 -0
- package/dist/esm/models/ListModels403Response.d.ts +23 -0
- package/dist/esm/models/ListModels403Response.js +45 -0
- package/dist/esm/models/ModelEndpointView.d.ts +38 -0
- package/dist/esm/models/ModelEndpointView.js +45 -0
- package/dist/esm/models/ModelView.d.ts +69 -0
- package/dist/esm/models/ModelView.js +56 -0
- package/dist/esm/models/ModelsResponse.d.ts +33 -0
- package/dist/esm/models/ModelsResponse.js +44 -0
- package/dist/esm/models/SettingsIssueView.d.ts +44 -0
- package/dist/esm/models/SettingsIssueView.js +51 -0
- package/dist/esm/models/VersionCommitBody.d.ts +44 -0
- package/dist/esm/models/VersionCommitBody.js +51 -0
- package/dist/esm/models/VersionUploadUrlBody.d.ts +32 -0
- package/dist/esm/models/VersionUploadUrlBody.js +43 -0
- package/dist/esm/models/index.d.ts +28 -0
- package/dist/esm/models/index.js +28 -0
- package/dist/models/AgentChannelRef.d.ts +1 -0
- package/dist/models/AgentChannelRef.js +2 -1
- package/dist/models/AgentConversationDetail.d.ts +15 -2
- package/dist/models/AgentConversationDetail.js +6 -4
- package/dist/models/AgentConversationView.d.ts +11 -5
- package/dist/models/AgentConversationView.js +4 -4
- package/dist/models/AgentCreate.d.ts +8 -0
- package/dist/models/AgentCreate.js +2 -0
- package/dist/models/AgentCustomApiList.d.ts +33 -0
- package/dist/models/AgentCustomApiList.js +51 -0
- package/dist/models/AgentResource.d.ts +14 -0
- package/dist/models/AgentResource.js +4 -0
- package/dist/models/AgentSettingsResponse.d.ts +53 -0
- package/dist/models/AgentSettingsResponse.js +59 -0
- package/dist/models/AgentUpdate.d.ts +8 -0
- package/dist/models/AgentUpdate.js +2 -0
- package/dist/models/AppAccountView.d.ts +88 -0
- package/dist/models/AppAccountView.js +87 -0
- package/dist/models/AppAccountsView.d.ts +66 -0
- package/dist/models/AppAccountsView.js +68 -0
- package/dist/models/AppResource.d.ts +36 -0
- package/dist/models/AppResource.js +12 -0
- package/dist/models/AppResourceCheckView.d.ts +74 -0
- package/dist/models/AppResourceCheckView.js +71 -0
- package/dist/models/AppResourceView.d.ts +68 -0
- package/dist/models/AppResourceView.js +74 -0
- package/dist/models/AppResourcesView.d.ts +54 -0
- package/dist/models/AppResourcesView.js +64 -0
- package/dist/models/AppToolsResponse.d.ts +14 -0
- package/dist/models/AppToolsResponse.js +4 -0
- package/dist/models/AppView.d.ts +42 -0
- package/dist/models/AppView.js +14 -0
- package/dist/models/ArtifactVersionResponse.d.ts +94 -0
- package/dist/models/ArtifactVersionResponse.js +88 -0
- package/dist/models/AttachedAgent.d.ts +44 -0
- package/dist/models/AttachedAgent.js +56 -0
- package/dist/models/Auth.d.ts +30 -0
- package/dist/models/Auth.js +58 -0
- package/dist/models/BindCustomApiBody.d.ts +32 -0
- package/dist/models/BindCustomApiBody.js +50 -0
- package/dist/models/ConversationArtifact.d.ts +14 -0
- package/dist/models/ConversationArtifact.js +10 -0
- package/dist/models/CustomApi.d.ts +102 -0
- package/dist/models/CustomApi.js +98 -0
- package/dist/models/CustomApiBasicAuth.d.ts +51 -0
- package/dist/models/CustomApiBasicAuth.js +65 -0
- package/dist/models/CustomApiBearerAuth.d.ts +45 -0
- package/dist/models/CustomApiBearerAuth.js +61 -0
- package/dist/models/CustomApiCreate.d.ts +57 -0
- package/dist/models/CustomApiCreate.js +63 -0
- package/dist/models/CustomApiHeader.d.ts +44 -0
- package/dist/models/CustomApiHeader.js +54 -0
- package/dist/models/CustomApiHeadersAuth.d.ts +46 -0
- package/dist/models/CustomApiHeadersAuth.js +62 -0
- package/dist/models/CustomApiList.d.ts +64 -0
- package/dist/models/CustomApiList.js +71 -0
- package/dist/models/CustomApiName.d.ts +44 -0
- package/dist/models/CustomApiName.js +56 -0
- package/dist/models/CustomApiUpdate.d.ts +58 -0
- package/dist/models/CustomApiUpdate.js +57 -0
- package/dist/models/CustomApiUpdateAuth.d.ts +30 -0
- package/dist/models/CustomApiUpdateAuth.js +58 -0
- package/dist/models/ErrorDetailItem.d.ts +5 -0
- package/dist/models/ListModels403Response.d.ts +23 -0
- package/dist/models/ListModels403Response.js +51 -0
- package/dist/models/ModelEndpointView.d.ts +38 -0
- package/dist/models/ModelEndpointView.js +52 -0
- package/dist/models/ModelView.d.ts +69 -0
- package/dist/models/ModelView.js +63 -0
- package/dist/models/ModelsResponse.d.ts +33 -0
- package/dist/models/ModelsResponse.js +51 -0
- package/dist/models/SettingsIssueView.d.ts +44 -0
- package/dist/models/SettingsIssueView.js +58 -0
- package/dist/models/VersionCommitBody.d.ts +44 -0
- package/dist/models/VersionCommitBody.js +58 -0
- package/dist/models/VersionUploadUrlBody.d.ts +32 -0
- package/dist/models/VersionUploadUrlBody.js +50 -0
- package/dist/models/index.d.ts +28 -0
- package/dist/models/index.js +28 -0
- package/package.json +15 -2
- package/src/apis/AgentConversationsApi.ts +172 -3
- package/src/apis/AgentsApi.ts +242 -7
- package/src/apis/AppsApi.ts +174 -3
- package/src/apis/ArtifactsApi.ts +144 -0
- package/src/apis/ClarifyApi.ts +3 -3
- package/src/apis/CollectionsApi.ts +3 -3
- package/src/apis/ConversationsApi.ts +3 -3
- package/src/apis/CronsApi.ts +3 -3
- package/src/apis/CustomAPIsApi.ts +471 -0
- package/src/apis/MessagesApi.ts +3 -3
- package/src/apis/ModelsApi.ts +70 -0
- package/src/apis/QueueApi.ts +3 -3
- package/src/apis/ResponsesApi.ts +3 -3
- package/src/apis/SkillsApi.ts +3 -3
- package/src/apis/index.ts +2 -0
- package/src/compose/agent.ts +254 -0
- package/src/compose/builtins.ts +19 -0
- package/src/compose/deploy.ts +168 -0
- package/src/compose/errors.ts +66 -0
- package/src/compose/events.ts +122 -0
- package/src/compose/fingerprint.ts +74 -0
- package/src/compose/index.ts +13 -0
- package/src/compose/run.ts +601 -0
- package/src/compose/runState.ts +95 -0
- package/src/compose/settingsTransport.ts +299 -0
- package/src/compose/tools.ts +42 -0
- package/src/compose/transport.ts +48 -0
- package/src/models/AgentChannelRef.ts +2 -1
- package/src/models/AgentConversationDetail.ts +21 -5
- package/src/models/AgentConversationView.ts +15 -8
- package/src/models/AgentCreate.ts +8 -0
- package/src/models/AgentCustomApiList.ts +74 -0
- package/src/models/AgentResource.ts +16 -0
- package/src/models/AgentSettingsResponse.ts +99 -0
- package/src/models/AgentUpdate.ts +8 -0
- package/src/models/AppAccountView.ts +143 -0
- package/src/models/AppAccountsView.ts +118 -0
- package/src/models/AppResource.ts +48 -0
- package/src/models/AppResourceCheckView.ts +117 -0
- package/src/models/AppResourceView.ts +120 -0
- package/src/models/AppResourcesView.ts +102 -0
- package/src/models/AppToolsResponse.ts +16 -0
- package/src/models/AppView.ts +56 -0
- package/src/models/ArtifactVersionResponse.ts +155 -0
- package/src/models/AttachedAgent.ts +83 -0
- package/src/models/Auth.ts +84 -0
- package/src/models/BindCustomApiBody.ts +66 -0
- package/src/models/ConversationArtifact.ts +19 -0
- package/src/models/CustomApi.ts +175 -0
- package/src/models/CustomApiBasicAuth.ts +94 -0
- package/src/models/CustomApiBearerAuth.ts +85 -0
- package/src/models/CustomApiCreate.ts +108 -0
- package/src/models/CustomApiHeader.ts +82 -0
- package/src/models/CustomApiHeadersAuth.ts +93 -0
- package/src/models/CustomApiList.ts +120 -0
- package/src/models/CustomApiName.ts +83 -0
- package/src/models/CustomApiUpdate.ts +106 -0
- package/src/models/CustomApiUpdateAuth.ts +84 -0
- package/src/models/ErrorDetailItem.ts +5 -0
- package/src/models/ListModels403Response.ts +73 -0
- package/src/models/ModelEndpointView.ts +74 -0
- package/src/models/ModelView.ts +122 -0
- package/src/models/ModelsResponse.ts +74 -0
- package/src/models/SettingsIssueView.ts +84 -0
- package/src/models/VersionCommitBody.ts +84 -0
- package/src/models/VersionUploadUrlBody.ts +66 -0
- package/src/models/index.ts +28 -0
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Sarvam Agents API
|
|
5
|
+
* Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
* Contact: support@sarvam.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime.js';
|
|
17
|
+
import type {
|
|
18
|
+
AgentCustomApiList,
|
|
19
|
+
BindCustomApiBody,
|
|
20
|
+
ChatError,
|
|
21
|
+
CustomApi,
|
|
22
|
+
CustomApiCreate,
|
|
23
|
+
CustomApiList,
|
|
24
|
+
CustomApiUpdate,
|
|
25
|
+
HTTPValidationError,
|
|
26
|
+
ListModels403Response,
|
|
27
|
+
Scope,
|
|
28
|
+
} from '../models/index.js';
|
|
29
|
+
import {
|
|
30
|
+
AgentCustomApiListFromJSON,
|
|
31
|
+
AgentCustomApiListToJSON,
|
|
32
|
+
BindCustomApiBodyFromJSON,
|
|
33
|
+
BindCustomApiBodyToJSON,
|
|
34
|
+
ChatErrorFromJSON,
|
|
35
|
+
ChatErrorToJSON,
|
|
36
|
+
CustomApiFromJSON,
|
|
37
|
+
CustomApiToJSON,
|
|
38
|
+
CustomApiCreateFromJSON,
|
|
39
|
+
CustomApiCreateToJSON,
|
|
40
|
+
CustomApiListFromJSON,
|
|
41
|
+
CustomApiListToJSON,
|
|
42
|
+
CustomApiUpdateFromJSON,
|
|
43
|
+
CustomApiUpdateToJSON,
|
|
44
|
+
HTTPValidationErrorFromJSON,
|
|
45
|
+
HTTPValidationErrorToJSON,
|
|
46
|
+
ListModels403ResponseFromJSON,
|
|
47
|
+
ListModels403ResponseToJSON,
|
|
48
|
+
ScopeFromJSON,
|
|
49
|
+
ScopeToJSON,
|
|
50
|
+
} from '../models/index.js';
|
|
51
|
+
|
|
52
|
+
export interface BindCustomApiRequest {
|
|
53
|
+
agentId: string;
|
|
54
|
+
bindCustomApiBody: BindCustomApiBody;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface CreateCustomApiRequest {
|
|
58
|
+
customApiCreate: CustomApiCreate;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface DeleteCustomApiRequest {
|
|
62
|
+
customApiId: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface GetCustomApiRequest {
|
|
66
|
+
customApiId: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface ListAgentCustomApisRequest {
|
|
70
|
+
agentId: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ListCustomApisRequest {
|
|
74
|
+
scope?: Scope | null;
|
|
75
|
+
q?: string | null;
|
|
76
|
+
limit?: number;
|
|
77
|
+
offset?: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface UnbindCustomApiRequest {
|
|
81
|
+
agentId: string;
|
|
82
|
+
customApiId: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface UpdateCustomApiRequest {
|
|
86
|
+
customApiId: string;
|
|
87
|
+
customApiUpdate: CustomApiUpdate;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
export class CustomAPIsApi extends runtime.BaseAPI {
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Attach one of the caller\'s own Custom APIs to an agent they own.
|
|
97
|
+
* Bind Custom Api
|
|
98
|
+
*/
|
|
99
|
+
async bindCustomApiRaw(requestParameters: BindCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
100
|
+
if (requestParameters['agentId'] == null) {
|
|
101
|
+
throw new runtime.RequiredError(
|
|
102
|
+
'agentId',
|
|
103
|
+
'Required parameter "agentId" was null or undefined when calling bindCustomApi().'
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (requestParameters['bindCustomApiBody'] == null) {
|
|
108
|
+
throw new runtime.RequiredError(
|
|
109
|
+
'bindCustomApiBody',
|
|
110
|
+
'Required parameter "bindCustomApiBody" was null or undefined when calling bindCustomApi().'
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const queryParameters: any = {};
|
|
115
|
+
|
|
116
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
117
|
+
|
|
118
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
119
|
+
|
|
120
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
121
|
+
const token = this.configuration.accessToken;
|
|
122
|
+
const tokenString = await token("bearerAuth", []);
|
|
123
|
+
|
|
124
|
+
if (tokenString) {
|
|
125
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
const response = await this.request({
|
|
129
|
+
path: `/v1/agents/{agentId}/custom-apis`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
|
|
130
|
+
method: 'POST',
|
|
131
|
+
headers: headerParameters,
|
|
132
|
+
query: queryParameters,
|
|
133
|
+
body: BindCustomApiBodyToJSON(requestParameters['bindCustomApiBody']),
|
|
134
|
+
}, initOverrides);
|
|
135
|
+
|
|
136
|
+
return new runtime.VoidApiResponse(response);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Attach one of the caller\'s own Custom APIs to an agent they own.
|
|
141
|
+
* Bind Custom Api
|
|
142
|
+
*/
|
|
143
|
+
async bindCustomApi(requestParameters: BindCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
144
|
+
await this.bindCustomApiRaw(requestParameters, initOverrides);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Create a Custom API; with ``enabledForChats`` (default) it is also attached to the caller\'s personal chats. Never attached to other agents. If that attach hits the personal-chat rules, the API is still saved, disabled, with ``enabledForChatsError`` saying why.
|
|
149
|
+
* Create Custom Api
|
|
150
|
+
*/
|
|
151
|
+
async createCustomApiRaw(requestParameters: CreateCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomApi>> {
|
|
152
|
+
if (requestParameters['customApiCreate'] == null) {
|
|
153
|
+
throw new runtime.RequiredError(
|
|
154
|
+
'customApiCreate',
|
|
155
|
+
'Required parameter "customApiCreate" was null or undefined when calling createCustomApi().'
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const queryParameters: any = {};
|
|
160
|
+
|
|
161
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
162
|
+
|
|
163
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
164
|
+
|
|
165
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
166
|
+
const token = this.configuration.accessToken;
|
|
167
|
+
const tokenString = await token("bearerAuth", []);
|
|
168
|
+
|
|
169
|
+
if (tokenString) {
|
|
170
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const response = await this.request({
|
|
174
|
+
path: `/v2/custom-apis`,
|
|
175
|
+
method: 'POST',
|
|
176
|
+
headers: headerParameters,
|
|
177
|
+
query: queryParameters,
|
|
178
|
+
body: CustomApiCreateToJSON(requestParameters['customApiCreate']),
|
|
179
|
+
}, initOverrides);
|
|
180
|
+
|
|
181
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomApiFromJSON(jsonValue));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Create a Custom API; with ``enabledForChats`` (default) it is also attached to the caller\'s personal chats. Never attached to other agents. If that attach hits the personal-chat rules, the API is still saved, disabled, with ``enabledForChatsError`` saying why.
|
|
186
|
+
* Create Custom Api
|
|
187
|
+
*/
|
|
188
|
+
async createCustomApi(requestParameters: CreateCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomApi> {
|
|
189
|
+
const response = await this.createCustomApiRaw(requestParameters, initOverrides);
|
|
190
|
+
return await response.value();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Delete the API and every attachment (agents and personal chats).
|
|
195
|
+
* Delete Custom Api
|
|
196
|
+
*/
|
|
197
|
+
async deleteCustomApiRaw(requestParameters: DeleteCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
198
|
+
if (requestParameters['customApiId'] == null) {
|
|
199
|
+
throw new runtime.RequiredError(
|
|
200
|
+
'customApiId',
|
|
201
|
+
'Required parameter "customApiId" was null or undefined when calling deleteCustomApi().'
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const queryParameters: any = {};
|
|
206
|
+
|
|
207
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
208
|
+
|
|
209
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
210
|
+
const token = this.configuration.accessToken;
|
|
211
|
+
const tokenString = await token("bearerAuth", []);
|
|
212
|
+
|
|
213
|
+
if (tokenString) {
|
|
214
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const response = await this.request({
|
|
218
|
+
path: `/v2/custom-apis/{customApiId}`.replace(`{${"customApiId"}}`, runtime.encodePathParam('customApiId', requestParameters['customApiId'])),
|
|
219
|
+
method: 'DELETE',
|
|
220
|
+
headers: headerParameters,
|
|
221
|
+
query: queryParameters,
|
|
222
|
+
}, initOverrides);
|
|
223
|
+
|
|
224
|
+
return new runtime.VoidApiResponse(response);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Delete the API and every attachment (agents and personal chats).
|
|
229
|
+
* Delete Custom Api
|
|
230
|
+
*/
|
|
231
|
+
async deleteCustomApi(requestParameters: DeleteCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
232
|
+
await this.deleteCustomApiRaw(requestParameters, initOverrides);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Get Custom Api
|
|
237
|
+
*/
|
|
238
|
+
async getCustomApiRaw(requestParameters: GetCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomApi>> {
|
|
239
|
+
if (requestParameters['customApiId'] == null) {
|
|
240
|
+
throw new runtime.RequiredError(
|
|
241
|
+
'customApiId',
|
|
242
|
+
'Required parameter "customApiId" was null or undefined when calling getCustomApi().'
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const queryParameters: any = {};
|
|
247
|
+
|
|
248
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
249
|
+
|
|
250
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
251
|
+
const token = this.configuration.accessToken;
|
|
252
|
+
const tokenString = await token("bearerAuth", []);
|
|
253
|
+
|
|
254
|
+
if (tokenString) {
|
|
255
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
const response = await this.request({
|
|
259
|
+
path: `/v2/custom-apis/{customApiId}`.replace(`{${"customApiId"}}`, runtime.encodePathParam('customApiId', requestParameters['customApiId'])),
|
|
260
|
+
method: 'GET',
|
|
261
|
+
headers: headerParameters,
|
|
262
|
+
query: queryParameters,
|
|
263
|
+
}, initOverrides);
|
|
264
|
+
|
|
265
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomApiFromJSON(jsonValue));
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Get Custom Api
|
|
270
|
+
*/
|
|
271
|
+
async getCustomApi(requestParameters: GetCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomApi> {
|
|
272
|
+
const response = await this.getCustomApiRaw(requestParameters, initOverrides);
|
|
273
|
+
return await response.value();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Names of the Custom APIs attached to an agent — for any viewer of it. The host is filled only for the caller\'s own APIs.
|
|
278
|
+
* List Agent Custom Apis
|
|
279
|
+
*/
|
|
280
|
+
async listAgentCustomApisRaw(requestParameters: ListAgentCustomApisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentCustomApiList>> {
|
|
281
|
+
if (requestParameters['agentId'] == null) {
|
|
282
|
+
throw new runtime.RequiredError(
|
|
283
|
+
'agentId',
|
|
284
|
+
'Required parameter "agentId" was null or undefined when calling listAgentCustomApis().'
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const queryParameters: any = {};
|
|
289
|
+
|
|
290
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
291
|
+
|
|
292
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
293
|
+
const token = this.configuration.accessToken;
|
|
294
|
+
const tokenString = await token("bearerAuth", []);
|
|
295
|
+
|
|
296
|
+
if (tokenString) {
|
|
297
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
const response = await this.request({
|
|
301
|
+
path: `/v1/agents/{agentId}/custom-apis`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
|
|
302
|
+
method: 'GET',
|
|
303
|
+
headers: headerParameters,
|
|
304
|
+
query: queryParameters,
|
|
305
|
+
}, initOverrides);
|
|
306
|
+
|
|
307
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AgentCustomApiListFromJSON(jsonValue));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Names of the Custom APIs attached to an agent — for any viewer of it. The host is filled only for the caller\'s own APIs.
|
|
312
|
+
* List Agent Custom Apis
|
|
313
|
+
*/
|
|
314
|
+
async listAgentCustomApis(requestParameters: ListAgentCustomApisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentCustomApiList> {
|
|
315
|
+
const response = await this.listAgentCustomApisRaw(requestParameters, initOverrides);
|
|
316
|
+
return await response.value();
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* The caller\'s own Custom APIs, newest first. ``q`` matches name, description or host; ``scope`` is ignored (the list is owner-only).
|
|
321
|
+
* List Custom Apis
|
|
322
|
+
*/
|
|
323
|
+
async listCustomApisRaw(requestParameters: ListCustomApisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomApiList>> {
|
|
324
|
+
const queryParameters: any = {};
|
|
325
|
+
|
|
326
|
+
if (requestParameters['scope'] != null) {
|
|
327
|
+
queryParameters['scope'] = requestParameters['scope'];
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (requestParameters['q'] != null) {
|
|
331
|
+
queryParameters['q'] = requestParameters['q'];
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (requestParameters['limit'] != null) {
|
|
335
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if (requestParameters['offset'] != null) {
|
|
339
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
343
|
+
|
|
344
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
345
|
+
const token = this.configuration.accessToken;
|
|
346
|
+
const tokenString = await token("bearerAuth", []);
|
|
347
|
+
|
|
348
|
+
if (tokenString) {
|
|
349
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
const response = await this.request({
|
|
353
|
+
path: `/v2/custom-apis`,
|
|
354
|
+
method: 'GET',
|
|
355
|
+
headers: headerParameters,
|
|
356
|
+
query: queryParameters,
|
|
357
|
+
}, initOverrides);
|
|
358
|
+
|
|
359
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomApiListFromJSON(jsonValue));
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* The caller\'s own Custom APIs, newest first. ``q`` matches name, description or host; ``scope`` is ignored (the list is owner-only).
|
|
364
|
+
* List Custom Apis
|
|
365
|
+
*/
|
|
366
|
+
async listCustomApis(requestParameters: ListCustomApisRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomApiList> {
|
|
367
|
+
const response = await this.listCustomApisRaw(requestParameters, initOverrides);
|
|
368
|
+
return await response.value();
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Unbind Custom Api
|
|
373
|
+
*/
|
|
374
|
+
async unbindCustomApiRaw(requestParameters: UnbindCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
375
|
+
if (requestParameters['agentId'] == null) {
|
|
376
|
+
throw new runtime.RequiredError(
|
|
377
|
+
'agentId',
|
|
378
|
+
'Required parameter "agentId" was null or undefined when calling unbindCustomApi().'
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
if (requestParameters['customApiId'] == null) {
|
|
383
|
+
throw new runtime.RequiredError(
|
|
384
|
+
'customApiId',
|
|
385
|
+
'Required parameter "customApiId" was null or undefined when calling unbindCustomApi().'
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
const queryParameters: any = {};
|
|
390
|
+
|
|
391
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
392
|
+
|
|
393
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
394
|
+
const token = this.configuration.accessToken;
|
|
395
|
+
const tokenString = await token("bearerAuth", []);
|
|
396
|
+
|
|
397
|
+
if (tokenString) {
|
|
398
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
const response = await this.request({
|
|
402
|
+
path: `/v1/agents/{agentId}/custom-apis/{customApiId}`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])).replace(`{${"customApiId"}}`, runtime.encodePathParam('customApiId', requestParameters['customApiId'])),
|
|
403
|
+
method: 'DELETE',
|
|
404
|
+
headers: headerParameters,
|
|
405
|
+
query: queryParameters,
|
|
406
|
+
}, initOverrides);
|
|
407
|
+
|
|
408
|
+
return new runtime.VoidApiResponse(response);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Unbind Custom Api
|
|
413
|
+
*/
|
|
414
|
+
async unbindCustomApi(requestParameters: UnbindCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
415
|
+
await this.unbindCustomApiRaw(requestParameters, initOverrides);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Edit details and/or replace credentials. Attachments are kept.
|
|
420
|
+
* Update Custom Api
|
|
421
|
+
*/
|
|
422
|
+
async updateCustomApiRaw(requestParameters: UpdateCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomApi>> {
|
|
423
|
+
if (requestParameters['customApiId'] == null) {
|
|
424
|
+
throw new runtime.RequiredError(
|
|
425
|
+
'customApiId',
|
|
426
|
+
'Required parameter "customApiId" was null or undefined when calling updateCustomApi().'
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (requestParameters['customApiUpdate'] == null) {
|
|
431
|
+
throw new runtime.RequiredError(
|
|
432
|
+
'customApiUpdate',
|
|
433
|
+
'Required parameter "customApiUpdate" was null or undefined when calling updateCustomApi().'
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const queryParameters: any = {};
|
|
438
|
+
|
|
439
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
440
|
+
|
|
441
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
442
|
+
|
|
443
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
444
|
+
const token = this.configuration.accessToken;
|
|
445
|
+
const tokenString = await token("bearerAuth", []);
|
|
446
|
+
|
|
447
|
+
if (tokenString) {
|
|
448
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
const response = await this.request({
|
|
452
|
+
path: `/v2/custom-apis/{customApiId}`.replace(`{${"customApiId"}}`, runtime.encodePathParam('customApiId', requestParameters['customApiId'])),
|
|
453
|
+
method: 'PATCH',
|
|
454
|
+
headers: headerParameters,
|
|
455
|
+
query: queryParameters,
|
|
456
|
+
body: CustomApiUpdateToJSON(requestParameters['customApiUpdate']),
|
|
457
|
+
}, initOverrides);
|
|
458
|
+
|
|
459
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomApiFromJSON(jsonValue));
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Edit details and/or replace credentials. Attachments are kept.
|
|
464
|
+
* Update Custom Api
|
|
465
|
+
*/
|
|
466
|
+
async updateCustomApi(requestParameters: UpdateCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomApi> {
|
|
467
|
+
const response = await this.updateCustomApiRaw(requestParameters, initOverrides);
|
|
468
|
+
return await response.value();
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
}
|
package/src/apis/MessagesApi.ts
CHANGED
|
@@ -18,8 +18,8 @@ import type {
|
|
|
18
18
|
AddMessageBody,
|
|
19
19
|
ChatError,
|
|
20
20
|
HTTPValidationError,
|
|
21
|
+
ListModels403Response,
|
|
21
22
|
MessagesResponse,
|
|
22
|
-
MintUploadUrl403Response,
|
|
23
23
|
UIMessage,
|
|
24
24
|
} from '../models/index.js';
|
|
25
25
|
import {
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
ChatErrorToJSON,
|
|
30
30
|
HTTPValidationErrorFromJSON,
|
|
31
31
|
HTTPValidationErrorToJSON,
|
|
32
|
+
ListModels403ResponseFromJSON,
|
|
33
|
+
ListModels403ResponseToJSON,
|
|
32
34
|
MessagesResponseFromJSON,
|
|
33
35
|
MessagesResponseToJSON,
|
|
34
|
-
MintUploadUrl403ResponseFromJSON,
|
|
35
|
-
MintUploadUrl403ResponseToJSON,
|
|
36
36
|
UIMessageFromJSON,
|
|
37
37
|
UIMessageToJSON,
|
|
38
38
|
} from '../models/index.js';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Sarvam Agents API
|
|
5
|
+
* Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
* Contact: support@sarvam.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime.js';
|
|
17
|
+
import type {
|
|
18
|
+
ChatError,
|
|
19
|
+
ListModels403Response,
|
|
20
|
+
ModelsResponse,
|
|
21
|
+
} from '../models/index.js';
|
|
22
|
+
import {
|
|
23
|
+
ChatErrorFromJSON,
|
|
24
|
+
ChatErrorToJSON,
|
|
25
|
+
ListModels403ResponseFromJSON,
|
|
26
|
+
ListModels403ResponseToJSON,
|
|
27
|
+
ModelsResponseFromJSON,
|
|
28
|
+
ModelsResponseToJSON,
|
|
29
|
+
} from '../models/index.js';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export class ModelsApi extends runtime.BaseAPI {
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* List Models
|
|
38
|
+
*/
|
|
39
|
+
async listModelsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelsResponse>> {
|
|
40
|
+
const queryParameters: any = {};
|
|
41
|
+
|
|
42
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
43
|
+
|
|
44
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
45
|
+
const token = this.configuration.accessToken;
|
|
46
|
+
const tokenString = await token("bearerAuth", []);
|
|
47
|
+
|
|
48
|
+
if (tokenString) {
|
|
49
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const response = await this.request({
|
|
53
|
+
path: `/v1/models`,
|
|
54
|
+
method: 'GET',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
}, initOverrides);
|
|
58
|
+
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ModelsResponseFromJSON(jsonValue));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* List Models
|
|
64
|
+
*/
|
|
65
|
+
async listModels(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelsResponse> {
|
|
66
|
+
const response = await this.listModelsRaw(initOverrides);
|
|
67
|
+
return await response.value();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
package/src/apis/QueueApi.ts
CHANGED
|
@@ -18,7 +18,7 @@ import type {
|
|
|
18
18
|
ChatError,
|
|
19
19
|
EditQueuedInput,
|
|
20
20
|
HTTPValidationError,
|
|
21
|
-
|
|
21
|
+
ListModels403Response,
|
|
22
22
|
QueueMessageInput,
|
|
23
23
|
QueueMessageResult,
|
|
24
24
|
QueuedTurnView,
|
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
EditQueuedInputToJSON,
|
|
31
31
|
HTTPValidationErrorFromJSON,
|
|
32
32
|
HTTPValidationErrorToJSON,
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
ListModels403ResponseFromJSON,
|
|
34
|
+
ListModels403ResponseToJSON,
|
|
35
35
|
QueueMessageInputFromJSON,
|
|
36
36
|
QueueMessageInputToJSON,
|
|
37
37
|
QueueMessageResultFromJSON,
|
package/src/apis/ResponsesApi.ts
CHANGED
|
@@ -17,7 +17,7 @@ import * as runtime from '../runtime.js';
|
|
|
17
17
|
import type {
|
|
18
18
|
ChatError,
|
|
19
19
|
HTTPValidationError,
|
|
20
|
-
|
|
20
|
+
ListModels403Response,
|
|
21
21
|
ResponseInput,
|
|
22
22
|
StopResponse,
|
|
23
23
|
} from '../models/index.js';
|
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
ChatErrorToJSON,
|
|
27
27
|
HTTPValidationErrorFromJSON,
|
|
28
28
|
HTTPValidationErrorToJSON,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
ListModels403ResponseFromJSON,
|
|
30
|
+
ListModels403ResponseToJSON,
|
|
31
31
|
ResponseInputFromJSON,
|
|
32
32
|
ResponseInputToJSON,
|
|
33
33
|
StopResponseFromJSON,
|
package/src/apis/SkillsApi.ts
CHANGED
|
@@ -22,7 +22,7 @@ import type {
|
|
|
22
22
|
FileNodeView,
|
|
23
23
|
FileWriteBody,
|
|
24
24
|
HTTPValidationError,
|
|
25
|
-
|
|
25
|
+
ListModels403Response,
|
|
26
26
|
PageFileNodeView,
|
|
27
27
|
PageSkillView,
|
|
28
28
|
PublishRequest,
|
|
@@ -49,8 +49,8 @@ import {
|
|
|
49
49
|
FileWriteBodyToJSON,
|
|
50
50
|
HTTPValidationErrorFromJSON,
|
|
51
51
|
HTTPValidationErrorToJSON,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
ListModels403ResponseFromJSON,
|
|
53
|
+
ListModels403ResponseToJSON,
|
|
54
54
|
PageFileNodeViewFromJSON,
|
|
55
55
|
PageFileNodeViewToJSON,
|
|
56
56
|
PageSkillViewFromJSON,
|
package/src/apis/index.ts
CHANGED
|
@@ -8,7 +8,9 @@ export * from './ClarifyApi.js';
|
|
|
8
8
|
export * from './CollectionsApi.js';
|
|
9
9
|
export * from './ConversationsApi.js';
|
|
10
10
|
export * from './CronsApi.js';
|
|
11
|
+
export * from './CustomAPIsApi.js';
|
|
11
12
|
export * from './MessagesApi.js';
|
|
13
|
+
export * from './ModelsApi.js';
|
|
12
14
|
export * from './QueueApi.js';
|
|
13
15
|
export * from './ResponsesApi.js';
|
|
14
16
|
export * from './SkillsApi.js';
|