Unverified Commit 2e46f795 authored by Joel's avatar Joel Committed by GitHub

Merge pull request #4 from jingjingxinshang/fix

Fix 基于前端模版开发时可配置调用api地址
parents 87a063c3 d306b264
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 ? API_URL : undefined)
import { AppInfo } from "@/types/app"
export const APP_ID = ''
export const API_KEY = ''
export const API_URL = ''
export const APP_INFO: AppInfo = {
"title": 'Chat APP',
"description": '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment