feat: model category
This commit is contained in:
@@ -30,8 +30,7 @@ const PlaygroundEmbedding: React.FC = () => {
|
||||
const getModelListByEmbedding = async () => {
|
||||
try {
|
||||
const params = {
|
||||
embedding_only: true,
|
||||
reranker: false
|
||||
categories: 'embedding'
|
||||
};
|
||||
const res = await queryModelsList(params);
|
||||
const list = _.map(res.data || [], (item: any) => {
|
||||
|
||||
@@ -85,7 +85,7 @@ const TextToImages: React.FC = () => {
|
||||
const getModelList = async () => {
|
||||
try {
|
||||
const params = {
|
||||
image_only: true
|
||||
categories: 'image'
|
||||
};
|
||||
const res = await queryModelsList(params);
|
||||
const list = _.map(res.data || [], (item: any) => {
|
||||
|
||||
@@ -79,11 +79,7 @@ const Playground: React.FC = () => {
|
||||
const getModelList = async () => {
|
||||
try {
|
||||
const params = {
|
||||
embedding_only: false,
|
||||
image_only: false,
|
||||
reranker: false,
|
||||
text_to_speech: false,
|
||||
speech_to_text: false
|
||||
categories: ''
|
||||
};
|
||||
const res = await queryModelsList(params);
|
||||
const list = _.map(res.data || [], (item: any) => {
|
||||
|
||||
@@ -32,7 +32,7 @@ const PlaygroundRerank: React.FC = () => {
|
||||
const getModelListByReranker = async () => {
|
||||
try {
|
||||
const params = {
|
||||
reranker: true
|
||||
categories: 'reranker'
|
||||
};
|
||||
const res = await queryModelsList(params);
|
||||
const list = _.map(res.data || [], (item: any) => {
|
||||
|
||||
@@ -102,7 +102,7 @@ const Playground: React.FC = () => {
|
||||
const getTextToSpeechModels = async () => {
|
||||
try {
|
||||
const params = {
|
||||
text_to_speech: true
|
||||
categories: 'text_to_speech'
|
||||
};
|
||||
const res = await queryModelsList(params);
|
||||
const list = _.map(res.data || [], (item: any) => {
|
||||
@@ -120,7 +120,7 @@ const Playground: React.FC = () => {
|
||||
const getSpeechToText = async () => {
|
||||
try {
|
||||
const params = {
|
||||
speech_to_text: true
|
||||
categories: 'speech_to_text'
|
||||
};
|
||||
const res = await queryModelsList(params);
|
||||
const list = _.map(res.data || [], (item: any) => {
|
||||
|
||||
Reference in New Issue
Block a user