Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Fix Client App [Tauri]
Browse files Browse the repository at this point in the history
[+] fix(constant.ts): add trailing slash to DEFAULT_API_HOST constant
  • Loading branch information
H0llyW00dzZ committed Nov 10, 2023
1 parent 2d72d2b commit 872221c
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags
export const RUNTIME_CONFIG_DOM = "danger-runtime-config";

export const DEFAULT_CORS_HOST = "https://chatgpt.btz.sh";
export const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`;
export const OPENAI_BASE_URL = "https://api.openai.com";
export const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy/`;

export enum Path {
Home = "/",
Expand All @@ -25,12 +24,10 @@ export enum Path {

export enum ApiPath {
Cors = "/api/cors",
OpenAI = "/api/openai",
}

export enum SlotID {
AppBody = "app-body",
CustomModel = "custom-model",
}
// This will automatically generate JSON files without the need to include the ".json" extension.
export enum FileName {
Expand Down Expand Up @@ -64,11 +61,6 @@ export const REQUEST_TIMEOUT_MS = 60000;

export const EXPORT_MESSAGE_CLASS_NAME = "export-markdown";

export enum ServiceProvider {
OpenAI = "OpenAI",
Azure = "Azure",
}

export const OpenaiPath = {
ChatPath: "v1/chat/completions",
// text moderation
Expand All @@ -84,10 +76,6 @@ export const OpenaiPath = {
ListModelPath: "v1/models",
};

export const Azure = {
ExampleEndpoint: "https://{resource-url}/openai/deployments/{deploy-id}",
};

export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang
export const DEFAULT_SYSTEM_TEMPLATE = `
You are ChatGPT, a large language model trained by OpenAI.
Expand All @@ -100,6 +88,7 @@ export const SUMMARIZE_MODEL = "gpt-3.5-turbo";

export const KnowledgeCutOffDate: Record<string, string> = {
default: "2021-09",
"gpt-3.5-turbo-1106": "2023-04",
"gpt-4-1106-preview": "2023-04",
"gpt-4-vision-preview": "2023-04",
};
Expand Down

0 comments on commit 872221c

Please sign in to comment.