Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydzhou committed Aug 1, 2024
1 parent c359b92 commit dfc36e5
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions app/client/platforms/tencent.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
"use client";
import {
ApiPath,
DEFAULT_API_HOST,
REQUEST_TIMEOUT_MS,
Tencent,
} from "@/app/constant";
import { ApiPath, DEFAULT_API_HOST, REQUEST_TIMEOUT_MS } from "@/app/constant";
import { useAccessStore, useAppConfig, useChatStore } from "@/app/store";

import {
Expand Down Expand Up @@ -67,7 +62,7 @@ function capitalizeKeys(obj: any): any {
}

export class HunyuanApi implements LLMApi {
path(path: string): string {
path(): string {
const accessStore = useAccessStore.getState();

let baseUrl = "";
Expand All @@ -79,7 +74,7 @@ export class HunyuanApi implements LLMApi {
if (baseUrl.length === 0) {
const isApp = !!getClientConfig()?.isApp;
baseUrl = isApp
? DEFAULT_API_HOST + "/api/proxy/bytedance"
? DEFAULT_API_HOST + "/api/proxy/tencent"
: ApiPath.Tencent;
}

Expand Down Expand Up @@ -128,7 +123,7 @@ export class HunyuanApi implements LLMApi {
options.onController?.(controller);

try {
const chatPath = this.path(Tencent.ChatPath);
const chatPath = this.path();
const chatPayload = {
method: "POST",
body: JSON.stringify(requestPayload),
Expand Down

0 comments on commit dfc36e5

Please sign in to comment.