[GH-ISSUE #471] choose the chat mode, an error "Could not respond to message" appears,but query mode is ok #270

Closed
opened 2026-02-22 18:18:39 -05:00 by yindo · 4 comments
Owner

Originally created by @huicewang on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/471

During the chat with AnythingLLM, I noticed some potential bugs. The specific descriptions are as follows:

  1. Regardless of selecting the Chat mode or Query mode, Citations appear in the displayed results. As per my understanding, if it's the Chat mode, shouldn't it only interact with the large model without retrieving data from the knowledge base?

  2. I can chat normally when selecting the query mode, but when choosing the chat mode, an error "Could not respond to message" appears. What might be the reason? Thank you very much.

Originally created by @huicewang on GitHub (Dec 19, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/471 During the chat with AnythingLLM, I noticed some potential bugs. The specific descriptions are as follows: 1. Regardless of selecting the Chat mode or Query mode, Citations appear in the displayed results. As per my understanding, if it's the Chat mode, shouldn't it only interact with the large model without retrieving data from the knowledge base? 2. I can chat normally when selecting the query mode, but when choosing the chat mode, an error "Could not respond to message" appears. What might be the reason? Thank you very much.
yindo added the Integration Requestpossible bug labels 2026-02-22 18:18:39 -05:00
yindo closed this issue 2026-02-22 18:18:39 -05:00
Author
Owner

@huicewang commented on GitHub (Dec 19, 2023):

If there is no knowledge base data in the current workspace, everything is okay. However, if there is knowledge base data, the chat mode throws an error: "Could not respond to message."

@huicewang commented on GitHub (Dec 19, 2023): If there is no knowledge base data in the current workspace, everything is okay. However, if there is knowledge base data, the chat mode throws an error: "Could not respond to message."
Author
Owner

@timothycarambat commented on GitHub (Dec 19, 2023):

  1. There is a misunderstanding. Citations will always appear if a knowledge base is available. The only distinct difference between chat and query are:
    chat => Can reference previous chat history
    query => Each prompt is totally standalone. Ignores previous chats

  2. That certainly is an error, can you put the log of the docker container here so we can see what error message appears when you try to send a chat?

  • Which LLM are you using for chatting?
@timothycarambat commented on GitHub (Dec 19, 2023): 1. There is a misunderstanding. Citations will always appear if a knowledge base is available. The only distinct difference between chat and query are: chat => Can reference previous chat history query => Each prompt is totally standalone. Ignores previous chats 2. That certainly is an error, can you put the log of the docker container here so we can see what error message appears when you try to send a chat? - Which LLM are you using for chatting?
Author
Owner

@rda5009 commented on GitHub (Dec 19, 2023):

Hi, I'm having similar issues. I followed your Youtube https://www.youtube.com/watch?v=nj0xdhTFV_8&ab_channel=TimCarambat

No matter what if I chose chat or query, I cannot get past the "Could not respond to message.".

I installed locally using docker, using LM Studio, and the Mistral-7B-Instruct-v0.2-GGUF model. If it helps, here is the docker log:
      Authorization: 'Bearer undefined',
      'Content-Length': 411
    },
    method: 'post',
    responseType: 'stream',
    data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\nContext:\n    "},{"role":"user","content":"Hello"}],"temperature":0.7}',
    url: 'http://localhost:1234/v1/chat/completions/chat/completions'
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'http:',
      path: '/v1/chat/completions/chat/completions',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'localhost',
      port: '1234',
      nativeProtocols: [Object],
      pathname: '/v1/chat/completions/chat/completions'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 411,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 411,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: [Socket],
      _header: 'POST /v1/chat/completions/chat/completions HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, /\r\n' +
        'Content-Type: application/json\r\n' +
        'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +
        'Authorization: Bearer undefined\r\n' +
        'Content-Length: 411\r\n' +
        'Host: localhost:1234\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/v1/chat/completions/chat/completions',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'http://localhost:1234/v1/chat/completions/chat/completions',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
Error: connect ECONNREFUSED 127.0.0.1:1234
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 1234,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, /',
      'Content-Type': 'application/json',
      'User-Agent': 'OpenAI/NodeJS/3.3.0',
      Authorization: 'Bearer undefined',
      'Content-Length': 408
    },
    method: 'post',
    responseType: 'stream',
    data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\nContext:\n    "},{"role":"user","content":"hi"}],"temperature":0.7}',
    url: 'http://localhost:1234/v1/chat/completions'
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'http:',
      path: '/v1/chat/completions',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'localhost',
      port: '1234',
      nativeProtocols: [Object],
      pathname: '/v1/chat/completions'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 408,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 408,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: [Socket],
      _header: 'POST /v1/chat/completions HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, /\r\n' +
        'Content-Type: application/json\r\n' +
        'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +
        'Authorization: Bearer undefined\r\n' +
        'Content-Length: 408\r\n' +
        'Host: localhost:1234\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/v1/chat/completions',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'http://localhost:1234/v1/chat/completions',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
