XAI AP KEYI变量
🥰 需求描述
我想要将自己的XAI的API保存到网页中
🧐 解决方案
我应该使用什么方式,或者修改什么变量,才能实现将自己的XAI API KEY固定到网页中
📝 补充信息
No response
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
settings页面配置之后,应该就会保存在本地存储里面
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.
I want to save this API on the webpage so that I can use it on other new devices later.
我也想知道怎么部署XAI,毕竟现在有免费的额度
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.
怎么样把xai的key放在环境变量里?是否GROK_API_KEY? 还是?
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?
new ENV XAI_API_KEY https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/3932c594c71a4d52968c5bd19ab75cba2197ea76/app/config/server.ts#L76
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
我在docker中部署好了,环境变量除了默认的以外,还额外增加了你提到的【XAI_API_KEY】的变量,但是每次通过网页访问应用的时候,还是需要手动启动【custom endpoint】,因为这个选项默认不启用的,我设置了环境变量也没生效。这个custom endpoint的参数可以在环境变量中设置为默认开启么?
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?
我的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。
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。
docker 版本配置 XAI_URL 和 XAI_API_KEY,模型 +grok-2 等测试成功。
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.
不知道为什么readme里没有写x-ai-api
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.
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.