| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- // @ts-ignore
- /* eslint-disable */
- import request from '@repo/api-client'
- /** 使用原始凭据测试连接 POST /api/ai/vector-store/connect_test_config */
- export async function postConnectTestConfig(
- body: {
- engine_type: string
- connection_config: { addr: string; username: string; password: string }
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: { version: string }
- isAuthorized: boolean
- }>('/api/ai/vector-store/connect_test_config', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 测试已保存或环境变量存储的连接 POST /api/ai/vector-store/connect_test_id */
- export async function postConnectTestId(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: { version: string }
- isAuthorized: boolean
- }>('/api/ai/vector-store/connect_test_id', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 创建向量存储 POST /api/ai/vector-store/create */
- export async function postCreate(
- body: {
- name: string
- engine_type: string
- connection_config: { addr: string; username: string; password: string }
- index_config: { index_name: string; number_of_shards: number; number_of_replicas: number }
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- connection_config: { addr: string; version: string; username: string }
- creationTime: string
- creatorUserId: string
- engine_type: string
- id: string
- index_config: { number_of_shards: number; index_name: string; number_of_replicas: number }
- isDeleted: boolean
- name: string
- source: string
- updateTime: string
- userId: string
- }
- isAuthorized: boolean
- }>('/api/ai/vector-store/create', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 删除向量存储 POST /api/ai/vector-store/delete */
- export async function postOpenApiDelete(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/vector-store/delete',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 获取详情 POST /api/ai/vector-store/info */
- export async function postInfo(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- connection_config: { addr: string; version: string; username: string }
- creationTime: string
- creatorUserId: string
- engine_type: string
- id: string
- index_config: { number_of_shards: number; index_name: string; number_of_replicas: number }
- isDeleted: boolean
- name: string
- source: string
- updateTime: string
- userId: string
- }
- isAuthorized: boolean
- }>('/api/ai/vector-store/info', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 获取分页列表 POST /api/ai/vector-store/pageList */
- export async function postPageList(
- body: {
- keyword: string
- pageIndex: number
- pageSize: number
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- connection_fields: {
- default: string
- description: string
- immutable: boolean
- name: string
- required: boolean
- sensitive: boolean
- type: string
- }[]
- display_name: string
- index_fields: {
- default: string
- description: string
- immutable: boolean
- name: string
- required: boolean
- sensitive: boolean
- type: string
- max: number
- min: number
- enum?: string[]
- }[]
- type: string
- }[]
- isAuthorized: boolean
- }>('/api/ai/vector-store/pageList', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 获取向量选择列表 POST /api/ai/vector-store/selectList */
- export async function postSelectList(
- body: {
- keyword?: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- connection_fields: {
- default: string
- description: string
- immutable: boolean
- name: string
- required: boolean
- sensitive: boolean
- type: string
- }[]
- display_name: string
- index_fields: {
- default: string
- description: string
- immutable: boolean
- name: string
- required: boolean
- sensitive: boolean
- type: string
- max: number
- min: number
- enum?: string[]
- }[]
- type: string
- }[]
- isAuthorized: boolean
- }>('/api/ai/vector-store/selectList', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 获取支持的向量存储类型列表 POST /api/ai/vector-store/types */
- export async function postTypes(body: {}, options?: { [key: string]: any }) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- connection_fields: {
- default: string
- description: string
- immutable: boolean
- name: string
- required: boolean
- sensitive: boolean
- type: string
- }[]
- display_name: string
- index_fields: {
- default: string
- description: string
- immutable: boolean
- name: string
- required: boolean
- sensitive: boolean
- type: string
- max: number
- min: number
- enum?: string[]
- }[]
- type: string
- }[]
- isAuthorized: boolean
- }>('/api/ai/vector-store/types', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 更新向量存储 POST /api/ai/vector-store/update */
- export async function postUpdate(
- body: {
- id: string
- name: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/vector-store/update',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
|