NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

XAI AP KEYI变量

Open XXXLPROMAX opened this issue 2 years ago • 19 comments

🥰 需求描述

我想要将自己的XAI的API保存到网页中

🧐 解决方案

我应该使用什么方式,或者修改什么变量,才能实现将自己的XAI API KEY固定到网页中

📝 补充信息

No response

XXXLPROMAX avatar Nov 19 '24 07:11 XXXLPROMAX

Bot detected the issue body's language is not English, translate it automatically.


Title: XAI AP KEYI variable

🥰 Description of requirements

I want to save my own XAI API to the web page

🧐 Solution

What method should I use, or what variables should I modify, to fix my XAI API KEY into the web page?

📝 Supplementary information

No response

Issues-translate-bot avatar Nov 19 '24 07:11 Issues-translate-bot

settings页面配置之后,应该就会保存在本地存储里面

lloydzhou avatar Nov 19 '24 08:11 lloydzhou

Bot detected the issue body's language is not English, translate it automatically.


After the settings page is configured, it should be saved in local storage.

Issues-translate-bot avatar Nov 19 '24 08:11 Issues-translate-bot

I want to save this API on the webpage so that I can use it on other new devices later.

XXXLPROMAX avatar Nov 20 '24 11:11 XXXLPROMAX

我也想知道怎么部署XAI,毕竟现在有免费的额度

Perdixky avatar Nov 20 '24 13:11 Perdixky

Bot detected the issue body's language is not English, translate it automatically.


I also want to know how to deploy XAI. After all, there is a free quota now.

Issues-translate-bot avatar Nov 20 '24 13:11 Issues-translate-bot

怎么样把xai的key放在环境变量里?是否GROK_API_KEY? 还是?

ghost avatar Nov 22 '24 06:11 ghost

Bot detected the issue body's language is not English, translate it automatically.


How to put the xai key in the environment variable? Is it GROK_API_KEY? Or?

Issues-translate-bot avatar Nov 22 '24 06:11 Issues-translate-bot

new ENV XAI_API_KEY https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/3932c594c71a4d52968c5bd19ab75cba2197ea76/app/config/server.ts#L76

SHIJS1999 avatar Nov 22 '24 15:11 SHIJS1999

Bot detected the issue body's language is not English, translate it automatically.


new ENV XAI_API_KEY https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/3932c594c71a4d52968c5bd19ab75cba2197ea76/app/config/server.ts#L76

Issues-translate-bot avatar Nov 22 '24 15:11 Issues-translate-bot

我在docker中部署好了,环境变量除了默认的以外,还额外增加了你提到的【XAI_API_KEY】的变量,但是每次通过网页访问应用的时候,还是需要手动启动【custom endpoint】,因为这个选项默认不启用的,我设置了环境变量也没生效。这个custom endpoint的参数可以在环境变量中设置为默认开启么?

robinzc2008 avatar Dec 16 '24 22:12 robinzc2008

Bot detected the issue body's language is not English, translate it automatically.


I have deployed it in docker. In addition to the default environment variables, I also added the [XAI_API_KEY] variable you mentioned. However, every time you access the application through the web page, you still need to manually start the [custom endpoint] because of this The option is not enabled by default, and even if I set the environment variable, it does not take effect. Can the parameters of this custom endpoint be set to be enabled by default in the environment variable?

Issues-translate-bot avatar Dec 16 '24 22:12 Issues-translate-bot

我的docker环境变量里填写了DEEPSEEK_API_KEY和XAI_API_KEY也没生效。没有填写两个URL,模型里填写了+grok-beta@xAI,+grok-vision-beta@xAI,+grok-2-vision-1212@xAI,+grok-2-vision@xAI,+grok-2-vision-latest@xAI,+grok-2-1212@xAI,+grok-2@xAI,+grok-2-latest@xAI,+deepseek-reasoner@DeepSeek,+deepseek-chat@DeepSeek。

clusflah avatar Jan 25 '25 03:01 clusflah

Bot detected the issue body's language is not English, translate it automatically.


I filled out the deepseek_api_key and xai_api_key in my Docker environment variable. I did not fill in two URLs, and filled in in the model+Grok-Beta@xai,+Grok-Vision-Beta@xai,+Grok-2-Vision-1212@xai,+Grok-2-Vision@xai,+Grok-2 -vision-latest@xAI,+grok-2-1212@xAI,+grok-2@xAI,+grok-2-latest@xAI,+deepseek-reasoner@DeepSeek,+deepseek-chat@DeepSeek。

Issues-translate-bot avatar Jan 25 '25 03:01 Issues-translate-bot

docker 版本配置 XAI_URL 和 XAI_API_KEY,模型 +grok-2 等测试成功。

kitaev-chen avatar Feb 28 '25 06:02 kitaev-chen

Bot detected the issue body's language is not English, translate it automatically.


The docker version configuration XAI_URL and XAI_API_KEY, model +grok-2 and other tests were successful.

Issues-translate-bot avatar Feb 28 '25 06:02 Issues-translate-bot

不知道为什么readme里没有写x-ai-api

vandermondeDET avatar Jan 24 '26 15:01 vandermondeDET

Bot detected the issue body's language is not English, translate it automatically.


I don’t know why x-ai-api is not written in the readme.

Issues-translate-bot avatar Jan 24 '26 15:01 Issues-translate-bot

i find that local development has no problem with XAI api, while in vercel it can only take effect after several minutes. it may be assiociated with CDN, which takes time.

vandermondeDET avatar Jan 24 '26 20:01 vandermondeDET