Error: connect ECONNREFUSED 127.0.0.1:1234
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 1234,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, /',
      'Content-Type': 'application/json',
      'User-Agent': 'OpenAI/NodeJS/3.3.0',
      Authorization: 'Bearer undefined',
      'Content-Length': 407
    },
    method: 'post',
    responseType: 'stream',
    data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\nContext:\n    "},{"role":"user","content":"d"}],"temperature":0.7}',
    url: 'http://localhost:1234/v1/chat/completions \/chat/completions'
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'http:',
      path: '/v1/chat/completions%20//chat/completions',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'localhost',
      port: '1234',
      nativeProtocols: [Object],
      pathname: '/v1/chat/completions%20//chat/completions'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 407,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 407,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: [Socket],
      _header: 'POST /v1/chat/completions%20//chat/completions HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, /\r\n' +
        'Content-Type: application/json\r\n' +
        'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +
        'Authorization: Bearer undefined\r\n' +
        'Content-Length: 407\r\n' +
        'Host: localhost:1234\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/v1/chat/completions%20//chat/completions',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'http://localhost:1234/v1/chat/completions%20//chat/completions',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
Error: connect ECONNREFUSED 127.0.0.1:1234
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 1234,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, /',
      'Content-Type': 'application/json',
      'User-Agent': 'OpenAI/NodeJS/3.3.0',
      Authorization: 'Bearer undefined',
      'Content-Length': 408
    },
    method: 'post',
    responseType: 'stream',
    data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\nContext:\n    "},{"role":"user","content":"Hi"}],"temperature":0.7}',
    url: 'http://localhost:1234/v1/chat/completions \/chat/completions'
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'http:',
      path: '/v1/chat/completions%20//chat/completions',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'localhost',
      port: '1234',
      nativeProtocols: [Object],
      pathname: '/v1/chat/completions%20//chat/completions'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 408,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 408,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: [Socket],
      _header: 'POST /v1/chat/completions%20//chat/completions HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, /\r\n' +
        'Content-Type: application/json\r\n' +
        'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +
        'Authorization: Bearer undefined\r\n' +
        'Content-Length: 408\r\n' +
        'Host: localhost:1234\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/v1/chat/completions%20//chat/completions',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'http://localhost:1234/v1/chat/completions%20//chat/completions',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
Error: connect ECONNREFUSED 127.0.0.1:1234
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 1234,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, /',
      'Content-Type': 'application/json',
      'User-Agent': 'OpenAI/NodeJS/3.3.0',
      Authorization: 'Bearer undefined',
      'Content-Length': 408
    },
    method: 'post',
    responseType: 'stream',
    data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\nContext:\n    "},{"role":"user","content":"hi"}],"temperature":0.7}',
    url: 'http://localhost:1234/v1/chat/completions \/chat/completions'
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'http:',
      path: '/v1/chat/completions%20//chat/completions',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'localhost',
      port: '1234',
      nativeProtocols: [Object],
      pathname: '/v1/chat/completions%20//chat/completions'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 408,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 408,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: [Socket],
      _header: 'POST /v1/chat/completions%20//chat/completions HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, /\r\n' +
        'Content-Type: application/json\r\n' +
        'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +
        'Authorization: Bearer undefined\r\n' +
        'Content-Length: 408\r\n' +
        'Host: localhost:1234\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/v1/chat/completions%20//chat/completions',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'http://localhost:1234/v1/chat/completions%20//chat/completions',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
Error: connect ECONNREFUSED 127.0.0.1:1234
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 1234,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, /',
      'Content-Type': 'application/json',
      'User-Agent': 'OpenAI/NodeJS/3.3.0',
      Authorization: 'Bearer undefined',
      'Content-Length': 408
    },
    method: 'post',
    responseType: 'stream',
    data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\nContext:\n    "},{"role":"user","content":"hi"}],"temperature":0.7}',
    url: 'http://localhost:1234/v1/chat/completions'
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Function: handleRequestSocket]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'http:',
      path: '/v1/chat/completions',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'localhost',
      port: '1234',
      nativeProtocols: [Object],
      pathname: '/v1/chat/completions'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 408,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 408,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: [Socket],
      _header: 'POST /v1/chat/completions HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, /\r\n' +
        'Content-Type: application/json\r\n' +
        'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +
        'Authorization: Bearer undefined\r\n' +
        'Content-Length: 408\r\n' +
        'Host: localhost:1234\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/v1/chat/completions',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'http://localhost:1234/v1/chat/completions',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

