incognitolm commited on
Commit
eb20b8d
·
verified ·
1 Parent(s): 8bd700e

Update server/chatStream.js

Browse files
Files changed (1) hide show
  1. server/chatStream.js +10 -2
server/chatStream.js CHANGED
@@ -281,8 +281,16 @@ function buildToolList(tools) {
281
  async function processToolCalls(ws, toolCalls, tools, accessToken, clientId, abortSignal, onToolCall, onNewAsset) {
282
  const toolResults = [];
283
  const authHeaders = {};
284
- if (accessToken) authHeaders["Authorization"] = `Bearer ${accessToken}`;
285
- if (clientId) authHeaders["X-Client-ID"] = clientId;
 
 
 
 
 
 
 
 
286
 
287
  for (const call of toolCalls) {
288
  let args;
 
281
  async function processToolCalls(ws, toolCalls, tools, accessToken, clientId, abortSignal, onToolCall, onNewAsset) {
282
  const toolResults = [];
283
  const authHeaders = {};
284
+ if (accessToken) {
285
+ authHeaders["Authorization"] = `Bearer ${accessToken}`;
286
+ } else {
287
+ console.log("No access token");
288
+ }
289
+ if (clientId) {
290
+ authHeaders["X-Client-ID"] = clientId;
291
+ } else {
292
+ console.log("No Client ID");
293
+ }
294
 
295
  for (const call of toolCalls) {
296
  let args;