Skip to content

Commit

Permalink
feat alpha: admin model market settings feature
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Jan 8, 2024
1 parent 93a41fd commit 7ce7e6e
Show file tree
Hide file tree
Showing 22 changed files with 1,095 additions and 102 deletions.
2 changes: 2 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"localforage": "^1.10.0",
"lucide-react": "^0.289.0",
"match-sorter": "^6.3.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.1",
"react-chartjs-2": "^5.2.0",
Expand All @@ -53,6 +54,7 @@
"remark-breaks": "^4.0.0",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1",
"sonner": "^1.3.1",
"sort-by": "^1.2.0",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
Expand Down
196 changes: 192 additions & 4 deletions app/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { Provider } from "react-redux";
import store from "./store/index.ts";
import AppProvider from "./components/app/AppProvider.tsx";
import { AppRouter } from "./router.tsx";
import { Toaster } from "@/components/ui/sonner";

function App() {
return (
<Provider store={store}>
<AppProvider />
<Toaster />
<AppRouter />
</Provider>
);
Expand Down
40 changes: 40 additions & 0 deletions app/src/admin/market.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export const marketEditableTags = [
"official",
"unstable",
"web",
"high-quality",
"high-price",
"open-source",
"image-generation",
"multi-modal",
"fast",
"english-model",
];

export const modelImages = [
"gpt35turbo.png",
"gpt35turbo16k.webp",
"gpt4.png",
"gpt432k.webp",
"gpt4v.png",
"gpt4dalle.png",
"claude.png",
"claude100k.png",
"stablediffusion.jpeg",
"llama2.webp",
"llamacode.webp",
"dalle.jpeg",
"midjourney.jpg",
"newbing.jpg",
"palm2.webp",
"gemini.jpeg",
"chatglm.png",
"tongyi.png",
"sparkdesk.jpg",
"hunyuan.png",
"360gpt.png",
"baichuan.png",
"skylark.jpg",
];

export const marketTags = [...marketEditableTags, "free", "high-context"];
3 changes: 3 additions & 0 deletions app/src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ export type Message = {
export type Model = {
id: string;
name: string;
description?: string;
free: boolean;
auth: boolean;
default: boolean;
high_context: boolean;
avatar: string;
tag?: string[];
};

Expand Down
1 change: 1 addition & 0 deletions app/src/assets/admin/all.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import "menu";
@import "dashboard";
@import "market";
@import "management";
@import "broadcast";
@import "channel";
Expand Down
Loading

0 comments on commit 7ce7e6e

Please sign in to comment.