@rda5009 commented on GitHub (Dec 19, 2023): Hi, I'm having similar issues. I followed your Youtube https://www.youtube.com/watch?v=nj0xdhTFV_8&ab_channel=TimCarambat No matter what if I chose chat or query, I cannot get past the "Could not respond to message.". I installed locally using docker, using LM Studio, and the Mistral-7B-Instruct-v0.2-GGUF model. If it helps, here is the docker log:       Authorization: 'Bearer undefined',       'Content-Length': 411     },     method: 'post',     responseType: 'stream',     data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\\nContext:\\n    "},{"role":"user","content":"Hello"}],"temperature":0.7}',     url: 'http://localhost:1234/v1/chat/completions/chat/completions'   },   request: <ref *1> Writable {     _writableState: WritableState {       objectMode: false,       highWaterMark: 16384,       finalCalled: false,       needDrain: false,       ending: false,       ended: false,       finished: false,       destroyed: false,       decodeStrings: true,       defaultEncoding: 'utf8',       length: 0,       writing: false,       corked: 0,       sync: true,       bufferProcessing: false,       onwrite: [Function: bound onwrite],       writecb: null,       writelen: 0,       afterWriteTickInfo: null,       buffered: [],       bufferedIndex: 0,       allBuffers: true,       allNoop: true,       pendingcb: 0,       constructed: true,       prefinished: false,       errorEmitted: false,       emitClose: true,       autoDestroy: true,       errored: null,       closed: false,       closeEmitted: false,       [Symbol(kOnFinished)]: []     },     _events: [Object: null prototype] {       response: [Function: handleResponse],       error: [Function: handleRequestError],       socket: [Function: handleRequestSocket]     },     _eventsCount: 3,     _maxListeners: undefined,     _options: {       maxRedirects: 21,       maxBodyLength: 10485760,       protocol: 'http:',       path: '/v1/chat/completions/chat/completions',       method: 'POST',       headers: [Object],       agent: undefined,       agents: [Object],       auth: undefined,       hostname: 'localhost',       port: '1234',       nativeProtocols: [Object],       pathname: '/v1/chat/completions/chat/completions'     },     _ended: false,     _ending: true,     _redirectCount: 0,     _redirects: [],     _requestBodyLength: 411,     _requestBodyBuffers: [ [Object] ],     _onNativeResponse: [Function (anonymous)],     _currentRequest: ClientRequest {       _events: [Object: null prototype],       _eventsCount: 7,       _maxListeners: undefined,       outputData: [],       outputSize: 0,       writable: true,       destroyed: false,       _last: true,       chunkedEncoding: false,       shouldKeepAlive: false,       maxRequestsOnConnectionReached: false,       _defaultKeepAlive: true,       useChunkedEncodingByDefault: true,       sendDate: false,       _removedConnection: false,       _removedContLen: false,       _removedTE: false,       strictContentLength: false,       _contentLength: 411,       _hasBody: true,       _trailer: '',       finished: false,       _headerSent: true,       _closed: false,       socket: [Socket],       _header: 'POST /v1/chat/completions/chat/completions HTTP/1.1\r\n' +         'Accept: application/json, text/plain, */*\r\n' +         'Content-Type: application/json\r\n' +         'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +         'Authorization: Bearer undefined\r\n' +         'Content-Length: 411\r\n' +         'Host: localhost:1234\r\n' +         'Connection: close\r\n' +         '\r\n',       _keepAliveTimeout: 0,       _onPendingData: [Function: nop],       agent: [Agent],       socketPath: undefined,       method: 'POST',       maxHeaderSize: undefined,       insecureHTTPParser: undefined,       joinDuplicateHeaders: undefined,       path: '/v1/chat/completions/chat/completions',       _ended: false,       res: null,       aborted: false,       timeoutCb: null,       upgradeOrConnect: false,       parser: null,       maxHeadersCount: null,       reusedSocket: false,       host: 'localhost',       protocol: 'http:',       _redirectable: [Circular *1],       [Symbol(kCapture)]: false,       [Symbol(kBytesWritten)]: 0,       [Symbol(kNeedDrain)]: false,       [Symbol(corked)]: 0,       [Symbol(kOutHeaders)]: [Object: null prototype],       [Symbol(errored)]: null,       [Symbol(kHighWaterMark)]: 16384,       [Symbol(kRejectNonStandardBodyWrites)]: false,       [Symbol(kUniqueHeaders)]: null     },     _currentUrl: 'http://localhost:1234/v1/chat/completions/chat/completions',     [Symbol(kCapture)]: false   },   response: undefined,   isAxiosError: true,   toJSON: [Function: toJSON] } Error: connect ECONNREFUSED 127.0.0.1:1234     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {   errno: -111,   code: 'ECONNREFUSED',   syscall: 'connect',   address: '127.0.0.1',   port: 1234,   config: {     transitional: {       silentJSONParsing: true,       forcedJSONParsing: true,       clarifyTimeoutError: false     },     adapter: [Function: httpAdapter],     transformRequest: [ [Function: transformRequest] ],     transformResponse: [ [Function: transformResponse] ],     timeout: 0,     xsrfCookieName: 'XSRF-TOKEN',     xsrfHeaderName: 'X-XSRF-TOKEN',     maxContentLength: -1,     maxBodyLength: -1,     validateStatus: [Function: validateStatus],     headers: {       Accept: 'application/json, text/plain, */*',       'Content-Type': 'application/json',       'User-Agent': 'OpenAI/NodeJS/3.3.0',       Authorization: 'Bearer undefined',       'Content-Length': 408     },     method: 'post',     responseType: 'stream',     data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\\nContext:\\n    "},{"role":"user","content":"hi"}],"temperature":0.7}',     url: 'http://localhost:1234/v1/chat/completions'   },   request: <ref *1> Writable {     _writableState: WritableState {       objectMode: false,       highWaterMark: 16384,       finalCalled: false,       needDrain: false,       ending: false,       ended: false,       finished: false,       destroyed: false,       decodeStrings: true,       defaultEncoding: 'utf8',       length: 0,       writing: false,       corked: 0,       sync: true,       bufferProcessing: false,       onwrite: [Function: bound onwrite],       writecb: null,       writelen: 0,       afterWriteTickInfo: null,       buffered: [],       bufferedIndex: 0,       allBuffers: true,       allNoop: true,       pendingcb: 0,       constructed: true,       prefinished: false,       errorEmitted: false,       emitClose: true,       autoDestroy: true,       errored: null,       closed: false,       closeEmitted: false,       [Symbol(kOnFinished)]: []     },     _events: [Object: null prototype] {       response: [Function: handleResponse],       error: [Function: handleRequestError],       socket: [Function: handleRequestSocket]     },     _eventsCount: 3,     _maxListeners: undefined,     _options: {       maxRedirects: 21,       maxBodyLength: 10485760,       protocol: 'http:',       path: '/v1/chat/completions',       method: 'POST',       headers: [Object],       agent: undefined,       agents: [Object],       auth: undefined,       hostname: 'localhost',       port: '1234',       nativeProtocols: [Object],       pathname: '/v1/chat/completions'     },     _ended: false,     _ending: true,     _redirectCount: 0,     _redirects: [],     _requestBodyLength: 408,     _requestBodyBuffers: [ [Object] ],     _onNativeResponse: [Function (anonymous)],     _currentRequest: ClientRequest {       _events: [Object: null prototype],       _eventsCount: 7,       _maxListeners: undefined,       outputData: [],       outputSize: 0,       writable: true,       destroyed: false,       _last: true,       chunkedEncoding: false,       shouldKeepAlive: false,       maxRequestsOnConnectionReached: false,       _defaultKeepAlive: true,       useChunkedEncodingByDefault: true,       sendDate: false,       _removedConnection: false,       _removedContLen: false,       _removedTE: false,       strictContentLength: false,       _contentLength: 408,       _hasBody: true,       _trailer: '',       finished: false,       _headerSent: true,       _closed: false,       socket: [Socket],       _header: 'POST /v1/chat/completions HTTP/1.1\r\n' +         'Accept: application/json, text/plain, */*\r\n' +         'Content-Type: application/json\r\n' +         'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +         'Authorization: Bearer undefined\r\n' +         'Content-Length: 408\r\n' +         'Host: localhost:1234\r\n' +         'Connection: close\r\n' +         '\r\n',       _keepAliveTimeout: 0,       _onPendingData: [Function: nop],       agent: [Agent],       socketPath: undefined,       method: 'POST',       maxHeaderSize: undefined,       insecureHTTPParser: undefined,       joinDuplicateHeaders: undefined,       path: '/v1/chat/completions',       _ended: false,       res: null,       aborted: false,       timeoutCb: null,       upgradeOrConnect: false,       parser: null,       maxHeadersCount: null,       reusedSocket: false,       host: 'localhost',       protocol: 'http:',       _redirectable: [Circular *1],       [Symbol(kCapture)]: false,       [Symbol(kBytesWritten)]: 0,       [Symbol(kNeedDrain)]: false,       [Symbol(corked)]: 0,       [Symbol(kOutHeaders)]: [Object: null prototype],       [Symbol(errored)]: null,       [Symbol(kHighWaterMark)]: 16384,       [Symbol(kRejectNonStandardBodyWrites)]: false,       [Symbol(kUniqueHeaders)]: null     },     _currentUrl: 'http://localhost:1234/v1/chat/completions',     [Symbol(kCapture)]: false   },   response: undefined,   isAxiosError: true,   toJSON: [Function: toJSON] } Error: connect ECONNREFUSED 127.0.0.1:1234     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {   errno: -111,   code: 'ECONNREFUSED',   syscall: 'connect',   address: '127.0.0.1',   port: 1234,   config: {     transitional: {       silentJSONParsing: true,       forcedJSONParsing: true,       clarifyTimeoutError: false     },     adapter: [Function: httpAdapter],     transformRequest: [ [Function: transformRequest] ],     transformResponse: [ [Function: transformResponse] ],     timeout: 0,     xsrfCookieName: 'XSRF-TOKEN',     xsrfHeaderName: 'X-XSRF-TOKEN',     maxContentLength: -1,     maxBodyLength: -1,     validateStatus: [Function: validateStatus],     headers: {       Accept: 'application/json, text/plain, */*',       'Content-Type': 'application/json',       'User-Agent': 'OpenAI/NodeJS/3.3.0',       Authorization: 'Bearer undefined',       'Content-Length': 407     },     method: 'post',     responseType: 'stream',     data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\\nContext:\\n    "},{"role":"user","content":"d"}],"temperature":0.7}',     url: 'http://localhost:1234/v1/chat/completions \\/chat/completions'   },   request: <ref *1> Writable {     _writableState: WritableState {       objectMode: false,       highWaterMark: 16384,       finalCalled: false,       needDrain: false,       ending: false,       ended: false,       finished: false,       destroyed: false,       decodeStrings: true,       defaultEncoding: 'utf8',       length: 0,       writing: false,       corked: 0,       sync: true,       bufferProcessing: false,       onwrite: [Function: bound onwrite],       writecb: null,       writelen: 0,       afterWriteTickInfo: null,       buffered: [],       bufferedIndex: 0,       allBuffers: true,       allNoop: true,       pendingcb: 0,       constructed: true,       prefinished: false,       errorEmitted: false,       emitClose: true,       autoDestroy: true,       errored: null,       closed: false,       closeEmitted: false,       [Symbol(kOnFinished)]: []     },     _events: [Object: null prototype] {       response: [Function: handleResponse],       error: [Function: handleRequestError],       socket: [Function: handleRequestSocket]     },     _eventsCount: 3,     _maxListeners: undefined,     _options: {       maxRedirects: 21,       maxBodyLength: 10485760,       protocol: 'http:',       path: '/v1/chat/completions%20//chat/completions',       method: 'POST',       headers: [Object],       agent: undefined,       agents: [Object],       auth: undefined,       hostname: 'localhost',       port: '1234',       nativeProtocols: [Object],       pathname: '/v1/chat/completions%20//chat/completions'     },     _ended: false,     _ending: true,     _redirectCount: 0,     _redirects: [],     _requestBodyLength: 407,     _requestBodyBuffers: [ [Object] ],     _onNativeResponse: [Function (anonymous)],     _currentRequest: ClientRequest {       _events: [Object: null prototype],       _eventsCount: 7,       _maxListeners: undefined,       outputData: [],       outputSize: 0,       writable: true,       destroyed: false,       _last: true,       chunkedEncoding: false,       shouldKeepAlive: false,       maxRequestsOnConnectionReached: false,       _defaultKeepAlive: true,       useChunkedEncodingByDefault: true,       sendDate: false,       _removedConnection: false,       _removedContLen: false,       _removedTE: false,       strictContentLength: false,       _contentLength: 407,       _hasBody: true,       _trailer: '',       finished: false,       _headerSent: true,       _closed: false,       socket: [Socket],       _header: 'POST /v1/chat/completions%20//chat/completions HTTP/1.1\r\n' +         'Accept: application/json, text/plain, */*\r\n' +         'Content-Type: application/json\r\n' +         'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +         'Authorization: Bearer undefined\r\n' +         'Content-Length: 407\r\n' +         'Host: localhost:1234\r\n' +         'Connection: close\r\n' +         '\r\n',       _keepAliveTimeout: 0,       _onPendingData: [Function: nop],       agent: [Agent],       socketPath: undefined,       method: 'POST',       maxHeaderSize: undefined,       insecureHTTPParser: undefined,       joinDuplicateHeaders: undefined,       path: '/v1/chat/completions%20//chat/completions',       _ended: false,       res: null,       aborted: false,       timeoutCb: null,       upgradeOrConnect: false,       parser: null,       maxHeadersCount: null,       reusedSocket: false,       host: 'localhost',       protocol: 'http:',       _redirectable: [Circular *1],       [Symbol(kCapture)]: false,       [Symbol(kBytesWritten)]: 0,       [Symbol(kNeedDrain)]: false,       [Symbol(corked)]: 0,       [Symbol(kOutHeaders)]: [Object: null prototype],       [Symbol(errored)]: null,       [Symbol(kHighWaterMark)]: 16384,       [Symbol(kRejectNonStandardBodyWrites)]: false,       [Symbol(kUniqueHeaders)]: null     },     _currentUrl: 'http://localhost:1234/v1/chat/completions%20//chat/completions',     [Symbol(kCapture)]: false   },   response: undefined,   isAxiosError: true,   toJSON: [Function: toJSON] } Error: connect ECONNREFUSED 127.0.0.1:1234     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {   errno: -111,   code: 'ECONNREFUSED',   syscall: 'connect',   address: '127.0.0.1',   port: 1234,   config: {     transitional: {       silentJSONParsing: true,       forcedJSONParsing: true,       clarifyTimeoutError: false     },     adapter: [Function: httpAdapter],     transformRequest: [ [Function: transformRequest] ],     transformResponse: [ [Function: transformResponse] ],     timeout: 0,     xsrfCookieName: 'XSRF-TOKEN',     xsrfHeaderName: 'X-XSRF-TOKEN',     maxContentLength: -1,     maxBodyLength: -1,     validateStatus: [Function: validateStatus],     headers: {       Accept: 'application/json, text/plain, */*',       'Content-Type': 'application/json',       'User-Agent': 'OpenAI/NodeJS/3.3.0',       Authorization: 'Bearer undefined',       'Content-Length': 408     },     method: 'post',     responseType: 'stream',     data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\\nContext:\\n    "},{"role":"user","content":"Hi"}],"temperature":0.7}',     url: 'http://localhost:1234/v1/chat/completions \\/chat/completions'   },   request: <ref *1> Writable {     _writableState: WritableState {       objectMode: false,       highWaterMark: 16384,       finalCalled: false,       needDrain: false,       ending: false,       ended: false,       finished: false,       destroyed: false,       decodeStrings: true,       defaultEncoding: 'utf8',       length: 0,       writing: false,       corked: 0,       sync: true,       bufferProcessing: false,       onwrite: [Function: bound onwrite],       writecb: null,       writelen: 0,       afterWriteTickInfo: null,       buffered: [],       bufferedIndex: 0,       allBuffers: true,       allNoop: true,       pendingcb: 0,       constructed: true,       prefinished: false,       errorEmitted: false,       emitClose: true,       autoDestroy: true,       errored: null,       closed: false,       closeEmitted: false,       [Symbol(kOnFinished)]: []     },     _events: [Object: null prototype] {       response: [Function: handleResponse],       error: [Function: handleRequestError],       socket: [Function: handleRequestSocket]     },     _eventsCount: 3,     _maxListeners: undefined,     _options: {       maxRedirects: 21,       maxBodyLength: 10485760,       protocol: 'http:',       path: '/v1/chat/completions%20//chat/completions',       method: 'POST',       headers: [Object],       agent: undefined,       agents: [Object],       auth: undefined,       hostname: 'localhost',       port: '1234',       nativeProtocols: [Object],       pathname: '/v1/chat/completions%20//chat/completions'     },     _ended: false,     _ending: true,     _redirectCount: 0,     _redirects: [],     _requestBodyLength: 408,     _requestBodyBuffers: [ [Object] ],     _onNativeResponse: [Function (anonymous)],     _currentRequest: ClientRequest {       _events: [Object: null prototype],       _eventsCount: 7,       _maxListeners: undefined,       outputData: [],       outputSize: 0,       writable: true,       destroyed: false,       _last: true,       chunkedEncoding: false,       shouldKeepAlive: false,       maxRequestsOnConnectionReached: false,       _defaultKeepAlive: true,       useChunkedEncodingByDefault: true,       sendDate: false,       _removedConnection: false,       _removedContLen: false,       _removedTE: false,       strictContentLength: false,       _contentLength: 408,       _hasBody: true,       _trailer: '',       finished: false,       _headerSent: true,       _closed: false,       socket: [Socket],       _header: 'POST /v1/chat/completions%20//chat/completions HTTP/1.1\r\n' +         'Accept: application/json, text/plain, */*\r\n' +         'Content-Type: application/json\r\n' +         'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +         'Authorization: Bearer undefined\r\n' +         'Content-Length: 408\r\n' +         'Host: localhost:1234\r\n' +         'Connection: close\r\n' +         '\r\n',       _keepAliveTimeout: 0,       _onPendingData: [Function: nop],       agent: [Agent],       socketPath: undefined,       method: 'POST',       maxHeaderSize: undefined,       insecureHTTPParser: undefined,       joinDuplicateHeaders: undefined,       path: '/v1/chat/completions%20//chat/completions',       _ended: false,       res: null,       aborted: false,       timeoutCb: null,       upgradeOrConnect: false,       parser: null,       maxHeadersCount: null,       reusedSocket: false,       host: 'localhost',       protocol: 'http:',       _redirectable: [Circular *1],       [Symbol(kCapture)]: false,       [Symbol(kBytesWritten)]: 0,       [Symbol(kNeedDrain)]: false,       [Symbol(corked)]: 0,       [Symbol(kOutHeaders)]: [Object: null prototype],       [Symbol(errored)]: null,       [Symbol(kHighWaterMark)]: 16384,       [Symbol(kRejectNonStandardBodyWrites)]: false,       [Symbol(kUniqueHeaders)]: null     },     _currentUrl: 'http://localhost:1234/v1/chat/completions%20//chat/completions',     [Symbol(kCapture)]: false   },   response: undefined,   isAxiosError: true,   toJSON: [Function: toJSON] } Error: connect ECONNREFUSED 127.0.0.1:1234     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {   errno: -111,   code: 'ECONNREFUSED',   syscall: 'connect',   address: '127.0.0.1',   port: 1234,   config: {     transitional: {       silentJSONParsing: true,       forcedJSONParsing: true,       clarifyTimeoutError: false     },     adapter: [Function: httpAdapter],     transformRequest: [ [Function: transformRequest] ],     transformResponse: [ [Function: transformResponse] ],     timeout: 0,     xsrfCookieName: 'XSRF-TOKEN',     xsrfHeaderName: 'X-XSRF-TOKEN',     maxContentLength: -1,     maxBodyLength: -1,     validateStatus: [Function: validateStatus],     headers: {       Accept: 'application/json, text/plain, */*',       'Content-Type': 'application/json',       'User-Agent': 'OpenAI/NodeJS/3.3.0',       Authorization: 'Bearer undefined',       'Content-Length': 408     },     method: 'post',     responseType: 'stream',     data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\\nContext:\\n    "},{"role":"user","content":"hi"}],"temperature":0.7}',     url: 'http://localhost:1234/v1/chat/completions \\/chat/completions'   },   request: <ref *1> Writable {     _writableState: WritableState {       objectMode: false,       highWaterMark: 16384,       finalCalled: false,       needDrain: false,       ending: false,       ended: false,       finished: false,       destroyed: false,       decodeStrings: true,       defaultEncoding: 'utf8',       length: 0,       writing: false,       corked: 0,       sync: true,       bufferProcessing: false,       onwrite: [Function: bound onwrite],       writecb: null,       writelen: 0,       afterWriteTickInfo: null,       buffered: [],       bufferedIndex: 0,       allBuffers: true,       allNoop: true,       pendingcb: 0,       constructed: true,       prefinished: false,       errorEmitted: false,       emitClose: true,       autoDestroy: true,       errored: null,       closed: false,       closeEmitted: false,       [Symbol(kOnFinished)]: []     },     _events: [Object: null prototype] {       response: [Function: handleResponse],       error: [Function: handleRequestError],       socket: [Function: handleRequestSocket]     },     _eventsCount: 3,     _maxListeners: undefined,     _options: {       maxRedirects: 21,       maxBodyLength: 10485760,       protocol: 'http:',       path: '/v1/chat/completions%20//chat/completions',       method: 'POST',       headers: [Object],       agent: undefined,       agents: [Object],       auth: undefined,       hostname: 'localhost',       port: '1234',       nativeProtocols: [Object],       pathname: '/v1/chat/completions%20//chat/completions'     },     _ended: false,     _ending: true,     _redirectCount: 0,     _redirects: [],     _requestBodyLength: 408,     _requestBodyBuffers: [ [Object] ],     _onNativeResponse: [Function (anonymous)],     _currentRequest: ClientRequest {       _events: [Object: null prototype],       _eventsCount: 7,       _maxListeners: undefined,       outputData: [],       outputSize: 0,       writable: true,       destroyed: false,       _last: true,       chunkedEncoding: false,       shouldKeepAlive: false,       maxRequestsOnConnectionReached: false,       _defaultKeepAlive: true,       useChunkedEncodingByDefault: true,       sendDate: false,       _removedConnection: false,       _removedContLen: false,       _removedTE: false,       strictContentLength: false,       _contentLength: 408,       _hasBody: true,       _trailer: '',       finished: false,       _headerSent: true,       _closed: false,       socket: [Socket],       _header: 'POST /v1/chat/completions%20//chat/completions HTTP/1.1\r\n' +         'Accept: application/json, text/plain, */*\r\n' +         'Content-Type: application/json\r\n' +         'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +         'Authorization: Bearer undefined\r\n' +         'Content-Length: 408\r\n' +         'Host: localhost:1234\r\n' +         'Connection: close\r\n' +         '\r\n',       _keepAliveTimeout: 0,       _onPendingData: [Function: nop],       agent: [Agent],       socketPath: undefined,       method: 'POST',       maxHeaderSize: undefined,       insecureHTTPParser: undefined,       joinDuplicateHeaders: undefined,       path: '/v1/chat/completions%20//chat/completions',       _ended: false,       res: null,       aborted: false,       timeoutCb: null,       upgradeOrConnect: false,       parser: null,       maxHeadersCount: null,       reusedSocket: false,       host: 'localhost',       protocol: 'http:',       _redirectable: [Circular *1],       [Symbol(kCapture)]: false,       [Symbol(kBytesWritten)]: 0,       [Symbol(kNeedDrain)]: false,       [Symbol(corked)]: 0,       [Symbol(kOutHeaders)]: [Object: null prototype],       [Symbol(errored)]: null,       [Symbol(kHighWaterMark)]: 16384,       [Symbol(kRejectNonStandardBodyWrites)]: false,       [Symbol(kUniqueHeaders)]: null     },     _currentUrl: 'http://localhost:1234/v1/chat/completions%20//chat/completions',     [Symbol(kCapture)]: false   },   response: undefined,   isAxiosError: true,   toJSON: [Function: toJSON] } Error: connect ECONNREFUSED 127.0.0.1:1234     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {   errno: -111,   code: 'ECONNREFUSED',   syscall: 'connect',   address: '127.0.0.1',   port: 1234,   config: {     transitional: {       silentJSONParsing: true,       forcedJSONParsing: true,       clarifyTimeoutError: false     },     adapter: [Function: httpAdapter],     transformRequest: [ [Function: transformRequest] ],     transformResponse: [ [Function: transformResponse] ],     timeout: 0,     xsrfCookieName: 'XSRF-TOKEN',     xsrfHeaderName: 'X-XSRF-TOKEN',     maxContentLength: -1,     maxBodyLength: -1,     validateStatus: [Function: validateStatus],     headers: {       Accept: 'application/json, text/plain, */*',       'Content-Type': 'application/json',       'User-Agent': 'OpenAI/NodeJS/3.3.0',       Authorization: 'Bearer undefined',       'Content-Length': 408     },     method: 'post',     responseType: 'stream',     data: '{"model":"model-placeholder","stream":true,"messages":[{"role":"system","content":"Given the following conversation, relevant context, and a follow up question, reply with an answer to the current question the user is asking. Return only your response to the question given the above information following the users instructions as needed.\\nContext:\\n    "},{"role":"user","content":"hi"}],"temperature":0.7}',     url: 'http://localhost:1234/v1/chat/completions'   },   request: <ref *1> Writable {     _writableState: WritableState {       objectMode: false,       highWaterMark: 16384,       finalCalled: false,       needDrain: false,       ending: false,       ended: false,       finished: false,       destroyed: false,       decodeStrings: true,       defaultEncoding: 'utf8',       length: 0,       writing: false,       corked: 0,       sync: true,       bufferProcessing: false,       onwrite: [Function: bound onwrite],       writecb: null,       writelen: 0,       afterWriteTickInfo: null,       buffered: [],       bufferedIndex: 0,       allBuffers: true,       allNoop: true,       pendingcb: 0,       constructed: true,       prefinished: false,       errorEmitted: false,       emitClose: true,       autoDestroy: true,       errored: null,       closed: false,       closeEmitted: false,       [Symbol(kOnFinished)]: []     },     _events: [Object: null prototype] {       response: [Function: handleResponse],       error: [Function: handleRequestError],       socket: [Function: handleRequestSocket]     },     _eventsCount: 3,     _maxListeners: undefined,     _options: {       maxRedirects: 21,       maxBodyLength: 10485760,       protocol: 'http:',       path: '/v1/chat/completions',       method: 'POST',       headers: [Object],       agent: undefined,       agents: [Object],       auth: undefined,       hostname: 'localhost',       port: '1234',       nativeProtocols: [Object],       pathname: '/v1/chat/completions'     },     _ended: false,     _ending: true,     _redirectCount: 0,     _redirects: [],     _requestBodyLength: 408,     _requestBodyBuffers: [ [Object] ],     _onNativeResponse: [Function (anonymous)],     _currentRequest: ClientRequest {       _events: [Object: null prototype],       _eventsCount: 7,       _maxListeners: undefined,       outputData: [],       outputSize: 0,       writable: true,       destroyed: false,       _last: true,       chunkedEncoding: false,       shouldKeepAlive: false,       maxRequestsOnConnectionReached: false,       _defaultKeepAlive: true,       useChunkedEncodingByDefault: true,       sendDate: false,       _removedConnection: false,       _removedContLen: false,       _removedTE: false,       strictContentLength: false,       _contentLength: 408,       _hasBody: true,       _trailer: '',       finished: false,       _headerSent: true,       _closed: false,       socket: [Socket],       _header: 'POST /v1/chat/completions HTTP/1.1\r\n' +         'Accept: application/json, text/plain, */*\r\n' +         'Content-Type: application/json\r\n' +         'User-Agent: OpenAI/NodeJS/3.3.0\r\n' +         'Authorization: Bearer undefined\r\n' +         'Content-Length: 408\r\n' +         'Host: localhost:1234\r\n' +         'Connection: close\r\n' +         '\r\n',       _keepAliveTimeout: 0,       _onPendingData: [Function: nop],       agent: [Agent],       socketPath: undefined,       method: 'POST',       maxHeaderSize: undefined,       insecureHTTPParser: undefined,       joinDuplicateHeaders: undefined,       path: '/v1/chat/completions',       _ended: false,       res: null,       aborted: false,       timeoutCb: null,       upgradeOrConnect: false,       parser: null,       maxHeadersCount: null,       reusedSocket: false,       host: 'localhost',       protocol: 'http:',       _redirectable: [Circular *1],       [Symbol(kCapture)]: false,       [Symbol(kBytesWritten)]: 0,       [Symbol(kNeedDrain)]: false,       [Symbol(corked)]: 0,       [Symbol(kOutHeaders)]: [Object: null prototype],       [Symbol(errored)]: null,       [Symbol(kHighWaterMark)]: 16384,       [Symbol(kRejectNonStandardBodyWrites)]: false,       [Symbol(kUniqueHeaders)]: null     },     _currentUrl: 'http://localhost:1234/v1/chat/completions',     [Symbol(kCapture)]: false   },   response: undefined,   isAxiosError: true,   toJSON: [Function: toJSON] }
Author
Owner

@timothycarambat commented on GitHub (Dec 19, 2023):

You are trying to connect to LMStudio on localhost or 127.0.0.1

Error: connect ECONNREFUSED 127.0.0.1:1234

Please Follow this important tip about connecting to localhost services when AnythingLLM is inside Docker

Change your endpoint from http://localhost:1234 to http://host.docker.internal:1234

@timothycarambat commented on GitHub (Dec 19, 2023): You are trying to connect to LMStudio on `localhost` or `127.0.0.1` > Error: connect ECONNREFUSED 127.0.0.1:1234 Please [Follow this important tip about connecting to localhost services when AnythingLLM is inside Docker](https://github.com/Mintplex-Labs/anything-llm/blob/master/docker/HOW_TO_USE_DOCKER.md#recommend-way-to-run-dockerized-anythingllm) Change your endpoint from `http://localhost:1234` to `http://host.docker.internal:1234`
yindo changed title from choose the chat mode, an error "Could not respond to message" appears,but query mode is ok to [GH-ISSUE #471] choose the chat mode, an error "Could not respond to message" appears,but query mode is ok 2026-06-05 14:34:23 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#270