sugarforever / chat-ollama

ChatOllama is an open source chatbot based on LLMs. It supports a wide range of language models, and knowledge base management.
MIT License
2.53k stars 390 forks source link

ChatGroq运行报错,请有空帮忙看一下,谢谢 #373

Closed yakey2008 closed 3 months ago

yakey2008 commented 4 months ago

运行环境 MacBook Pro Apple M1 nodejs 版本 v20.12.2

Ollama: { host: 'http://127.0.0.1:11434', username: null, password: null } Chat with Groq mixtral-8x7b-32768 [llm/start] [1:llm:ChatGroq] Entering LLM run with input: { "messages": [ [ { "lc": 1, "type": "constructor", "id": [ "langchain_core", "messages", "HumanMessage" ], "kwargs": { "content": "what is AIGC", "additional_kwargs": {}, "response_metadata": {} } }, { "lc": 1, "type": "constructor", "id": [ "langchain_core", "messages", "HumanMessage" ], "kwargs": { "content": "what is AIGC", "additional_kwargs": {}, "response_metadata": {} } } ] ] } [llm/error] [1:llm:ChatGroq] [1.34s] LLM run errored with error: "403 <!DOCTYPE html>\n\n\n\n <html class=\"no-js\" lang=\"en-US\"> \n\nAttention Required! | Cloudflare\n<meta charset=\"UTF-8\" />\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n<meta name=\"robots\" content=\"noindex, nofollow\" />\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n<link rel=\"stylesheet\" id=\"cf_styles-css\" href=\"/cdn-cgi/styles/cf.errors.css\" />\n\n\n\n\n\n\n\n\n\n\n\n <div id=\"cf-wrapper\">\n <div class=\"cf-alert cf-alert-error cf-cookie-error\" id=\"cookie-alert\" data-translate=\"enable_cookies\">Please enable cookies.

\n <div id=\"cf-error-details\" class=\"cf-error-details-wrapper\">\n <div class=\"cf-wrapper cf-header cf-error-overview\">\n <h1 data-translate=\"block_headline\">Sorry, you have been blocked\n <h2 class=\"cf-subheadline\"><span data-translate=\"unable_to_access\">You are unable to access groq.com\n
\n\n <div class=\"cf-section cf-highlight\">\n <div class=\"cf-wrapper\">\n <div class=\"cf-screenshot-container cf-screenshot-full\">\n \n <span class=\"cf-no-screenshot error\">\n \n \n \n \n\n <div class=\"cf-section cf-wrapper\">\n <div class=\"cf-columns two\">\n <div class=\"cf-column\">\n <h2 data-translate=\"blocked_why_headline\">Why have I been blocked?\n\n <p data-translate=\"blocked_why_detail\">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

\n \n\n <div class=\"cf-column\">\n <h2 data-translate=\"blocked_resolve_headline\">What can I do to resolve this?\n\n <p data-translate=\"blocked_resolve_detail\">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

\n \n \n \n\n <div class=\"cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300\">\n <p class=\"text-13\">\n <span class=\"cf-footer-item sm:block sm:mb-1\">Cloudflare Ray ID: <strong class=\"font-semibold\">87ae905efd301781\n <span class=\"cf-footer-separator sm:hidden\">•\n <span id=\"cf-footer-item-ip\" class=\"cf-footer-item hidden sm:block sm:mb-1\">\n Your IP:\n <button type=\"button\" id=\"cf-footer-ip-reveal\" class=\"cf-footer-ip-reveal-btn\">Click to reveal\n <span class=\"hidden\" id=\"cf-footer-ip\">222.64.152.110\n <span class=\"cf-footer-separator sm:hidden\">•\n \n <span class=\"cf-footer-item sm:block sm:mb-1\">Performance & security by <a rel=\"noopener noreferrer\" href=\"https://www.cloudflare.com/5xx-error-landing\" id=\"brand_link\" target=\"_blank\">Cloudflare\n \n

