更新 doc
This commit is contained in:
parent
de00770bff
commit
f7a0147f8e
@ -117,6 +117,15 @@ definitions:
|
||||
- description
|
||||
- name
|
||||
type: object
|
||||
rag-new_internal_schema.AssistantUpdateRequest:
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
prompt:
|
||||
type: string
|
||||
type: object
|
||||
rag-new_internal_schema.ChatCreateRequest:
|
||||
properties:
|
||||
assistant_id:
|
||||
@ -382,6 +391,42 @@ paths:
|
||||
summary: 获取指定的 Assistant
|
||||
tags:
|
||||
- assistant
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: Assistant ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: Assistant Update
|
||||
in: body
|
||||
name: assistantUpdateRequest
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/rag-new_internal_schema.AssistantUpdateRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/rag-new_internal_schema.ResponseBody'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/rag-new_internal_entity.Assistant'
|
||||
type: object
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/rag-new_internal_schema.ResponseBody'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: 更新 Assistant
|
||||
tags:
|
||||
- assistant
|
||||
/api/v1/assistants/{id}/tools:
|
||||
get:
|
||||
consumes:
|
||||
|
106
src/api/api.ts
106
src/api/api.ts
@ -689,6 +689,31 @@ export interface RagNewInternalSchemaAssistantCreateRequest {
|
||||
*/
|
||||
'prompt'?: string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface RagNewInternalSchemaAssistantUpdateRequest
|
||||
*/
|
||||
export interface RagNewInternalSchemaAssistantUpdateRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof RagNewInternalSchemaAssistantUpdateRequest
|
||||
*/
|
||||
'description'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof RagNewInternalSchemaAssistantUpdateRequest
|
||||
*/
|
||||
'name'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof RagNewInternalSchemaAssistantUpdateRequest
|
||||
*/
|
||||
'prompt'?: string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -1147,6 +1172,49 @@ export const AssistantApiAxiosParamCreator = function (configuration?: Configura
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新 Assistant
|
||||
* @param {number} id Assistant ID
|
||||
* @param {RagNewInternalSchemaAssistantUpdateRequest} assistantUpdateRequest Assistant Update
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiV1AssistantsIdPatch: async (id: number, assistantUpdateRequest: RagNewInternalSchemaAssistantUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('apiV1AssistantsIdPatch', 'id', id)
|
||||
// verify required parameter 'assistantUpdateRequest' is not null or undefined
|
||||
assertParamExists('apiV1AssistantsIdPatch', 'assistantUpdateRequest', assistantUpdateRequest)
|
||||
const localVarPath = `/api/v1/assistants/{id}`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication ApiKeyAuth required
|
||||
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
||||
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(assistantUpdateRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取 Assistant 所绑定的 Tool
|
||||
@ -1353,6 +1421,20 @@ export const AssistantApiFp = function(configuration?: Configuration) {
|
||||
const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdGet']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新 Assistant
|
||||
* @param {number} id Assistant ID
|
||||
* @param {RagNewInternalSchemaAssistantUpdateRequest} assistantUpdateRequest Assistant Update
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiV1AssistantsIdPatch(id: number, assistantUpdateRequest: RagNewInternalSchemaAssistantUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsPost200Response>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsIdPatch(id, assistantUpdateRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsIdPatch']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取 Assistant 所绑定的 Tool
|
||||
@ -1446,6 +1528,17 @@ export const AssistantApiFactory = function (configuration?: Configuration, base
|
||||
apiV1AssistantsIdGet(id: number, options?: any): AxiosPromise<ApiV1AssistantsPost200Response> {
|
||||
return localVarFp.apiV1AssistantsIdGet(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新 Assistant
|
||||
* @param {number} id Assistant ID
|
||||
* @param {RagNewInternalSchemaAssistantUpdateRequest} assistantUpdateRequest Assistant Update
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiV1AssistantsIdPatch(id: number, assistantUpdateRequest: RagNewInternalSchemaAssistantUpdateRequest, options?: any): AxiosPromise<ApiV1AssistantsPost200Response> {
|
||||
return localVarFp.apiV1AssistantsIdPatch(id, assistantUpdateRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取 Assistant 所绑定的 Tool
|
||||
@ -1533,6 +1626,19 @@ export class AssistantApi extends BaseAPI {
|
||||
return AssistantApiFp(this.configuration).apiV1AssistantsIdGet(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 更新 Assistant
|
||||
* @param {number} id Assistant ID
|
||||
* @param {RagNewInternalSchemaAssistantUpdateRequest} assistantUpdateRequest Assistant Update
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof AssistantApi
|
||||
*/
|
||||
public apiV1AssistantsIdPatch(id: number, assistantUpdateRequest: RagNewInternalSchemaAssistantUpdateRequest, options?: RawAxiosRequestConfig) {
|
||||
return AssistantApiFp(this.configuration).apiV1AssistantsIdPatch(id, assistantUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary 获取 Assistant 所绑定的 Tool
|
||||
|
Loading…
Reference in New Issue
Block a user