Skip to content

Commit

Permalink
feat: update plan config and websocket connection deadline feature
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Jan 16, 2024
1 parent 7f1c8fa commit 5dc9659
Show file tree
Hide file tree
Showing 54 changed files with 622 additions and 412 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"cmdk": "^0.2.0",
"i18next": "^23.4.6",
"localforage": "^1.10.0",
"lucide-react": "^0.289.0",
"lucide-react": "^0.309.0",
"match-sorter": "^6.3.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
Expand Down
129 changes: 73 additions & 56 deletions app/pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion app/src/admin/api/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
setAppName,
setBlobEndpoint,
setDocsUrl,
} from "@/utils/env.ts";
} from "@/conf/env.ts";

export type SiteInfo = {
title: string;
Expand Down
4 changes: 2 additions & 2 deletions app/src/api/connection.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { tokenField, ws_api } from "@/conf.ts";
import { tokenField, websocketEndpoint } from "@/conf";
import { getMemory } from "@/utils/memory.ts";

export const endpoint = `${ws_api}/chat`;
export const endpoint = `${websocketEndpoint}/chat`;

export type StreamMessage = {
conversation?: number;
Expand Down
2 changes: 1 addition & 1 deletion app/src/api/file.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from "axios";
import { blobEndpoint } from "@/utils/env.ts";
import { blobEndpoint } from "@/conf/env.ts";

export type BlobParserResponse = {
status: boolean;
Expand Down
4 changes: 2 additions & 2 deletions app/src/api/generation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { tokenField, ws_api } from "@/conf.ts";
import { tokenField, websocketEndpoint } from "@/conf";
import { getMemory } from "@/utils/memory.ts";

export const endpoint = `${ws_api}/generation/create`;
export const endpoint = `${websocketEndpoint}/generation/create`;

export type GenerationForm = {
token: string;
Expand Down
4 changes: 3 additions & 1 deletion app/src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export type ConversationMapper = Record<Id, Conversation>;
export type PlanItem = {
id: string;
name: string;
value: string;
value: number;
icon: string;
models: string[];
};
Expand All @@ -53,6 +53,8 @@ export type Plan = {
items: PlanItem[];
};

export type Plans = Plan[];

export type SubscriptionUsage = Record<
string,
{
Expand Down
Loading

0 comments on commit 5dc9659

Please sign in to comment.