fix: resolve conversation API issues
1. Fixed double data unwrapping in AgentChatPage 2. Fixed API URL in sendMessageStream (use relative path /api/v1) Verified working: AI can now respond to messages
This commit is contained in:
@@ -91,7 +91,8 @@ export const sendMessageStream = async (
|
||||
onError: (error: Error) => void
|
||||
) => {
|
||||
try {
|
||||
const response = await fetch(`${import.meta.env.VITE_API_BASE_URL}/conversations/message/stream`, {
|
||||
// 使用相对路径,通过Vite代理转发到后端
|
||||
const response = await fetch('/api/v1/conversations/message/stream', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user