Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: 200: Failed to initialize chat. OK #8

Open
aliasnameless opened this issue Dec 28, 2024 · 0 comments
Open

Error: 200: Failed to initialize chat. OK #8

aliasnameless opened this issue Dec 28, 2024 · 0 comments

Comments

@aliasnameless
Copy link

Error: 200: Failed to initialize chat. OK
    at initChat (file:///C:/Users/kurch/Desktop/openhab-marussia/node_modules/@mumulhl/duckduckgo-ai-chat/index.js:127:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async main (file:///C:/Users/kurch/Desktop/openhab-marussia/src/index.js:35:16)
[nodemon] clean exit - waiting for changes before restart

status.headers.get return null

/** Init chat.
 *
 * @param model The model used by chat.
 * @returns A Chat instance.
 */ async function initChat(model) {
  const status = await fetch(STATUS_URL, {
    headers: STATUS_HEADERS
  });
  const vqd = status.headers.get("x-vqd-4"); //  <---- status.headers.get return null
  if (!vqd) {
    throw new Error(`${status.status}: Failed to initialize chat. ${status.statusText}`);
  }
  return new Chat(vqd, _model[model]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant