diff --git a/frontend/packages/core/src/pages/aiApis/index.tsx b/frontend/packages/core/src/pages/aiApis/index.tsx index 6d983320..0c2d1d64 100644 --- a/frontend/packages/core/src/pages/aiApis/index.tsx +++ b/frontend/packages/core/src/pages/aiApis/index.tsx @@ -12,7 +12,7 @@ import { Alert, App, Button, Typography } from 'antd' import dayjs from 'dayjs' import React, { useEffect, useRef, useState } from 'react' import { useNavigate, useSearchParams } from 'react-router-dom' -import { APIKey } from './types' +import { APIs } from './types' const ApiSettings: React.FC = () => { const pageListRef = useRef(null) @@ -52,7 +52,7 @@ const ApiSettings: React.FC = () => { eoParams.start = startTime eoParams.end = endTime } - const response = await fetchData>('ai/apis', { + const response = await fetchData>('ai/apis', { method: 'GET', eoParams }) @@ -81,14 +81,14 @@ const ApiSettings: React.FC = () => { } } - const operation: PageProColumns[] = [ + const operation: PageProColumns[] = [ { title: '', key: 'option', btnNums: 4, fixed: 'right', valueType: 'option', - render: (_: React.ReactNode, entity: APIKey) => [ + render: (_: React.ReactNode, entity: APIs) => [ { } ] - const columns: PageProColumns[] = [ + const columns: PageProColumns[] = [ { title: 'AI 服务', dataIndex: 'name', @@ -113,7 +113,7 @@ const ApiSettings: React.FC = () => { key: 'request_path', width: 200, ellipsis: true, - render: (text: string, record: APIKey) => ( + render: (text: string, record: APIs) => (

{record.method} {text} diff --git a/frontend/packages/core/src/pages/aiApis/types.ts b/frontend/packages/core/src/pages/aiApis/types.ts index e69de29b..44c9b49e 100644 --- a/frontend/packages/core/src/pages/aiApis/types.ts +++ b/frontend/packages/core/src/pages/aiApis/types.ts @@ -0,0 +1,11 @@ +export interface APIs { + id: string; + name: string; + service: string; + method: string; + request_path: string; + model: string; + disabled: boolean; + update_time: string; + use_token: number; +} \ No newline at end of file