From 223ba26902cf414ae7e078c9804cfc6295fc75cb Mon Sep 17 00:00:00 2001 From: LiangGuoqian <996231888@qq.com> Date: Thu, 18 May 2023 09:58:41 +0800 Subject: [PATCH] Update common.ts ChatClient add API_URL --- app/api/utils/common.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/utils/common.ts b/app/api/utils/common.ts index fb07c04..a71ede4 100644 --- a/app/api/utils/common.ts +++ b/app/api/utils/common.ts @@ -1,5 +1,5 @@ import { type NextRequest } from 'next/server' -import { APP_ID, API_KEY } from '@/config' +import { APP_ID, API_KEY, API_URL } from '@/config' import { ChatClient } from 'dify-client' import { v4 } from 'uuid' @@ -18,4 +18,4 @@ export const setSession = (sessionId: string) => { return { 'Set-Cookie': `session_id=${sessionId}` } } -export const client = new ChatClient(API_KEY) +export const client = new ChatClient(API_KEY, API_URL)