mirror of
https://github.com/coaidev/coai.git
synced 2025-05-29 18:00:14 +09:00
fix type check
老版本冗余
This commit is contained in:
parent
71b2a98e9d
commit
9ae2d5bab1
@ -53,21 +53,6 @@ export const supportModels: Model[] = [
|
||||
},
|
||||
];
|
||||
|
||||
export const supportModelConvertor: Record<string, string> = {
|
||||
"GPT-3.5": "gpt-3.5-turbo",
|
||||
"GPT-3.5-16k": "gpt-3.5-turbo-16k",
|
||||
"GPT-4": "gpt-4",
|
||||
"GPT-4-32k": "gpt-4-32k",
|
||||
"Claude-2": "claude-1",
|
||||
"Claude-2-100k": "claude-2", // not claude-2-100k
|
||||
"SparkDesk 讯飞星火": "spark-desk",
|
||||
Palm2: "chat-bison-001",
|
||||
"New Bing": "bing-creative",
|
||||
"智谱 ChatGLM Pro": "zhipu-chatglm-pro",
|
||||
"智谱 ChatGLM Std": "zhipu-chatglm-std",
|
||||
"智谱 ChatGLM Lite": "zhipu-chatglm-lite",
|
||||
};
|
||||
|
||||
export function login() {
|
||||
location.href = "https://deeptrain.net/login?app=chatnio";
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ import {
|
||||
} from "../store/chat.ts";
|
||||
import { useShared } from "../utils.ts";
|
||||
import { ChatProps } from "./connection.ts";
|
||||
import { supportModelConvertor } from "../conf.ts";
|
||||
import { AppDispatch } from "../store";
|
||||
import { sharingEvent } from "../events/sharing.ts";
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { useSelector } from "react-redux";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Button } from "../components/ui/button.tsx";
|
||||
import { ChevronLeft, Cloud, FileDown, Send } from "lucide-react";
|
||||
import { rest_api, supportModelConvertor } from "../conf.ts";
|
||||
import { rest_api } from "../conf.ts";
|
||||
import router from "../router.ts";
|
||||
import { Input } from "../components/ui/input.tsx";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
@ -171,12 +171,9 @@ function Generation() {
|
||||
<Wrapper
|
||||
onSend={(prompt: string, model: string) => {
|
||||
console.debug(
|
||||
`[generation] create generation request (prompt: ${prompt}, model: ${supportModelConvertor[model]})`,
|
||||
);
|
||||
return manager.generateWithBlock(
|
||||
prompt,
|
||||
supportModelConvertor[model],
|
||||
`[generation] create generation request (prompt: ${prompt}, model: ${model})`,
|
||||
);
|
||||
return manager.generateWithBlock(prompt, model,);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user