diff --git a/app/api/google/[...path]/route.ts b/app/api/google/[...path]/route.ts index 83a7ce794c1..940362d04ed 100644 --- a/app/api/google/[...path]/route.ts +++ b/app/api/google/[...path]/route.ts @@ -57,6 +57,11 @@ export const GET = handle; export const POST = handle; export const runtime = "edge"; + +// due to Gemini-1.5-pro is not available in Hong Kong, we need to set the preferred region to exclude "Hong Kong (hkg1)". +// the paid service of the Gemini API is required in the following regions until 8 July 2024. The free service is not available. Therefore, the regions is temporarily disabled. +// regions include Dublin (dub1, Ireland), Paris (cdg1, France), Frankfurt (fra1, Germany), London (lhr1, UK), and Stockholm (arn1, Sweden). +// refs: https://ai.google.dev/gemini-api/docs/available-regions export const preferredRegion = [ "bom1", "cle1", diff --git a/app/constant.ts b/app/constant.ts index 0e3d76fac60..8df0ccc095b 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -197,21 +197,16 @@ export const KnowledgeCutOffDate: Record = { "gpt-4o-2024-05-13": "2023-10", "gpt-4o-mini": "2023-10", "gpt-4o-mini-2024-07-18": "2023-10", - "gpt-4-vision-preview": "2023-04", // After improvements, // it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously. "gemini-pro": "2023-12", - "gemini-pro-vision": "2023-12", }; const openaiModels = [ "gpt-3.5-turbo", "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-0125", "gpt-4", - "gpt-4-0613", "gpt-4-32k", - "gpt-4-32k-0613", "gpt-4-turbo", "gpt-4-turbo-preview", "gpt-4o", @@ -227,7 +222,6 @@ const googleModels = [ "gemini-1.0-pro", "gemini-1.5-pro-latest", "gemini-1.5-flash-latest", - "gemini-pro-vision", ]; const anthropicModels = [ diff --git a/app/utils.ts b/app/utils.ts index 2f2c8ae95ab..8b169d45d02 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -250,18 +250,7 @@ export function getMessageImages(message: RequestMessage): string[] { export function isVisionModel(model: string) { // Note: This is a better way using the TypeScript feature instead of `&&` or `||` (ts v5.5.0-dev.20240314 I've been using) - const visionKeywords = [ - "vision", - "claude-3", - "gemini-1.5-pro", - "gemini-1.5-flash", - "gpt-4o", - "gpt-4o-mini", - ]; - const isGpt4Turbo = - model.includes("gpt-4-turbo") && !model.includes("preview"); + const visionKeywords = ["claude-3", "gemini-1.5", "gpt-4"]; - return ( - visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo - ); + return visionKeywords.some((keyword) => model.includes(keyword)); } diff --git a/docs/faq-cn.md b/docs/faq-cn.md index 06a96852b7d..48e0aba5461 100644 --- a/docs/faq-cn.md +++ b/docs/faq-cn.md @@ -7,7 +7,7 @@ # 部署相关问题 -各种部署方式详细教程参考:https://rptzik3toh.feishu.cn/docx/XtrdduHwXoSCGIxeFLlcEPsdn8b +各种部署方式详细教程参考: [link](https://rptzik3toh.feishu.cn/docx/XtrdduHwXoSCGIxeFLlcEPsdn8b) ## 为什么 Docker 部署版本一直提示更新 @@ -80,7 +80,7 @@ keepalive_timeout 300; # 设定keep-alive超时时间为65秒 ## 为什么 docker 部署后出现网络错误? -详见讨论:https://github.com/Yidadaa/ChatGPT-Next-Web/issues/1569 +详见讨论: [link](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/1569) # 使用相关问题 @@ -109,12 +109,12 @@ API KEY 有问题。余额不足。 为了减少首屏白屏时间,默认启用了分块编译,技术原理见下: -- https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading -- https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4 -- https://github.com/vercel/next.js/issues/38507 -- https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4 +- [Next.js Lazy Loading](https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) +- [Vercel Issue 38507](https://github.com/vercel/next.js/issues/38507) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) -然而 NextJS 的兼容性比较差,在比较老的浏览器上会导致此报错,可以在编译时关闭分块编译。 +然而 Next.JS 的兼容性比较差,在比较老的浏览器上会导致此报错,可以在编译时关闭分块编译。 对于 Vercel 平台,在环境变量中增加 `DISABLE_CHUNK=1`,然后重新部署即可; 对于自行编译部署的项目,在构建时使用 `DISABLE_CHUNK=1 yarn build` 构建即可; @@ -187,12 +187,6 @@ OpenAI 只接受指定地区的信用卡(中国信用卡无法使用)。一 2. 申请国外信用卡 3. 网上找人代充 -## 如何使用 GPT-4 的 API 访问? - -- GPT-4 的 API 访问需要单独申请。到以下地址填写你的信息进入申请队列 waitlist(准备好你的 OpenAI 组织 ID):https://openai.com/waitlist/gpt-4-api - 之后等待邮件消息。 -- 开通 ChatGPT Plus 不代表有 GPT-4 权限,两者毫无关系。 - ## 如何使用 Azure OpenAI 接口 请参考:[#371](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/371) @@ -215,14 +209,7 @@ OpenAI 网站计费说明:https://openai.com/pricing#language-models OpenAI 根据 token 数收费,1000 个 token 通常可代表 750 个英文单词,或 500 个汉字。输入(Prompt)和输出(Completion)分别统计费用。 |模型|用户输入(Prompt)计费|模型输出(Completion)计费|每次交互最大 token 数| |----|----|----|----| -|gpt-3.5-turbo|$0.0015 / 1 千 tokens|$0.002 / 1 千 tokens|4096| -|gpt-3.5-turbo-16K|$0.003 / 1 千 tokens|$0.004 / 1 千 tokens|16384| -|gpt-4|$0.03 / 1 千 tokens|$0.06 / 1 千 tokens|8192| -|gpt-4-32K|$0.06 / 1 千 tokens|$0.12 / 1 千 tokens|32768| - -## gpt-3.5-turbo 和 gpt3.5-turbo-0301(或者 gpt3.5-turbo-mmdd)模型有什么区别? - -官方文档说明:https://platform.openai.com/docs/models/gpt-3-5 - -- gpt-3.5-turbo 是最新的模型,会不断得到更新。 -- gpt-3.5-turbo-0301 是 3 月 1 日定格的模型快照,不会变化,预期 3 个月后被新快照替代。 +|gpt-3.5-turbo|$0.0005 / 1 千 tokens|$0.0015 / 1 千 tokens|16384| +|gpt-4|$0.030 / 1 千 tokens|$0.060 / 1 千 tokens|8192| +|gpt-4-turbo|$0.010 / 1 千 tokens|$0.030 / 1 千 tokens|128000| +|gpt-4o|$0.005 / 1 千 tokens|$0.015 / 1 千 tokens|128000| \ No newline at end of file diff --git a/docs/faq-en.md b/docs/faq-en.md index 31b2d58e08c..3d98ce001af 100644 --- a/docs/faq-en.md +++ b/docs/faq-en.md @@ -7,6 +7,8 @@ # Deployment Related Questions +For detailed tutorials on various deployment methods, please refer to: [link](https://rptzik3toh.feishu.cn/docx/XtrdduHwXoSCGIxeFLlcEPsdn8b) + ## Why does the Docker deployment version always prompt for updates The Docker version is equivalent to the stable version, and the latest Docker is always consistent with the latest release version. Currently, our release frequency is once every one to two days, so the Docker version will always be one to two days behind the latest commit, which is expected. @@ -62,62 +64,67 @@ Please check and troubleshoot the following issues: - Is the route to the server okay? - Is the domain name resolved correctly? -## You may encounter an "Error: Loading CSS chunk xxx failed..." +## What is a proxy and how do I use it? + +Due to OpenAI's IP restrictions, China and some other countries/regions cannot directly connect to the OpenAI API and need to use a proxy. You can use a proxy server (forward proxy), or a pre-configured OpenAI API reverse proxy. + +- Example of forward proxy: scientific internet access VPN. In the case of docker deployment, set the environment variable HTTP_PROXY to your proxy address (for example: 10.10.10.10:8002). +- Example of reverse proxy: you can use someone else's built-in proxy address, or set it up through Cloudflare for free. Set the project environment variable BASE_URL to your proxy address. -To reduce the initial white screen time, Next.js enables chunking by default. You can find the technical details here: +## Can I deploy on a domestic server? -- https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading -- https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4 -- https://github.com/vercel/next.js/issues/38507 -- https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4 +You can, but you need to solve the following problems: -However, Next.js has limited compatibility with older browsers, which can result in this error. +- You need a proxy to connect to websites like github and openAI; +- If you set up domain name resolution on a domestic server, you need to go through the process of domain name registration; +- Domestic policies restrict proxy access to foreign networks/ChatGPT related applications, which may lead to blocking. -You can disable chunking during building. +## Why do I get network errors after Docker deployment? -For Vercel platform, you can add `DISABLE_CHUNK=1` to the environment variables and redeploy. -For self-deployed projects, you can use `DISABLE_CHUNK=1 yarn build` during the build process. -For Docker users, as the build is already completed during packaging, disabling this feature is currently not supported. +See discussion: [link](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/1569) -Note that when you disable this feature, all resources will be loaded on the user's first visit. This may result in a longer white screen time if the user has a poor network connection, affecting the user experience. Please consider this when making a decision. +# Usage Related Issues -# Usage Related Questions +## Why does it keep prompting "Something went wrong, please try again later"? -## Why does it always prompt "An error occurred, please try again later" +There could be many reasons. Please troubleshoot them in order: -There could be many reasons, please check the following in order: +- Please check if your code version is the latest version. Update to the latest version and try again; +- Please check if your api key is set correctly. The environment variable name must be in all uppercase with an underscore; +- Please check if your api key is valid; +- If you have gone through the above steps and still cannot determine the problem, please submit a new issue in the issue section and attach the runtime log of vercel or the log of docker running. -- First, check if your code version is the latest version, update to the latest version and try again; -- Check if the api key is set correctly, the environment variable name must be uppercase with underscores; -- Check if the api key is available; -- If you still cannot determine the problem after going through the above steps, please submit a new issue in the issue area and attach the runtime log of vercel or the log of docker runtime. +## Why is the ChatGPT reply garbled? -## Why does ChatGPT's reply get garbled +In the settings interface - model settings section, there is an item called `temperature`. If this value is greater than 1, it may cause the reply to be garbled. Setting it back to 1 or less will solve the issue. -In the settings page - model settings, there is an item called `temperature`. If this value is greater than 1, it may cause garbled replies. Adjust it back to within 1. +## When using it, it prompts "Unauthorized state, please enter the access code in the settings page"? -## It prompts "Now it's unauthorized, please enter the access password on the settings page" when using? +The project has set an access password through the environment variable CODE. The first time you use it, you need to go to the settings and enter the access code to use it. -The project has set an access password through the environment variable CODE. When using it for the first time, you need to go to settings and enter the access code to use. +## When using it, it prompts "You exceeded your current quota, ..." -## It prompts "You exceeded your current quota, ..." when using? +There is a problem with the API KEY. Insufficient balance. -The API KEY is problematic. Insufficient balance. +## When using it, it prompts "Error: Loading CSS chunk xxx failed..." -## What is a proxy and how to use it? +In order to reduce the white screen time on the first screen, chunk compilation is enabled by default. The technical principle is as follows: -Due to IP restrictions of OpenAI, China and some other countries/regions cannot directly connect to OpenAI API and need to go through a proxy. You can use a proxy server (forward proxy) or a pre-configured OpenAI API reverse proxy. +- [Next.js Lazy Loading](https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) +- [Vercel Issue 38507](https://github.com/vercel/next.js/issues/38507) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) -- Forward proxy example: VPN ladder. In the case of docker deployment, set the environment variable HTTP_PROXY to your proxy address (http://address:port). -- Reverse proxy example: You can use someone else's proxy address or set it up for free through Cloudflare. Set the project environment variable BASE_URL to your proxy address. +However, Next.js's compatibility is relatively poor, which can cause this error on older browsers. You can turn off chunk compilation during compilation. -## Can I deploy it on a server in China? +For the Vercel platform, add `DISABLE_CHUNK=1` to the environment variables and redeploy. +For self-compiled deployment projects, use `DISABLE_CHUNK=1 yarn build` to build during construction. +For Docker users, chunk compilation is completed during Docker packaging, so this feature is not supported for the time being. -It is possible but there are issues to be addressed: +Note: If you disable this feature, users will load all resources on the first visit to the website. If the user's network condition is poor, it may cause a long white screen, which will affect the user experience. Please consider this carefully. -- Proxy is required to connect to websites such as Github and OpenAI; -- Domain name resolution requires filing for servers in China; -- Chinese policy restricts proxy access to foreign websites/ChatGPT-related applications, which may be blocked. +## When using it, it prompts "NotFoundError: Failed to execute 'removeChild' on 'Node': The node...." +Please disable the browser's own automatic translation function and disable all automatic translation plugins. # Network Service Related Questions @@ -169,11 +176,6 @@ OpenAI only accepts credit cards from designated regions (Chinese credit cards c 2. Apply for a foreign credit card 3. Find someone online to top up -## How to access the GPT-4 API? - -(Updated April 6th) Access to the GPT-4 API requires a separate application. Go to the following address and enter your information to join the waitlist (prepare your OpenAI organization ID): https://openai.com/waitlist/gpt-4-api -Wait for email updates afterwards. - ## How to use the Azure OpenAI interface Please refer to: [#371](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/371) @@ -189,3 +191,9 @@ Please refer to: [#371](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/371) - By following these two methods, you can locate the reason for your token's rapid consumption: - If the OpenAI consumption record is abnormal but the Docker log has no issues, it means your API key has been leaked; - If the Docker log shows a large number of got access code brute-force attempts, your password has been cracked. +| Model | User input (Prompt) billing | Model output (Completion) billing | Maximum number of tokens per interaction | +|----|----|----|----| +| gpt-3.5-turbo | $0.0005 / 1k tokens | $0.0015 / 1k tokens | 16384 | +| gpt-4 | $0.030 / 1k tokens | $0.060 / 1k tokens | 8192 | +| gpt-4-turbo | $0.010 / 1k tokens | $0.030 / 1k tokens | 128000 | +| gpt-4o | $0.005 / 1k tokens | $0.015 / 1k tokens | 128000 | \ No newline at end of file diff --git a/docs/faq-es.md b/docs/faq-es.md index 11214a68661..1553122d157 100644 --- a/docs/faq-es.md +++ b/docs/faq-es.md @@ -7,7 +7,7 @@ # Problemas relacionados con la implementación -Referencia tutorial detallada para varios métodos de implementación: https://rptzik3toh.feishu.cn/docx/XtrdduHwXoSCGIxeFLlcEPsdn8b +Referencia tutorial detallada para varios métodos de implementación: [link](https://rptzik3toh.feishu.cn/docx/XtrdduHwXoSCGIxeFLlcEPsdn8b) ## ¿Por qué la versión de implementación de Docker sigue solicitando actualizaciones? @@ -33,7 +33,7 @@ La versión de Docker es equivalente a la versión estable, la última versión Esta es su contraseña de acceso personalizada, puede elegir: 1. Si no es así, elimine la variable de entorno. Precaución: Cualquier persona puede acceder a tu proyecto en este momento. -2. Cuando implemente el proyecto, establezca la variable de entorno CODE (admite varias comas de contraseña separadas). Después de establecer la contraseña de acceso, debe ingresar la contraseña de acceso en la interfaz de configuración antes de poder usarla. Ver[Instrucciones relacionadas](https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/README_CN.md#%E9%85%8D%E7%BD%AE%E9%A1%B5%E9%9D%A2%E8%AE%BF%E9%97%AE%E5%AF%86%E7%A0%81) +2. Cuando implemente el proyecto, establezca la variable de entorno CODE (admite varias comas de contraseña separadas). Después de establecer la contraseña de acceso, debe ingresar la contraseña de acceso en la interfaz de configuración antes de poder usarla. Ver[Instrucciones relacionadas](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/main/README.md#access-password) ## ¿Por qué la versión que implementé no transmite respuestas? @@ -41,13 +41,15 @@ Esta es su contraseña de acceso personalizada, puede elegir: Si utiliza el proxy inverso nginx, debe agregar el siguiente código al archivo de configuración: - # 不缓存,支持流式输出 - proxy_cache off; # 关闭缓存 - proxy_buffering off; # 关闭代理缓冲 - chunked_transfer_encoding on; # 开启分块传输编码 - tcp_nopush on; # 开启TCP NOPUSH选项,禁止Nagle算法 - tcp_nodelay on; # 开启TCP NODELAY选项,禁止延迟ACK算法 - keepalive_timeout 300; # 设定keep-alive超时时间为65秒 +``` +# Sin caché, soporte para salida en flujo +proxy_cache off; # Desactivar caché +proxy_buffering off; # Desactivar almacenamiento en búfer de proxy +chunked_transfer_encoding on; # Activar codificación de transferencia en bloques +tcp_nopush on; # Activar opción TCP NOPUSH, desactivar el algoritmo Nagle +tcp_nodelay on; # Activar opción TCP NODELAY, desactivar el algoritmo de ACK retardado +keepalive_timeout 300; # Establecer tiempo de espera de keep-alive en 300 segundos +``` Si está implementando en Netlify y este problema aún está pendiente de resolución, tenga paciencia. @@ -78,7 +80,7 @@ Sí, pero hay que resolverlo: ## ¿Por qué recibo un error de red después de la implementación de Docker? -Ver Discusión: https://github.com/Yidadaa/ChatGPT-Next-Web/issues/1569 para más detalles +Ver Discusión: [link](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/1569) para más detalles # Problemas relacionados con el uso @@ -93,15 +95,36 @@ Puede haber muchas razones, por favor solucione los problemas en orden: ## ¿Por qué la respuesta de ChatGPT es confusa? -Interfaz de configuración: uno de los elementos de configuración del modelo es `temperature`, si este valor es mayor que 1, entonces existe el riesgo de una respuesta confusa, simplemente vuelva a llamarlo a dentro de 1. +En la interfaz de configuración del modelo, hay una opción llamada `temperature`. Si este valor es mayor que 1, es posible que las respuestas sean confusas. Ajusta este valor a 1 o menos para evitarlo. -## Al usarlo, aparece "Ahora en un estado no autorizado, ingrese la contraseña de acceso en la pantalla de configuración"? +## Al usarlo, aparece "Ahora en un estado no autorizado, ingrese la contraseña de acceso en la pantalla de configuración" -El proyecto establece la contraseña de acceso a través de la variable de entorno CODE. Cuando lo use por primera vez, debe ingresar el código de acceso en la configuración para usarlo. +El proyecto requiere una contraseña de acceso configurada a través de la variable de entorno CODE. La primera vez que lo uses, debes ingresar este código en la configuración para poder utilizar la herramienta. -## Use el mensaje "Excedió su cuota actual, ..." +## Al usarlo, aparece "Excedió su cuota actual, ..." -Hay un problema con la API KEY. Saldo insuficiente. +Hay un problema con la API KEY, probablemente saldo insuficiente. + +## Al usarlo, aparece "Error: Loading CSS chunk xxx failed..." + +Para reducir el tiempo de carga inicial, se ha habilitado la compilación en bloques. Aquí tienes algunas referencias técnicas: + +- [Next.js Lazy Loading](https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) +- [Vercel Issue 38507](https://github.com/vercel/next.js/issues/38507) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) + +Sin embargo, la compatibilidad de Next.JS es limitada en navegadores antiguos, lo que puede causar este error. Puedes deshabilitar la compilación en bloques durante la compilación para evitar esto. + +Para la plataforma Vercel, agrega la variable de entorno `DISABLE_CHUNK=1` y vuelve a desplegar; +Para proyectos compilados y desplegados manualmente, usa `DISABLE_CHUNK=1 yarn build` durante la compilación; +Para usuarios de Docker, esta opción no es compatible ya que el empaquetado Docker incluye la compilación. + +Nota: Deshabilitar esta función cargará todos los recursos en el primer acceso, lo que puede causar tiempos de carga largos en conexiones lentas y afectar la experiencia del usuario, por lo que se debe considerar con cuidado. + +## Al usarlo, aparece "NotFoundError: Failed to execute 'removeChild' on 'Node': The node...." + +Desactiva la función de traducción automática del navegador y desactiva cualquier extensión de traducción automática. # Problemas relacionados con el servicio de red @@ -165,11 +188,6 @@ OpenAI solo acepta tarjetas de crédito en regiones seleccionadas (no se pueden 2. Solicitar una tarjeta de crédito extranjera 3. Encuentra a alguien para cobrar en línea -## ¿Cómo utilizo el acceso a la API de GPT-4? - -* El acceso a la API para GPT-4 requiere una solicitud independiente. Ingrese a la cola de la solicitud completando su información en la lista de espera (prepare su ID de organización OpenAI): https://openai.com/waitlist/gpt-4-api - Espere el mensaje de correo después. -* Habilitar ChatGPT Plus no significa permisos GPT-4, y los dos no tienen nada que ver entre sí. ## Uso de la interfaz de Azure OpenAI @@ -193,13 +211,7 @@ Instrucciones de facturación del sitio web de OpenAI: https://openai.com/pricin OpenAI cobra en función del número de tokens, y 1,000 tokens generalmente representan 750 palabras en inglés o 500 caracteres chinos. Prompt y Completion cuentan los costos por separado.\ |Modelo|Facturación de entrada de usuario (aviso)|Facturación de salida del modelo (finalización)|Número máximo de tokens por interacción| |----|----|----|----| -|gpt-3.5|$0.002 / 1 mil tokens|$0.002 / 1 mil tokens|4096| -|gpt-4|$0.03 / 1 mil tokens|$0.06 / 1 mil tokens|8192| -|gpt-4-32K|$0.06 / 1 mil tokens|$0.12 / 1 mil tokens|32768| - -## ¿Cuál es la diferencia entre los modelos GPT-3.5-TURBO y GPT3.5-TURBO-0301 (o GPT3.5-TURBO-MMDD)? - -Descripción de la documentación oficial: https://platform.openai.com/docs/models/gpt-3-5 - -* GPT-3.5-Turbo es el último modelo y se actualiza constantemente. -* GPT-3.5-turbo-0301 es una instantánea del modelo congelada el 1 de marzo, no cambiará y se espera que sea reemplazada por una nueva instantánea en 3 meses. +|gpt-3.5-turbo|$0.0005 / 1k tokens|$0.0015 / 1k tokens|16384| +|gpt-4|$0.030 / 1k tokens|$0.060 / 1k tokens|8192| +|gpt-4-turbo|$0.010 / 1k tokens|$0.030 / 1k tokens|128000| +|gpt-4o|$0.005 / 1k tokens|$0.015 / 1k tokens|128000| \ No newline at end of file diff --git a/docs/faq-ja.md b/docs/faq-ja.md index 8d50ffab7f0..3603982e7f6 100644 --- a/docs/faq-ja.md +++ b/docs/faq-ja.md @@ -1,191 +1,216 @@ # よくある質問 -## 早く助けを求めるには? +## すぐに助けを得るには? -1. ChatGPT / Bing / Baidu / Google などに尋ねてください。 -2. オンラインの友達に聞く。背景情報と問題の詳細な説明を提供してください。質の高い質問ほど、有益な回答を得られる可能性が高くなります。 +1. ChatGPT / Bing / 百度 / Google などで質問する。 +2. ネットユーザーに質問する。質問の背景情報と問題の詳細な説明を提供してください。質の高い質問は、役に立つ回答を得やすくなります。 -# デプロイメントに関する質問 +# デプロイ関連の問題 -## なぜ Docker のデプロイバージョンは常に更新を要求するのか +さまざまなデプロイ方法の詳細なチュートリアルについては、以下を参照してください。[link](https://rptzik3toh.feishu.cn/docx/XtrdduHwXoSCGIxeFLlcEPsdn8b) -Docker のバージョンは安定版と同等であり、最新の Docker は常に最新のリリースバージョンと一致しています。現在、私たちのリリース頻度は1~2日に1回なので、Dockerのバージョンは常に最新のコミットから1~2日遅れており、これは予想されることです。 +## Docker デプロイバージョンで常に更新を促されるのはなぜですか? -## Vercel での展開方法 +Docker バージョンは安定版に相当し、最新の Docker は常に最新のリリースバージョンと一致します。現在、リリース頻度は 1 ~ 2 日に 1 回であるため、Docker バージョンは常に最新のコミットから 1 ~ 2 日遅れます。これは想定の範囲内です。 -1. GitHub アカウントを登録し、このプロジェクトをフォークする。 -2. Vercel を登録し(携帯電話認証が必要、中国の番号でも可)、GitHub アカウントを接続する。 -3. Vercel で新規プロジェクトを作成し、GitHub でフォークしたプロジェクトを選択し、必要な環境変数を入力し、デプロイを開始する。デプロイ後、Vercel が提供するドメインからプロジェクトにアクセスできます。(中国本土ではプロキシが必要) +## Vercel にデプロイするにはどうすればよいですか? -- 中国で直接アクセスする必要がある場合: DNS プロバイダーで、cname.vercel-dns.com を指すドメイン名の CNAME レコードを追加します。その後、Vercel でドメインアクセスを設定してください。 +1. Github アカウントを登録し、このプロジェクトをフォークします +2. Vercel に登録し(携帯電話による確認が必要、中国の電話番号を使用できます)、Github アカウントに接続します +3. Vercel で新しいプロジェクトを作成し、Github でフォークしたプロジェクトを選択し、必要に応じて環境変数を入力して、デプロイを開始します。デプロイ後、プロキシを使用している場合は、vercel が提供するドメイン名を使用してプロジェクトにアクセスできます。 +4. 中国国内でプロキシなしでアクセスする必要がある場合:ドメイン管理 Web サイトで、cname.vercel-dns.com を指すドメインの CNAME レコードを追加します。その後、Vercel でドメインアクセスを設定します。 -## Vercel 環境変数の変更方法 +## Vercel 環境変数を変更するにはどうすればよいですか? -- Vercel のコンソールページに入ります; -- chatgpt-next-web プロジェクトを選択してください; -- ページ上部の設定オプションをクリックしてください; -- サイドバーで環境変数オプションを見つけます; -- 必要に応じて対応する値を変更してください。 +- vercel のダッシュボードページに移動します。 +- NextChat プロジェクトを選択します。 +- ページ上部の [設定] オプションをクリックします。 +- サイドバーの [環境変数] オプションを見つけます。 +- 対応する値を変更します。 -## 環境変数 CODE とは何ですか?設定する必要がありますか? +## 環境変数 CODE とは何ですか?設定は必須ですか? -カスタムアクセスパスワードです: +これは、カスタマイズされたアクセスコードです。次のいずれかを選択できます。 -1. 設定しないで、環境変数を削除する。この時、誰でもあなたのプロジェクトにアクセスすることができます。 -2. プロジェクトをデプロイするときに、環境変数 CODE を設定する(カンマ区切りで複数のパスワードをサポート)。アクセスパスワードを設定した後、ユーザーはそれを使用するために設定ページでアクセスパスワードを入力する必要があります。[関連手順](https://github.com/Yidadaa/ChatGPT-Next-Web#access-password) +1. 設定しない場合は、この環境変数を削除します。注意:この場合、誰でもプロジェクトにアクセスできます。 +2. プロジェクトのデプロイ時に、環境変数 CODE を設定します(複数のパスワードはカンマ区切りでサポート)。アクセスコードを設定すると、ユーザーは設定画面でアクセスコードを入力する必要があります。[関連する説明](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/main/README.md#access-password) を参照してください -## なぜ私がデプロイしたバージョンにはストリーミングレスポンスがないのでしょうか? +## デプロイしたバージョンでストリーミング応答がないのはなぜですか? -> 関連する議論: [#386](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/386) +> 関連する議論:[#386](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/386) -nginx のリバースプロキシを使っている場合、設定ファイルに以下のコードを追加する必要があります: +nginx リバースプロキシを使用している場合は、設定ファイルに次のコードを追加する必要があります。 ``` -# キャッシュなし、ストリーミング出力をサポート -proxy_cache off; # キャッシュをオフにする -proxy_buffering off; # プロキシバッファリングをオフにする -chunked_transfer_encoding on; # チャンク転送エンコーディングをオンにする -tcp_nopush on; # TCP NOPUSH オプションをオンにし、Nagleアルゴリズムを無効にする -tcp_nodelay on; # TCP NODELAY オプションをオンにし、遅延ACKアルゴリズムを無効にする -keepalive_timeout 300; # keep-alive のタイムアウトを 65 秒に設定する +# キャッシュなし、ストリーミング出力のサポート +proxy_cache off; # キャッシュを無効にする +proxy_buffering off; # プロキシバッファリングを無効にする +chunked_transfer_encoding on; # チャンク転送エンコーディングを有効にする +tcp_nopush on; # TCP NOPUSH オプションを有効にする、Nagle アルゴリズムを無効にする +tcp_nodelay on; # TCP NODELAY オプションを有効にする、遅延 ACK アルゴリズムを無効にする +keepalive_timeout 300; # キープアライブタイムアウトを 65 秒に設定する ``` -netlify でデプロイしている場合、この問題はまだ解決待ちです。 +netlify にデプロイしている場合、この問題は解決されるまでお待ちください。 -## デプロイしましたが、アクセスできません。 +## デプロイしましたが、アクセスできません -以下の問題を確認し、トラブルシューティングを行ってください: +次の問題がないか確認してください。 - サービスは開始されていますか? - ポートは正しくマッピングされていますか? -- ファイアウォールのポートは開いていますか? -- サーバーへのルートは問題ありませんか? -- ドメイン名は正しく解決されていますか? +- ファイアウォールでポートは開いていますか? +- サーバーへのルートは通っていますか? +- ドメインは正しく解決されていますか? -## "Error: Loading CSS chunk xxx failed..." と表示されることがあります。 +## プロキシとは何ですか?どのように使用しますか? -Next.js では、最初のホワイトスクリーンの時間を短縮するために、デフォルトでチャンキングを有効にしています。技術的な詳細はこちらをご覧ください: +OpenAI の IP 制限により、中国やその他の国/地域では OpenAI API に直接接続できません。プロキシを使用する必要があります。プロキシサーバー(フォワードプロキシ)、または設定済みの OpenAI API リバースプロキシを使用できます。 -- https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading -- https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4 -- https://github.com/vercel/next.js/issues/38507 -- https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4 +- フォワードプロキシの例:VPN。docker デプロイの場合、環境変数 HTTP_PROXY をプロキシアドレス(例:10.10.10.10:8002)に設定します。 +- リバースプロキシの例:他のユーザーが構築したプロキシアドレスを使用するか、Cloudflare を使用して無料で設定できます。プロジェクトの環境変数 BASE_URL をプロキシアドレスに設定します。 -ただし、Next.js は古いブラウザとの互換性に制限があるため、このエラーが発生することがあります。 +## 中国国内のサーバーにデプロイできますか? -ビルド時にチャンキングを無効にすることができます。 +できますが、解決する必要がある問題があります。 -Vercel プラットフォームの場合は、環境変数に `DISABLE_CHUNK=1` を追加して再デプロイします。 -セルフデプロイのプロジェクトでは、ビルド時に `DISABLE_CHUNK=1 yarn build` を使用することができます。 -Docker ユーザーの場合、ビルドはパッケージング時にすでに完了しているため、この機能を無効にすることは現在サポートされていません。 +- github や openAI などの Web サイトに接続するには、プロキシが必要です。 +- 中国国内のサーバーでドメイン解決を設定する場合は、备案が必要です。 +- 中国のポリシーでは、プロキシによる外部ネットワーク/ChatGPT 関連アプリケーションへのアクセスが制限されているため、ブロックされる可能性があります。 -この機能を無効にすると、ユーザーの最初の訪問時にすべてのリソースがロードされることに注意してください。その結果、ユーザーのネットワーク接続が悪い場合、ホワイト・スクリーンの時間が長くなり、ユーザーエクスペリエンスに影響を与える可能性があります。この点を考慮の上、ご判断ください。 +## docker デプロイ後にネットワークエラーが発生するのはなぜですか? -# 使用法に関する質問 +詳細については、次の議論を参照してください。[link](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/1569) -## なぜいつも "An error occurred, please try again later" と表示されるのですか? +# 使用関連の問題 -様々な原因が考えられますので、以下の項目を順番にチェックしてみてください: +## 「エラーが発生しました。後ほどもう一度お試しください」と表示され続けるのはなぜですか? -- まず、コードのバージョンが最新版かどうかを確認し、最新版にアップデートしてから再試行してください; -- api キーが正しく設定されているか確認してください。環境変数名は大文字とアンダースコアでなければなりません; -- api キーが使用可能かどうか確認する; -- 上記のステップを踏んでも問題が解決しない場合は、issue エリアに新しい issue を投稿し、vercel のランタイムログまたは docker のランタイムログを添付してください。 +原因はさまざま考えられます。次の順序で確認してください。 -## ChatGPT の返信が文字化けするのはなぜですか? +- コードのバージョンが最新であることを確認し、最新バージョンに更新して再試行してください。 +- API キーが正しく設定されていることを確認してください。環境変数名はすべて大文字とアンダースコアにする必要があります。 +- API キーが使用可能であることを確認してください。 +- 上記の手順を実行しても問題を特定できない場合は、issue 区で新しい issue を送信し、vercel のランタイムログまたは docker 実行時のログを添付してください。 -設定画面-機種設定の中に `temperature` という項目があります。この値が 1 より大きい場合、返信が文字化けすることがあります。1 以内に調整してください。 +## ChatGPT の応答が文字化けするのはなぜですか? -## 設定ページでアクセスパスワードを入力してください」と表示される。 +設定画面 - モデル設定項目に `temperature` という項目があります。この値が 1 より大きい場合、応答が文字化けする可能性があります。1 以内に調整してください。 -プロジェクトでは環境変数 CODE でアクセスパスワードを設定しています。初めて使うときは、設定ページでアクセスコードを入力する必要があります。 +## 使用時に「現在、未認証の状態です。設定ページでアクセスコードを入力してください」と表示されるのはなぜですか? -## 使用すると、"You exceeded your current quota, ..." と表示される。 +プロジェクトは、環境変数 CODE を使用してアクセスコードを設定しています。初めて使用する場合は、設定に移動してアクセスコードを入力する必要があります。 -API KEY に問題があります。残高不足です。 +## 使用時に「現在のクォータを超えました...」と表示されるのはなぜですか? -## プロキシとは何ですか? +API キーに問題があります。残高が不足しています。 -OpenAI の IP 制限により、中国をはじめとする一部の国や地域では、OpenAI API に直接接続することができず、プロキシを経由する必要があります。プロキシサーバ(フォワードプロキシ)を利用するか、事前に設定された OpenAI API リバースプロキシを利用します。 +## 使用時に「エラー:CSS チャンク xxx の読み込みに失敗しました...」というエラーが発生するのはなぜですか? -- フォワードプロキシの例: VPN ラダー。docker デプロイの場合は、環境変数 HTTP_PROXY にプロキシアドレス (http://address:port) を設定します。 -- リバースプロキシの例: 他人のプロキシアドレスを使うか、Cloudflare を通じて無料で設定できる。プロジェクトの環境変数 BASE_URL にプロキシアドレスを設定してください。 +最初の画面の白紙時間を短縮するために、デフォルトでチャンクコンパイルが有効になっています。技術的な原理については、以下を参照してください。 -## 中国のサーバーにデプロイできますか? +- [Next.js Lazy Loading](https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) +- [Vercel Issue 38507](https://github.com/vercel/next.js/issues/38507) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) -可能ですが、対処すべき問題があります: +ただし、Next.JS の互換性はあまり高くなく、古いブラウザではこのエラーが発生する可能性があります。コンパイル時にチャンクコンパイルを無効にできます。 -- GitHub や OpenAI などのウェブサイトに接続するにはプロキシが必要です; -- GitHub や OpenAI のようなウェブサイトに接続するにはプロキシが必要です; -- 中国の政策により、海外のウェブサイト/ChatGPT 関連アプリケーションへのプロキシアクセスが制限されており、ブロックされる可能性があります。 +Vercel プラットフォームの場合、環境変数に `DISABLE_CHUNK=1` を追加して、再デプロイします。 +自分でコンパイルしてデプロイするプロジェクトの場合、ビルド時に `DISABLE_CHUNK=1 yarn build` を使用してビルドします。 +Docker ユーザーの場合、Docker のパッケージ化時にビルドが完了しているため、この機能を無効にすることはできません。 -# ネットワークサービス関連の質問 +注意:この機能を無効にすると、ユーザーは Web サイトに初めてアクセスしたときにすべてのリソースを読み込むため、ユーザーのネットワーク状況が悪い場合は、長時間白紙が表示され、ユーザーエクスペリエンスに影響を与える可能性があります。 -## クラウドフレアとは何ですか? +## 使用時に「NotFoundError: 'removeChild' on 'Node': The node....」というエラーが発生するのはなぜですか? -Cloudflare(CF)は、CDN、ドメイン管理、静的ページホスティング、エッジコンピューティング機能展開などを提供するネットワークサービスプロバイダーです。一般的な使用例: メインの購入やホスティング(解決、ダイナミックドメインなど)、サーバーへの CDN の適用(ブロックされないように IP を隠すことができる)、ウェブサイト(CF Pages)の展開。CF はほとんどのサービスを無料で提供しています。 +ブラウザ自身の自動翻訳機能と、すべての自動翻訳プラグインを無効にしてください。 -## Vercel とは? +# ネットワークサービス関連の問題 -Vercel はグローバルなクラウドプラットフォームで、開発者がモダンなウェブアプリケーションをより迅速に構築、デプロイできるように設計されています。このプロジェクトや多くのウェブアプリケーションは、ワンクリックで Vercel 上に無料でデプロイできます。コードを理解する必要も、Linux を理解する必要も、サーバーを持つ必要も、お金を払う必要も、OpenAI API プロキシを設定する必要もありません。欠点は、中国の制限なしにアクセスするためにドメイン名をバインドする必要があることだ。 +## Cloudflare とは何ですか? -## ドメイン名の取得方法 +Cloudflare(CF)は、CDN、ドメイン管理、静的ページホスティング、エッジコンピューティング関数デプロイメントなどのネットワークサービスプロバイダーです。一般的な用途:ドメインの購入および/またはホスティング(解決、動的ドメインなど)、サーバーへの CDN の適用(IP を隠してブロックされるのを防ぐ)、Web サイトのデプロイ(CF Pages)。CF は、ほとんどのサービスを無料で提供しています。 -1. Namesilo(アリペイ対応)や Cloudflare(海外プロバイダー)、Wanwang(中国国内プロバイダー)などのドメインプロバイダーに登録する。 -2. 無料ドメインプロバイダー: eu.org(セカンドレベルドメイン)など。 -3. 無料セカンドレベルドメインを友人に頼む。 +## Vercel とは何ですか? -## サーバーの取得方法 +Vercel は、開発者が最新の Web アプリケーションをより迅速に構築およびデプロイできるように設計された、グローバルなクラウドプラットフォームです。このプロジェクトや多くの Web アプリケーションは、Vercel にワンクリックで無料でデプロイできます。コードの知識、linux の知識、サーバー、料金、OpenAI API プロキシの設定は必要ありません。欠点は、中国国内でプロキシなしでアクセスするには、ドメインをバインドする必要があることです。 -- 海外サーバープロバイダーの例 Amazon Web Services、Google Cloud、Vultr、Bandwagon、Hostdare など。 - 海外サーバーの注意点 サーバー回線は中国でのアクセス速度に影響するため、CN2 GIA、CN2 回線を推奨。もしサーバーが中国でアクセスしにくい場合(深刻なパケットロスなど)、CDN(Cloudflare のようなプロバイダーのもの)を使ってみるとよいでしょう。 -- 国内のサーバープロバイダー アリババクラウド、テンセントなど - 国内サーバーの注意点 ドメイン名の解決にはファイリングが必要。国内サーバーの帯域幅は比較的高い。海外のウェブサイト(GitHub、OpenAI など)へのアクセスにはプロキシが必要。 +## ドメインを取得するにはどうすればよいですか? -# OpenAI 関連の質問 +1. ドメインプロバイダーに登録します。海外には Namesilo(Alipay をサポート)、Cloudflare など、国内には万網などがあります。 +2. 無料のドメインプロバイダー:eu.org(サブドメイン)など。 +3. 友人から無料のサブドメインを要求します。 -## OpenAI のアカウントを登録するには? +## サーバーを取得するにはどうすればよいですか? -chat.openai.com にアクセスして登録してください。以下のものが必要です: +- 海外のサーバープロバイダーの例:Amazon Web Services、Google Cloud Platform、Vultr、Bandwagon、Hostdare など。 + 海外のサーバーに関する注意事項:サーバーの回線は、中国国内からのアクセス速度に影響します。CN2 GIA および CN2 回線のサーバーをお勧めします。サーバーへのアクセスが困難な場合(パケットロスが多いなど)、CDN(Cloudflare などのプロバイダー)を使用できます。 +- 中国国内のサーバープロバイダー:Alibaba Cloud、Tencent Cloud など。 + 中国国内のサーバーに関する注意事項:ドメインを解決するには备案が必要です。中国国内のサーバーの帯域幅は高価です。海外の Web サイト(Github、openAI など)にアクセスするには、プロキシが必要です。 -- 優れた VPN (OpenAI はサポートされている地域のネイティブ IP アドレスしか許可しません) -- サポートされているメール (例: Gmail や会社/学校のメール。Outlook や QQ のメールは不可) -- SMS 認証を受ける方法(SMS-activate ウェブサイトなど) +## どの場合にサーバーの备案が必要ですか? -## OpenAI API を有効にするには?API 残高の確認方法は? +中国本土で運営されている Web サイトは、規制要件に従って备案する必要があります。実際には、サーバーが中国国内にあり、ドメイン解決が設定されている場合、サーバープロバイダーは規制の备案要件を実行します。そうでない場合、サービスは停止されます。一般的なルールは次のとおりです。 +|サーバーの場所|ドメインプロバイダー|备案が必要ですか?| +|---|---|---| +|国内|国内|はい| +|国内|海外|はい| +|海外|海外|いいえ| +|海外|国内|通常はいいえ| -公式ウェブサイト(VPN が必要): https://platform.openai.com/account/usage -VPN なしで残高を確認するためにプロキシを設定しているユーザーもいます。API キーの漏洩を避けるため、信頼できる情報源であることを確認してください。 +サーバープロバイダーを変更した後、备案を移転する必要があります。 -## OpenAI の新規アカウントに API 残高がないのはなぜですか? +# OpenAI 関連の問題 -(4月6日更新) 新規登録アカウントは通常 24 時間以内に API 残高が表示されます。現在、新規アカウントには 5 ドルの残高が与えられています。 +## OpenAI アカウントを登録するにはどうすればよいですか? -## OpenAI API へのチャージ方法を教えてください。 +chat.openai.com にアクセスして登録します。次のものが必要です。 -OpenAI では、指定された地域のクレジットカードのみご利用いただけます(中国のクレジットカードはご利用いただけません)。お住まいの地域のクレジットカードに対応していない場合は、以下の方法があります: +- 優れたプロキシ(OpenAI は、サポートされている地域のネイティブ IP アドレスをサポートしています) +- サポートされているメールアドレス(Gmail や会社/学校のメールアドレスなど、Outlook や qq メールアドレスは不可) +- SMS 認証の方法(SMS-activate Web サイトなど) + +## OpenAI API を有効にするにはどうすればよいですか?API の残高を確認するにはどうすればよいですか? + +公式サイトのアドレス(プロキシが必要):[OpenAI Usage](https://platform.openai.com/account/usage) +一部のユーザーは、プロキシなしで残高を確認できるプロキシを構築しています。ユーザーに問い合わせてください。API キーの漏洩を防ぐため、情報源が信頼できるものであることを確認してください。 + +## 新しく登録した OpenAI アカウントに API の残高が表示されないのはなぜですか? + +(4 月 6 日更新)新しく登録されたアカウントには、通常 24 時間後に API の残高が表示されます。現在、新しく登録されたアカウントには 5 ドルの残高が付与されます。 + +## OpenAI API にチャージするにはどうすればよいですか? + +OpenAI は、指定された地域のクレジットカードのみを受け付けています(中国のクレジットカードは使用できません)。いくつかの方法の例: 1. Depay バーチャルクレジットカード -2. 海外のクレジットカードを申し込む -3. オンラインでトップアップしてくれる人を探す +2. 海外のクレジットカードの申請 +3. オンラインで代行業者を探す -## GPT-4 API にアクセスするには? +## Azure OpenAI インターフェースを使用するにはどうすればよいですか? -(4月6日更新) GPT-4 API へのアクセスには別途申請が必要です。以下のアドレスにアクセスし、ウェイティングリストに参加するための情報を入力してください(OpenAI の組織 ID をご用意ください): https://openai.com/waitlist/gpt-4-api -その後、メールの更新をお待ちください。 +以下を参照してください:[#371](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/371) -## Azure OpenAI インターフェースの使い方 +## トークンの消費が非常に速いのはなぜですか? -次を参照: [#371](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/371) +> 関連する議論:[#518](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/518) -## トークンの消費が速いのはなぜですか? +- GPT 4 の権限があり、日常的に GPT 4 api を使用している場合、GPT 4 の価格は GPT 3.5 の約 15 倍であるため、請求額が急増します。 +- GPT 3.5 を使用していて、使用頻度は高くないにもかかわらず、請求額が急速に増加している場合は、すぐに次の手順に従って調査してください。 + - openai の Web サイトにアクセスして、API キーの消費記録を確認します。トークンが 1 時間ごとに消費され、毎回 10,000 トークン以上消費されている場合は、キーが漏洩しています。すぐに削除して再生成してください。**信頼できない Web サイトで残高を確認しないでください。** + - パスワードが 5 文字以内の文字列など、非常に短い場合は、ブルートフォース攻撃のコストが非常に低くなります。docker のログレコードを検索して、誰かが大量のパスワードの組み合わせを試していないかどうかを確認することをお勧めします。キーワード:got access code +- 上記の 2 つの方法で、トークンが急速に消費されている理由を特定できます。 + - openai の消費記録に異常があるが、docker のログに問題がない場合は、API キーが漏洩しています。 + - docker のログに大量の「got access code」ブルートフォース攻撃の記録がある場合は、パスワードがブルートフォース攻撃されています。 -> 関連する議論: [#518](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/518) +## API はどのように課金されますか? -- GPT-4 にアクセスし、GPT-4 の API を定期的に使用している場合、GPT-4 の価格は GPT-3.5 の約 15 倍であるため、請求額が急激に増加します; -- GPT-3.5 を使用しており、頻繁に使用していないにもかかわらず、請求額が急速に増加している場合は、以下の手順で直ちにトラブルシューティングを行ってください: - - OpenAI のウェブサイトで API キーの消費記録を確認してください。トークンが 1 時間ごとに消費され、毎回数万トークンが消費される場合は、キーが流出している可能性があります。すぐに削除して再生成してください。**適当なサイトで残高を確認しないでください。** - - パスワードが 5 文字以下など短い場合、ブルートフォースによるコストは非常に低くなります。誰かが大量のパスワードの組み合わせを試したかどうかを確認するために、docker のログを検索することを推奨する。キーワード:アクセスコードの取得 -- これら 2 つの方法を実行することで、トークンが急速に消費された原因を突き止めることができます: - - OpenAI の消費記録に異常があるが、Docker ログに問題がない場合、API キーが流出したことを意味します; - - Docker ログにアクセスコード取得のブルートフォース試行回数が多い場合は、パスワードがクラックされています。 +OpenAI Web サイトの課金に関する説明:[OpenAI Pricing](https://openai.com/pricing#language-models) +OpenAI は、トークン数に基づいて課金します。1,000 トークンは、通常 750 語の英語または 500 文字の中国語に相当します。入力(プロンプト)と出力(完了)は、それぞれ個別に課金されます。 +|モデル|ユーザー入力(プロンプト)の課金|モデル出力(完了)の課金|1 回のインタラクションあたりの最大トークン数| +|----|----|----|----| +|gpt-3.5-turbo|$0.0005 / 1k tokens|$0.0015 / 1k tokens|16384| +|gpt-4|$0.030 / 1k tokens|$0.060 / 1k tokens|8192| +|gpt-4-turbo|$0.010 / 1k tokens|$0.030 / 1k tokens|128000| +|gpt-4o|$0.005 / 1k tokens|$0.015 / 1k tokens|128000| \ No newline at end of file diff --git a/docs/faq-ko.md b/docs/faq-ko.md index b0d28917f56..79649d84e8f 100644 --- a/docs/faq-ko.md +++ b/docs/faq-ko.md @@ -7,7 +7,7 @@ # 배포 관련 질문 -각종 배포 방법에 대한 자세한 튜토리얼 참조: [링크](https://rptzik3toh.feishu.cn/docx/XtrdduHwXoSCGIxeFLlcEPsdn8b) +각종 배포 방법에 대한 자세한 튜토리얼 참조: [link](https://rptzik3toh.feishu.cn/docx/XtrdduHwXoSCGIxeFLlcEPsdn8b) ## 왜 Docker 배포 버전이 계속 업데이트 알림을 주나요? @@ -33,7 +33,7 @@ Docker 버전은 사실상 안정된 버전과 같습니다. latest Docker는 이것은 당신이 사용자 정의한 접근 비밀번호입니다. 다음 중 하나를 선택할 수 있습니다: 1. 설정하지 않습니다. 해당 환경 변수를 삭제합니다. 주의: 이 경우 누구나 프로젝트에 접근할 수 있습니다. -2. 프로젝트를 배포할 때 환경 변수 CODE를 설정합니다(여러 비밀번호는 쉼표로 구분). 접근 비밀번호를 설정하면 사용자는 설정 페이지에서 접근 비밀번호를 입력해야만 사용할 수 있습니다. [관련 설명 참조](https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/README_CN.md#%E9%85%8D%E7%BD%AE%E9%A1%B5%E9%9D%A2%E8%AE%BF%E9%97%AE%E5%AF%86%E7%A0%81) +2. 프로젝트를 배포할 때 환경 변수 CODE를 설정합니다(여러 비밀번호는 쉼표로 구분). 접근 비밀번호를 설정하면 사용자는 설정 페이지에서 접근 비밀번호를 입력해야만 사용할 수 있습니다. [관련 설명 참조](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/main/README.md#access-password) ## 왜 내 배포 버전에 스트리밍 응답이 없나요? @@ -80,7 +80,7 @@ netlify에서 배포하는 경우, 이 문제는 아직 해결되지 않았습 ## 도커 배포 후 네트워크 오류가 발생하는 이유는 무엇인가요? -https://github.com/Yidadaa/ChatGPT-Next-Web/issues/1569 에서 토론을 참조하세요. +[link](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/1569) 에서 토론을 참조하세요. ## 사용 관련 문제 @@ -109,12 +109,12 @@ API 키에 문제가 있습니다. 잔액이 부족합니다. 첫 번째 화이트 스크린 시간을 줄이기 위해 청크 컴파일이 기본적으로 활성화되어 있으며, 기술 원칙은 아래를 참조하세요: -- https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading -- https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4 -- https://github.com/vercel/next.js/issues/38507 -- https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4 +- [Next.js Lazy Loading](https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) +- [Vercel Issue 38507](https://github.com/vercel/next.js/issues/38507) +- [Stack Overflow: Disable Chunk Code Splitting](https://stackoverflow.com/questions/55993890/how-can-i-disable-chunkcode-splitting-with-webpack4) -그러나 NextJS는 호환성이 좋지 않아 구형 브라우저에서 이 오류가 발생할 수 있으므로 컴파일 시 청크 컴파일을 비활성화할 수 있습니다. +그러나 Next.JS는 호환성이 좋지 않아 구형 브라우저에서 이 오류가 발생할 수 있으므로 컴파일 시 청크 컴파일을 비활성화할 수 있습니다. 버셀 플랫폼의 경우 환경 변수에 `DISABLE_CHUNK=1`을 추가하고 다시 배포합니다; 자체 컴파일 및 배포한 프로젝트의 경우, 빌드 시 `DISABLE_CHUNK=1 yarn build`를 사용하여 빌드합니다; @@ -187,12 +187,6 @@ OpenAI는 특정 지역의 신용카드만 사용할 수 있습니다(중국 신 2. 해외 신용카드 신청 3. 온라인에서 신용카드를 충전할 사람 찾기 -## GPT-4 API 액세스는 어떻게 사용하나요? - -- GPT-4 API 액세스는 별도의 신청이 필요합니다. 다음 주소로 이동하여 정보를 입력하여 신청 대기열 대기자 명단에 들어가세요(OpenAI 조직 ID를 준비하세요): https://openai.com/waitlist/gpt-4-api. - 그런 다음 이메일 메시지를 기다립니다. -- ChatGPT Plus를 사용하도록 설정했다고 해서 GPT-4 권한이 있는 것은 아니며, 서로 관련이 없습니다. - ## Azure OpenAI 인터페이스 사용 방법 참조: [#371](https://github.com/Yidadaa/ChatGPT-Next-Web/issues/371) @@ -217,14 +211,7 @@ OpenAI는 토큰 수에 따라 요금을 청구하며, 일반적으로 1000토 |모델|사용자 입력(프롬프트) 청구 |모델 출력(완료) 청구 |인터랙션당 최대 토큰 수 | |----|----|----|----| -|GPT-3.5-TURBO|$0.0015 / 1천 토큰|$0.002 / 1천 토큰|4096| -|GPT-3.5-TURBO-16K|$0.003 / 1천 토큰|$0.004 / 1천 토큰|16384| |GPT-4|$0.004 / 1천 토큰|16384 -|GPT-3.5-TURBO-16K|$0.003 / 1천 토큰|$0.004 / 1천 토큰|16384| |GPT-4|$0.03 / 1천 토큰|$0.06 / 1천 토큰|8192 -|GPT-4-32K|$0.06 / 1천 토큰|$0.12 / 1천 토큰|32768| - -## gpt-3.5-터보와 gpt3.5-터보-0301(또는 gpt3.5-터보-mmdd) 모델의 차이점은 무엇인가요? - -공식 문서 설명: https://platform.openai.com/docs/models/gpt-3-5 - -- GPT-3.5-TURBO는 최신 모델이며 지속적으로 업데이트될 예정입니다. -- gpt-3.5-turbo-0301은 3월 1일에 고정된 모델의 스냅샷으로, 변경되지 않으며 3개월 후에 새로운 스냅샷으로 대체될 예정입니다. \ No newline at end of file +|gpt-3.5-turbo|$0.0005 / 1k tokens|$0.0015 / 1k tokens|16384| +|gpt-4|$0.030 / 1k tokens|$0.060 / 1k tokens|8192| +|gpt-4-turbo|$0.010 / 1k tokens|$0.030 / 1k tokens|128000| +|gpt-4o|$0.005 / 1k tokens|$0.015 / 1k tokens|128000| \ No newline at end of file diff --git a/docs/vercel-en.md b/docs/vercel-en.md new file mode 100644 index 00000000000..d7f7a6d37c6 --- /dev/null +++ b/docs/vercel-en.md @@ -0,0 +1,48 @@ +## Vercel Usage Instructions + +## How to Create a New Project + +After you fork this project from Github, you need to create a new Vercel project to redeploy it. Please follow the steps below: + +![vercel-create-1](./images/vercel/vercel-create-1.jpg) + +1. Go to the Vercel dashboard. +2. Click "Add New". +3. Select "Project". + +![vercel-create-2](./images/vercel/vercel-create-2.jpg) + +1. In the "Import Git Repository" section, search for "chatgpt-next-web". +2. Select the newly forked project and click "Import". + +![vercel-create-3](./images/vercel/vercel-create-3.jpg) + +1. On the project configuration page, click "Environment Variables" to start configuring environment variables. +2. Add environment variables named "OPENAI_API_KEY" and "CODE" ([Access Password](https://github.com/Yidadaa/ChatGPT-Next-Web/blob/357296986609c14de10bf210871d30e2f67a8784/docs/faq-cn.md#%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F-code-%E6%98%AF%E4%BB%80%E4%B9%88%E5%BF%85%E9%A1%BB%E8%AE%BE%E7%BD%AE%E5%90%97)) respectively. +3. Fill in the corresponding values for the environment variables. +4. Click "Add" to confirm adding the environment variables. +5. Make sure you have added the "OPENAI_API_KEY". Otherwise, it will not work. +6. Click "Deploy", the creation is complete, please wait patiently for about 5 minutes for the deployment to complete. + +## How to Add a Custom Domain + +[TODO] + +## How to Change Environment Variables + +![vercel-env-edit](./images/vercel/vercel-env-edit.jpg) + +1. Go to the Vercel project dashboard and click the "Settings" button at the top. +2. Click "Environment Variables" on the left. +3. Click the button to the right of the existing entry. +4. Select "Edit" to edit, and then save. + +⚠️ Note: Every time you modify the environment variables, you need to [redeploy the project](#how-to-redeploy) for the changes to take effect! + +## How to Redeploy + +![vercel-redeploy](./images/vercel/vercel-redeploy.jpg) + +1. Go to the Vercel project dashboard and click the "Deployments" button at the top. +2. Select the button to the right of the top item in the list. +3. Click "Redeploy" to redeploy. \ No newline at end of file