Skip to content

Commit

Permalink
fix type check
Browse files Browse the repository at this point in the history
老版本冗余
  • Loading branch information
zmh-program committed Oct 22, 2023
1 parent 71b2a98 commit 9ae2d5b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
15 changes: 0 additions & 15 deletions app/src/conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
1 change: 0 additions & 1 deletion app/src/conversation/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
9 changes: 3 additions & 6 deletions app/src/routes/Generation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 9ae2d5b

Please sign in to comment.