incognitolm commited on
Commit
3ff6f4d
·
1 Parent(s): 7c66ff8

Update chatStream.js

Browse files
Files changed (1) hide show
  1. server/chatStream.js +3 -0
server/chatStream.js CHANGED
@@ -55,6 +55,7 @@ function makeClient(accessToken, clientId) {
55
  }
56
 
57
  export async function websocketChatStream(body, headers, onToken, abortSignal) {
 
58
  const wsURL =
59
  (process.env.LIGHTNING_BASE.startsWith("https")
60
  ? process.env.LIGHTNING_BASE.replace("https", "wss")
@@ -344,6 +345,8 @@ export async function streamChat({
344
 
345
  } catch (err) {
346
 
 
 
347
  if (
348
  err.name === "AbortError" ||
349
  err.message === "AbortError"
 
55
  }
56
 
57
  export async function websocketChatStream(body, headers, onToken, abortSignal) {
58
+ console.log("websocketChatStream called with body:", JSON.stringify(body, null, 2), "and headers:", headers);
59
  const wsURL =
60
  (process.env.LIGHTNING_BASE.startsWith("https")
61
  ? process.env.LIGHTNING_BASE.replace("https", "wss")
 
345
 
346
  } catch (err) {
347
 
348
+ console.error("streamChat error:", err);
349
+
350
  if (
351
  err.name === "AbortError" ||
352
  err.message === "AbortError"