ItzCrazyKns / Perplexica

Perplexica is an AI-powered search engine. It is an Open source alternative to Perplexity AI
MIT License
16.26k stars 1.52k forks source link

Unable to search for content #108

Closed liujvnes closed 6 months ago

liujvnes commented 6 months ago

image Windows PowerShell 版权所有(C) Microsoft Corporation。保留所有权利。

安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows

PS C:\Ai Project\Perplexica> npm run start

perplexica-backend@1.4.0 start node dist/app.js

info: WebSocket server started on port 3001 info: Server is running on port 3001

node:internal/process/promises:289 triggerUncaughtException(err, true / fromPromise /); ^ AxiosError [AggregateError] at AxiosError.from (C:\Ai Project\Perplexica\node_modules\axios\dist\node\axios.cjs:836:14) at RedirectableRequest.handleRequestError (C:\Ai Project\Perplexica\node_modules\axios\dist\node\axios.cjs:3086:25) at RedirectableRequest.emit (node:events:518:28) at eventHandlers. (C:\Ai Project\Perplexica\node_modules\follow-redirects\index.js:38:24) at ClientRequest.emit (node:events:518:28) at Socket.socketErrorListener (node:_http_client:500:9) at Socket.emit (node:events:518:28) at emitErrorNT (node:internal/streams/destroy:169:8) at emitErrorCloseNT (node:internal/streams/destroy:128:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) at Axios.request (C:\Ai Project\Perplexica\node_modules\axios\dist\node\axios.cjs:3876:41) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async searchSearxng (C:\Ai Project\Perplexica\dist\lib\searxng.js:22:17) at async RunnableLambda.func (C:\Ai Project\Perplexica\dist\agents\webSearchAgent.js:82:25) at async C:\Ai Project\Perplexica\node_modules\@langchain\core\dist\runnables\base.cjs:1385:33 { code: 'ECONNREFUSED', errors: [ Error: connect ECONNREFUSED ::1:32768 at createConnectionError (node:net:1646:14) at afterConnectMultiple (node:net:1676:16) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 32768 }, Error: connect ECONNREFUSED 127.0.0.1:32768 at createConnectionError (node:net:1646:14) at afterConnectMultiple (node:net:1676:16) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 32768 } ], config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http' ], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function: FormData] { LINE_BREAK: '\r\n', DEFAULT_CONTENT_TYPE: 'application/octet-stream' }, Blob: [class Blob] }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json, text/plain, /', 'Content-Type': undefined, 'User-Agent': 'axios/1.6.8', 'Accept-Encoding': 'gzip, compress, deflate, br' }, method: 'get', url: 'http://localhost:32768/search?format=json&q=The+rephrased+question+is%3A%0A%0A%3E+What+is+Docker%3F%0A%0AThis+question+is+standalone+and+can+be+used+by+the+LLM+to+search+the+web+for+information.&language=en', data: undefined }, request: <ref *2> Writable { _events: { close: undefined, error: [Function: handleRequestError], prefinish: undefined, finish: undefined, drain: undefined, response: [Function: handleResponse], socket: [Function: handleRequestSocket] }, _writableState: WritableState { highWaterMark: 16384, length: 0, corked: 0, onwrite: [Function: bound onwrite], writelen: 0, bufferedIndex: 0, pendingcb: 0,

  [Symbol(kBufferedValue)]: null
},
_maxListeners: undefined,
_options: {
  maxRedirects: 21,
  maxBodyLength: Infinity,
  protocol: 'http:',
  path: '/search?format=json&q=The+rephrased+question+is%3A%0A%0A%3E+What+is+Docker%3F%0A%0AThis+question+is+standalone+and+can+be+used+by+the+LLM+to+search+the+web+for+information.&language=en',
  method: 'GET',
  headers: [Object: null prototype] {
    Accept: 'application/json, text/plain, */*',
    'User-Agent': 'axios/1.6.8',
    'Accept-Encoding': 'gzip, compress, deflate, br'
  },
  agents: { http: undefined, https: undefined },
  auth: undefined,
  family: undefined,
  beforeRedirect: [Function: dispatchBeforeRedirect],
  beforeRedirects: { proxy: [Function: beforeRedirect] },
  hostname: 'localhost',
  port: '32768',
  agent: undefined,
  nativeProtocols: {
    'http:': {
      _connectionListener: [Function: connectionListener],
      METHODS: [
        'ACL',         'BIND',       'CHECKOUT',
        'CONNECT',     'COPY',       'DELETE',
        'GET',         'HEAD',       'LINK',
        'LOCK',        'M-SEARCH',   'MERGE',
        'MKACTIVITY',  'MKCALENDAR', 'MKCOL',
        'MOVE',        'NOTIFY',     'OPTIONS',
        'PATCH',       'POST',       'PROPFIND',
        'PROPPATCH',   'PURGE',      'PUT',
        'REBIND',      'REPORT',     'SEARCH',
        'SOURCE',      'SUBSCRIBE',  'TRACE',
        'UNBIND',      'UNLINK',     'UNLOCK',
        'UNSUBSCRIBE'
      ],
      STATUS_CODES: {
        '100': 'Continue',
        '101': 'Switching Protocols',
        '102': 'Processing',
        '103': 'Early Hints',
        '200': 'OK',
        '201': 'Created',
        '202': 'Accepted',
        '203': 'Non-Authoritative Information',
        '204': 'No Content',
        '205': 'Reset Content',
        '206': 'Partial Content',
        '207': 'Multi-Status',
        '208': 'Already Reported',
        '226': 'IM Used',
        '300': 'Multiple Choices',
        '301': 'Moved Permanently',
        '302': 'Found',
        '303': 'See Other',
        '304': 'Not Modified',
        '305': 'Use Proxy',
        '307': 'Temporary Redirect',
        '308': 'Permanent Redirect',
        '400': 'Bad Request',
        '401': 'Unauthorized',
        '402': 'Payment Required',
        '403': 'Forbidden',
        '404': 'Not Found',
        '405': 'Method Not Allowed',
        '406': 'Not Acceptable',
        '407': 'Proxy Authentication Required',
        '408': 'Request Timeout',
        '409': 'Conflict',
        '410': 'Gone',
        '411': 'Length Required',
        '412': 'Precondition Failed',
        '413': 'Payload Too Large',
        '414': 'URI Too Long',
        '415': 'Unsupported Media Type',
        '416': 'Range Not Satisfiable',
        '417': 'Expectation Failed',
        '418': "I'm a Teapot",
        '421': 'Misdirected Request',
        '422': 'Unprocessable Entity',
        '423': 'Locked',
        '424': 'Failed Dependency',
        '425': 'Too Early',
        '426': 'Upgrade Required',
        '428': 'Precondition Required',
        '429': 'Too Many Requests',
        '431': 'Request Header Fields Too Large',
        '451': 'Unavailable For Legal Reasons',
        '500': 'Internal Server Error',
        '501': 'Not Implemented',
        '502': 'Bad Gateway',
        '503': 'Service Unavailable',
        '504': 'Gateway Timeout',
        '505': 'HTTP Version Not Supported',
        '506': 'Variant Also Negotiates',
        '507': 'Insufficient Storage',
        '508': 'Loop Detected',
        '509': 'Bandwidth Limit Exceeded',
        '510': 'Not Extended',
        '511': 'Network Authentication Required'
      },
      Agent: [Function: Agent] { defaultMaxSockets: Infinity },
      ClientRequest: [Function: ClientRequest],
      IncomingMessage: [Function: IncomingMessage],
      OutgoingMessage: [Function: OutgoingMessage],
      Server: [Function: Server],
      ServerResponse: [Function: ServerResponse],
      createServer: [Function: createServer],
      validateHeaderName: [Function: wrappedFn] {
        withoutStackTrace: [Function (anonymous)]
      },
      validateHeaderValue: [Function: wrappedFn] {
        withoutStackTrace: [Function (anonymous)]
      },
      get: [Function: get],
      request: [Function: request],
      setMaxIdleHTTPParsers: [Function: setMaxIdleHTTPParsers],
      maxHeaderSize: [Getter],
      globalAgent: [Getter/Setter]
    },
    'https:': {
      Agent: [Function: Agent],
      globalAgent: Agent {
        _events: [Object: null prototype],
        _eventsCount: 2,
        _maxListeners: undefined,
        defaultPort: 443,
        protocol: 'https:',
        options: [Object: null prototype],
        requests: [Object: null prototype] {},
        sockets: [Object: null prototype] {},
        freeSockets: [Object: null prototype] {},
        keepAliveMsecs: 1000,
        keepAlive: true,
        maxSockets: Infinity,
        maxFreeSockets: 256,
        scheduling: 'lifo',
        maxTotalSockets: Infinity,
        totalSocketCount: 0,
        maxCachedSessions: 100,
        _sessionCache: [Object],
        [Symbol(shapeMode)]: false,
        [Symbol(kCapture)]: false
      },
      Server: [Function: Server],
      createServer: [Function: createServer],
      get: [Function: get],
      request: [Function: request]
    }
  },
  pathname: '/search',
  search: '?format=json&q=The+rephrased+question+is%3A%0A%0A%3E+What+is+Docker%3F%0A%0AThis+question+is+standalone+and+can+be+used+by+the+LLM+to+search+the+web+for+information.&language=en'
},
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: <ref *1> ClientRequest {
  _events: [Object: null prototype] {
    response: [Function: bound onceWrapper] {
      listener: [Function (anonymous)]
    },
    abort: [Function (anonymous)],
    aborted: [Function (anonymous)],
    connect: [Function (anonymous)],
    error: [Function (anonymous)],
    socket: [Function (anonymous)],
    timeout: [Function (anonymous)]
  },
  _eventsCount: 7,
  _maxListeners: undefined,
  outputData: [],
  outputSize: 0,
  writable: true,
  destroyed: false,
  _last: true,
  chunkedEncoding: false,
  shouldKeepAlive: true,
  maxRequestsOnConnectionReached: false,
  _defaultKeepAlive: true,
  useChunkedEncodingByDefault: false,
  sendDate: false,
  _removedConnection: false,
  _removedContLen: false,
  _removedTE: false,
  strictContentLength: false,
  _contentLength: 0,
  _hasBody: true,
  _trailer: '',
  finished: true,
  _headerSent: true,
  _closed: false,
  socket: Socket {
    connecting: false,
    _hadError: true,
    _parent: null,
    _host: 'localhost',
    _closeAfterHandlingError: false,
    _events: {
      close: [
        [Function: onClose],
        [Function: socketCloseListener],
        [Function]
      ],
      error: [Function: socketErrorListener],
      prefinish: undefined,
      finish: undefined,
      drain: [Function: ondrain],
      data: undefined,
      end: [Function: onReadableStreamEnd],
      readable: undefined,
      connect: [ [Function], [Function], [Function] ],
      free: [Function: onFree],
      timeout: [ [Function: onTimeout], [Function] ],
      agentRemove: [Function: onRemove]
    },
    _readableState: ReadableState {
      highWaterMark: 16384,
      buffer: [],
      bufferIndex: 0,
      length: 0,
      pipes: [],
      awaitDrainWriters: null,
      [Symbol(kState)]: 59777526,
      [Symbol(kErroredValue)]: AggregateError [ECONNREFUSED]:
          at internalConnectMultiple (node:net:1116:18)
          at afterConnectMultiple (node:net:1683:7) {
        code: 'ECONNREFUSED',
        [errors]: [Array]
      }
    },
    _writableState: WritableState {
      highWaterMark: 16384,
      length: 362,
      corked: 0,
      onwrite: [Function: bound onwrite],
      writelen: 362,
      bufferedIndex: 0,
      pendingcb: 1,
      [Symbol(kState)]: 118260214,
      [Symbol(kBufferedValue)]: null,
      [Symbol(kWriteCbValue)]: [Function: bound onFinish],
      [Symbol(kErroredValue)]: AggregateError [ECONNREFUSED]:
          at internalConnectMultiple (node:net:1116:18)
          at afterConnectMultiple (node:net:1683:7) {
        code: 'ECONNREFUSED',
        [errors]: [Array]
      }
    },
    allowHalfOpen: false,
    _maxListeners: undefined,
    _eventsCount: 8,
    _sockname: null,
    _pendingData: 'GET /search?format=json&q=The+rephrased+question+is%3A%0A%0A%3E+What+is+Docker%3F%0A%0AThis+question+is+standalone+and+can+be+used+by+the+LLM+to+search+the+web+for+information.&language=en HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'User-Agent: axios/1.6.8\r\n' +
      'Accept-Encoding: gzip, compress, deflate, br\r\n' +
      'Host: localhost:32768\r\n' +
      'Connection: keep-alive\r\n' +
      '\r\n',
    _pendingEncoding: 'latin1',
    server: null,
    _server: null,
    timeout: 5000,
    parser: null,
    _httpMessage: [Circular *1],
    autoSelectFamilyAttemptedAddresses: [ '::1:32768', '127.0.0.1:32768' ],
    [Symbol(async_id_symbol)]: 284,
    [Symbol(kHandle)]: null,
    [Symbol(lastWriteQueueSize)]: 0,
    [Symbol(timeout)]: Timeout {
      _idleTimeout: -1,
      _idlePrev: null,
      _idleNext: null,
      _idleStart: 92021,
      _onTimeout: null,
      _timerArgs: undefined,
      _repeat: null,
      _destroyed: true,
      [Symbol(refed)]: false,
      [Symbol(kHasPrimitive)]: false,
      [Symbol(asyncId)]: 276,
      [Symbol(triggerId)]: 0
    },
    [Symbol(kBuffer)]: null,
    [Symbol(kBufferCb)]: null,
    [Symbol(kBufferGen)]: null,
    [Symbol(shapeMode)]: true,
    [Symbol(kCapture)]: false,
    [Symbol(kSetNoDelay)]: true,
    [Symbol(kSetKeepAlive)]: true,
    [Symbol(kSetKeepAliveInitialDelay)]: 60,
    [Symbol(kBytesRead)]: 0,
    [Symbol(kBytesWritten)]: 0
  },
  _header: 'GET /search?format=json&q=The+rephrased+question+is%3A%0A%0A%3E+What+is+Docker%3F%0A%0AThis+question+is+standalone+and+can+be+used+by+the+LLM+to+search+the+web+for+information.&language=en HTTP/1.1\r\n' +
    'Accept: application/json, text/plain, */*\r\n' +
    'User-Agent: axios/1.6.8\r\n' +
    'Accept-Encoding: gzip, compress, deflate, br\r\n' +
    'Host: localhost:32768\r\n' +
    'Connection: keep-alive\r\n' +
    '\r\n',
  _keepAliveTimeout: 0,
  _onPendingData: [Function: nop],
  agent: Agent {
    _events: [Object: null prototype] {
      free: [Function (anonymous)],
      newListener: [Function: maybeEnableKeylog]
    },
    _eventsCount: 2,
    _maxListeners: undefined,
    defaultPort: 80,
    protocol: 'http:',
    options: [Object: null prototype] {
      keepAlive: true,
      scheduling: 'lifo',
      timeout: 5000,
      noDelay: true,
      path: null
    },
    requests: [Object: null prototype] {},
    sockets: [Object: null prototype] { 'localhost:32768:': [ [Socket] ] },
    freeSockets: [Object: null prototype] {},
    keepAliveMsecs: 1000,
    keepAlive: true,
    maxSockets: Infinity,
    maxFreeSockets: 256,
    scheduling: 'lifo',
    maxTotalSockets: Infinity,
    totalSocketCount: 1,
    [Symbol(shapeMode)]: false,
    [Symbol(kCapture)]: false
  },
  socketPath: undefined,
  method: 'GET',
  maxHeaderSize: undefined,
  insecureHTTPParser: undefined,
  joinDuplicateHeaders: undefined,
  path: '/search?format=json&q=The+rephrased+question+is%3A%0A%0A%3E+What+is+Docker%3F%0A%0AThis+question+is+standalone+and+can+be+used+by+the+LLM+to+search+the+web+for+information.&language=en',
  _ended: false,
  res: null,
  aborted: false,
  timeoutCb: [Function: emitRequestTimeout],
  upgradeOrConnect: false,
  parser: null,
  maxHeadersCount: null,
  reusedSocket: false,
  host: 'localhost',
  protocol: 'http:',
  _redirectable: [Circular *2],
  [Symbol(shapeMode)]: false,
  [Symbol(kCapture)]: false,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(kNeedDrain)]: false,
  [Symbol(corked)]: 0,
  [Symbol(kOutHeaders)]: [Object: null prototype] {
    accept: [ 'Accept', 'application/json, text/plain, */*' ],
    'user-agent': [ 'User-Agent', 'axios/1.6.8' ],
    'accept-encoding': [ 'Accept-Encoding', 'gzip, compress, deflate, br' ],
    host: [ 'Host', 'localhost:32768' ]
  },
  [Symbol(errored)]: null,
  [Symbol(kHighWaterMark)]: 16384,
  [Symbol(kRejectNonStandardBodyWrites)]: false,
  [Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://localhost:32768/search?format=json&q=The+rephrased+question+is%3A%0A%0A%3E+What+is+Docker%3F%0A%0AThis+question+is+standalone+and+can+be+used+by+the+LLM+to+search+the+web+for+information.&language=en',
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false

}, cause: AggregateError [ECONNREFUSED]: at internalConnectMultiple (node:net:1116:18) at afterConnectMultiple (node:net:1683:7) { code: 'ECONNREFUSED',

  Error: connect ECONNREFUSED ::1:32768
      at createConnectionError (node:net:1646:14)
      at afterConnectMultiple (node:net:1676:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '::1',
    port: 32768
  },
  Error: connect ECONNREFUSED 127.0.0.1:32768
      at createConnectionError (node:net:1646:14)
      at afterConnectMultiple (node:net:1676:16) {
    errno: -4078,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 32768
  }
]

} }

Node.js v20.12.2 PS C:\Ai Project\Perplexica> #

ItzCrazyKns commented 6 months ago

Seems like manual installation and you forgot to install SearXNG. Install SearXNG and update its URL in the config file.

phineas-pta commented 4 months ago

can we have a remainder to install SearXNG in README ?

ItzCrazyKns commented 4 months ago

can we have a remainder to install SearXNG in README ?

Added