feat: support groq now (close #1087)

This commit is contained in:
JustSong
2024-03-10 14:09:44 +08:00
parent cf16f44970
commit b33616df44
10 changed files with 99 additions and 96 deletions

View File

@@ -14,6 +14,7 @@ export const CHANNEL_OPTIONS = [
{ key: 23, text: '腾讯混元', value: 23, color: 'teal' },
{ key: 26, text: '百川大模型', value: 26, color: 'orange' },
{ key: 27, text: 'MiniMax', value: 27, color: 'red' },
{ key: 29, text: 'Groq', value: 29, color: 'orange' },
{ key: 8, text: '自定义渠道', value: 8, color: 'pink' },
{ key: 22, text: '知识库FastGPT', value: 22, color: 'blue' },
{ key: 21, text: '知识库AI Proxy', value: 21, color: 'purple' },

View File

@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { Button, Form, Header, Input, Message, Segment } from 'semantic-ui-react';
import { useNavigate, useParams } from 'react-router-dom';
import { API, getChannelModels, showError, showInfo, showSuccess, verifyJSON } from '../../helpers';
import { API, copy, getChannelModels, showError, showInfo, showSuccess, verifyJSON } from '../../helpers';
import { CHANNEL_OPTIONS } from '../../constants';
const MODEL_MAPPING_EXAMPLE = {
@@ -342,6 +342,8 @@ const EditChannel = () => {
required
fluid
multiple
search
onLabelClick={(e, { value }) => {copy(value).then()}}
selection
onChange={handleInputChange}
value={inputs.models}