feat: support GPT-4o #771 and hide the add button when the folder is a knowledge base (#775)

### What problem does this PR solve?

feat: support GPT-4o  #771 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-05-15 11:34:57 +08:00
committed by GitHub
parent aa1c915d6e
commit 234afb25d8
6 changed files with 2837 additions and 880 deletions

View File

@ -67,13 +67,15 @@ export const useSelectLlmOptionsByModelType = () => {
const groupOptionsByModelType = (modelType: LlmModelType) => {
return Object.entries(llmInfo)
.filter(([, value]) =>
modelType ? value.some((x) => x.model_type === modelType) : true,
modelType ? value.some((x) => x.model_type.includes(modelType)) : true,
)
.map(([key, value]) => {
return {
label: key,
options: value
.filter((x) => (modelType ? x.model_type === modelType : true))
.filter((x) =>
modelType ? x.model_type.includes(modelType) : true,
)
.map((x) => ({
label: x.llm_name,
value: x.llm_name,