@daocloud-proto/hydra 0.5.0-dev-7 → 0.5.0-dev-13
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.
|
@@ -8,6 +8,22 @@ import * as HydraCommonCommon from "../../../common/common.pb"
|
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
10
|
import * as HydraManagement_apiModelV1alpha1Model from "../../../management-api/model/v1alpha1/model.pb"
|
|
11
|
+
|
|
12
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
13
|
+
type OneOf<T> =
|
|
14
|
+
| { [k in keyof T]?: undefined }
|
|
15
|
+
| (
|
|
16
|
+
keyof T extends infer K ?
|
|
17
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
18
|
+
: never)
|
|
19
|
+
: never);
|
|
20
|
+
|
|
21
|
+
export enum ListModelRequestModelListSelector {
|
|
22
|
+
ALL = "ALL",
|
|
23
|
+
HAS_DEPLOY_TEMPLATE = "HAS_DEPLOY_TEMPLATE",
|
|
24
|
+
NO_DEPLOY_TEMPLATE = "NO_DEPLOY_TEMPLATE",
|
|
25
|
+
}
|
|
26
|
+
|
|
11
27
|
export type CreateModelRequest = {
|
|
12
28
|
modelId?: string
|
|
13
29
|
modelAvatar?: string
|
|
@@ -62,6 +78,7 @@ export type UpdateModelRequest = {
|
|
|
62
78
|
export type ListModelRequest = {
|
|
63
79
|
page?: HydraCommonCommon.Pagination
|
|
64
80
|
showDeployTemplate?: boolean
|
|
81
|
+
selector?: ListModelRequestModelListSelector
|
|
65
82
|
}
|
|
66
83
|
|
|
67
84
|
export type ListModelResponse = {
|
|
@@ -73,13 +90,20 @@ export type SingleModelRequest = {
|
|
|
73
90
|
modelId?: string
|
|
74
91
|
}
|
|
75
92
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
uRL?: string
|
|
93
|
+
|
|
94
|
+
type BaseParseModelSpecsRequest = {
|
|
79
95
|
}
|
|
80
96
|
|
|
81
|
-
export type
|
|
82
|
-
|
|
97
|
+
export type ParseModelSpecsRequest = BaseParseModelSpecsRequest
|
|
98
|
+
& OneOf<{ yAML: string; uRL: string }>
|
|
99
|
+
|
|
100
|
+
export type ParsedModel = {
|
|
101
|
+
model?: Model
|
|
102
|
+
exist?: boolean
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type ParseModelSpecsResponse = {
|
|
106
|
+
items?: ParsedModel[]
|
|
83
107
|
}
|
|
84
108
|
|
|
85
109
|
export type BatchCreateModelsRequest = {
|
|
@@ -106,8 +130,8 @@ export class AdminModelManagement {
|
|
|
106
130
|
static DeleteModel(req: SingleModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
107
131
|
return fm.fetchReq<SingleModelRequest, Model>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}`, {...initReq, method: "DELETE"})
|
|
108
132
|
}
|
|
109
|
-
static
|
|
110
|
-
return fm.fetchReq<
|
|
133
|
+
static ParseModelSpecs(req: ParseModelSpecsRequest, initReq?: fm.InitReq): Promise<ParseModelSpecsResponse> {
|
|
134
|
+
return fm.fetchReq<ParseModelSpecsRequest, ParseModelSpecsResponse>(`/apis/admin.hydra.io/v1alpha1/models:parse`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
111
135
|
}
|
|
112
136
|
static BatchCreateModels(req: BatchCreateModelsRequest, initReq?: fm.InitReq): Promise<BatchCreateModelsResponse> {
|
|
113
137
|
return fm.fetchReq<BatchCreateModelsRequest, BatchCreateModelsResponse>(`/apis/admin.hydra.io/v1alpha1/models:batch_create`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "../../../fetch.pb"
|
|
8
|
+
export type GetAgentAddressRequest = {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type GetAgentAddressResponse = {
|
|
12
|
+
address?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class WebSearchAgentService {
|
|
16
|
+
static GetAgentAddress(req: GetAgentAddressRequest, initReq?: fm.InitReq): Promise<GetAgentAddressResponse> {
|
|
17
|
+
return fm.fetchReq<GetAgentAddressRequest, GetAgentAddressResponse>(`/apis/hydra.io/v1alpha1/web-search-agent/address?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
18
|
+
}
|
|
19
|
+
}
|