diff --git a/src/pages/llmodels/components/table-list.tsx b/src/pages/llmodels/components/table-list.tsx index 7f751b63..6503bff7 100644 --- a/src/pages/llmodels/components/table-list.tsx +++ b/src/pages/llmodels/components/table-list.tsx @@ -18,7 +18,7 @@ import { } from '@ant-design/icons'; import { PageContainer } from '@ant-design/pro-components'; import { Access, useAccess, useIntl, useNavigate } from '@umijs/max'; -import { Button, Input, Space, message } from 'antd'; +import { Button, Input, Space, Tag, message } from 'antd'; import dayjs from 'dayjs'; import _ from 'lodash'; import { useCallback, useRef, useState } from 'react'; @@ -336,10 +336,17 @@ const Models: React.FC = ({ span={6} render={(text, record: ListItem) => { return ( - - {record.source === modelSourceMap.huggingface_value - ? `${modelSourceMap.huggingface} / ${record.huggingface_filename}` - : `${modelSourceMap.ollama_library} / ${record.ollama_library_model_name}`} + + + {record.source === modelSourceMap.huggingface_value + ? `${modelSourceMap.huggingface} / ${record.huggingface_filename}` + : `${modelSourceMap.ollama_library} / ${record.ollama_library_model_name}`} + + + {record.embedding_only && ( + Embedding Only + )} + ); }} @@ -376,7 +383,6 @@ const Models: React.FC = ({ key="operation" dataIndex="operation" render={(text, record) => { - console.log('record====9999', record); return ( { - return request(`${OPENAI_MODELS}`); +export const queryModelsList = async (params: any) => { + return request(`${OPENAI_MODELS}`, { + method: 'GET', + params + }); }; diff --git a/src/pages/playground/components/params-settings.tsx b/src/pages/playground/components/params-settings.tsx index 5aa3ba91..fac667c7 100644 --- a/src/pages/playground/components/params-settings.tsx +++ b/src/pages/playground/components/params-settings.tsx @@ -43,7 +43,10 @@ const ParamsSettings: React.FC = ({ useEffect(() => { const getModelList = async () => { try { - const res = await queryModelsList(); + const params = { + embedding_only: false + }; + const res = await queryModelsList(params); const list = _.map(res.data || [], (item: any) => { return { value: item.id,