\n \n\n\n\n \n \n\n \n\n\n\n\n\nError: 403 <!DOCTYPE html>\n\n\n\n <html class=\"no-js\" lang=\"en-US\"> \n\nAttention Required! | Cloudflare\n<meta charset=\"UTF-8\" />\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n<meta name=\"robots\" content=\"noindex, nofollow\" />\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n<link rel=\"stylesheet\" id=\"cf_styles-css\" href=\"/cdn-cgi/styles/cf.errors.css\" />\n\n\n\n\n\n\n\n\n\n\n\n <div id=\"cf-wrapper\">\n <div class=\"cf-alert cf-alert-error cf-cookie-error\" id=\"cookie-alert\" data-translate=\"enable_cookies\">Please enable cookies.\n <div id=\"cf-error-details\" class=\"cf-error-details-wrapper\">\n <div class=\"cf-wrapper cf-header cf-error-overview\">\n <h1 data-translate=\"block_headline\">Sorry, you have been blocked\n <h2 class=\"cf-subheadline\"><span data-translate=\"unable_to_access\">You are unable to access groq.com\n \n\n <div class=\"cf-section cf-highlight\">\n <div class=\"cf-wrapper\">\n <div class=\"cf-screenshot-container cf-screenshot-full\">\n \n <span class=\"cf-no-screenshot error\">\n \n \n \n \n\n <div class=\"cf-section cf-wrapper\">\n <div class=\"cf-columns two\">\n <div class=\"cf-column\">\n <h2 data-translate=\"blocked_why_headline\">Why have I been blocked?\n\n <p data-translate=\"blocked_why_detail\">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

\n \n\n <div class=\"cf-column\">\n <h2 data-translate=\"blocked_resolve_headline\">What can I do to resolve this?\n\n <p data-translate=\"blocked_resolve_detail\">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

\n \n \n \n\n <div class=\"cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300\">\n <p class=\"text-13\">\n <span class=\"cf-footer-item sm:block sm:mb-1\">Cloudflare Ray ID: <strong class=\"font-semibold\">87ae905efd301781\n <span class=\"cf-footer-separator sm:hidden\">•\n <span id=\"cf-footer-item-ip\" class=\"cf-footer-item hidden sm:block sm:mb-1\">\n Your IP:\n <button type=\"button\" id=\"cf-footer-ip-reveal\" class=\"cf-footer-ip-reveal-btn\">Click to reveal\n <span class=\"hidden\" id=\"cf-footer-ip\">222.64.152.110\n <span class=\"cf-footer-separator sm:hidden\">•\n \n <span class=\"cf-footer-item sm:block sm:mb-1\">Performance & security by <a rel=\"noopener noreferrer\" href=\"https://www.cloudflare.com/5xx-error-landing\" id=\"brand_link\" target=\"_blank\">Cloudflare\n \n

\n \n\n\n\n \n \n\n \n\n\n\n\n at Function.generate (/Users/aaron/study/chat-ollama/node_modules/groq-sdk/src/error.ts:66:14)\n at Groq.makeStatusError (/Users/aaron/study/chat-ollama/node_modules/groq-sdk/src/core.ts:383:21)\n at Groq.makeRequest (/Users/aaron/study/chat-ollama/node_modules/groq-sdk/src/core.ts:446:24)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async RetryOperation._fn (/Users/aaron/study/chat-ollama/node_modules/p-retry/index.js:50:12)"

ERROR [nuxt] [request error] [unhandled] [403] 403 <!DOCTYPE html>

Attention Required! | Cloudflare

Sorry, you have been blocked

You are unable to access groq.com

Why have I been blocked?

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

What can I do to resolve this?

You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

What can I do to resolve this?

You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

at Function.generate (./node_modules/groq-sdk/src/error.ts:66:14)
at Groq.makeStatusError (./node_modules/groq-sdk/src/core.ts:383:21)
at Groq.makeRequest (./node_modules/groq-sdk/src/core.ts:446:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RetryOperation._fn (./node_modules/p-retry/index.js:50:12)

shunyue1320 commented 4 months ago

我也是 stream.getReader is not a function

image
satrong commented 4 months ago

@yakey2008 groq 对国内ip是禁止使用的

satrong commented 4 months ago

@shunyue1320 你的是做什么操作报这个错误的?

我也是 stream.getReader is not a function image

shunyue1320 commented 4 months ago

发送聊天请求就报错

yakey2008 commented 4 months ago

@yakey2008 groq 对国内ip是禁止使用的

了解了,谢谢你

sugarforever commented 3 months ago

发送聊天请求就报错

看起来你是用的Ollama 模型。先用类似以下的命令来确认 Ollama 是否工作正常

curl http://localhost:11434/api/chat -d '{
  "model": "llama3",
  "messages": [
    { "role": "user", "content": "why is the sky blue?" }
  ]
}'
shunyue1320 commented 3 months ago

用的是 openai, 聊天没有回答

image image
satrong commented 3 months ago

@shunyue1320 或许你的 api 地址要补上 /v1 或 /v2 后缀

shunyue1320 commented 3 months ago

是的加上 /v1 可以了,谢谢!