From 9ae2d5bab173e356a2fb36bf58e3380f1d075fb2 Mon Sep 17 00:00:00 2001 From: Zhang Minghan Date: Sun, 22 Oct 2023 19:20:52 +0800 Subject: [PATCH] fix type check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 老版本冗余 --- app/src/conf.ts | 15 --------------- app/src/conversation/manager.ts | 1 - app/src/routes/Generation.tsx | 9 +++------ 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/app/src/conf.ts b/app/src/conf.ts index ebae6b6d..813629ab 100644 --- a/app/src/conf.ts +++ b/app/src/conf.ts @@ -53,21 +53,6 @@ export const supportModels: Model[] = [ }, ]; -export const supportModelConvertor: Record = { - "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"; } diff --git a/app/src/conversation/manager.ts b/app/src/conversation/manager.ts index d8747ba6..04d0d846 100644 --- a/app/src/conversation/manager.ts +++ b/app/src/conversation/manager.ts @@ -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"; diff --git a/app/src/routes/Generation.tsx b/app/src/routes/Generation.tsx index 1755762f..269fe985 100644 --- a/app/src/routes/Generation.tsx +++ b/app/src/routes/Generation.tsx @@ -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() { { 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,); }} />