869413421 / chatgpt-web Goto Github PK
View Code? Open in Web Editor NEW基于ChatGPT3.5 API实现的私有化web程序
License: Apache License 2.0
基于ChatGPT3.5 API实现的私有化web程序
License: Apache License 2.0
我的win10,下载的[chatgpt-web-v0.0.4-windows-amd64.zip]按照说明进行了配置,结果双击exe后弹出如下提示
[WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
如题:docker使用user 和password配置后好像没有效果。我使用了您提供的两种docker部署方式,但是均无效。我的无效是指,没有任何地方让我来输入使用的账号或密码。谢谢
Request a login screen to make it more secure when accessing remotely
如题
"Post "https://api.openai.com/v1/chat/completions\": dial tcp 157.240.8.50:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."
国内IP挨墙了?
内网是正常,
映射到外网,网页空白
由于部署到vps,希望增加一个密码验证功能,🙏。
最新window版,点进页面后空白
目前程序默认监听所有地址,在某些需要使用NGINX等软件套SSL等情况下监听所有地址不太安全,建议配置文件添加选项 listen 设定程序监听地址,默认监听 0.0.0.0
,用户可以自行更改为例如 127.0.0.1
这样的地址
看日志文件:root@Debian:~# docker logs chatgpt-web --follow
2023-03-06 04:51:54,916 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2023-03-06 04:51:54,918 INFO supervisord started with pid 1
2023-03-06 04:51:55,921 INFO spawned: 'chatgpt-web' with pid 6
2023-03-06 04:51:56,933 INFO success: chatgpt-web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
docker run -itd --name chatgpt-web --restart=always \
-e APIKEY= api \
-e MODEL=gpt-3.5-turbo-0301 \
-e BOT_DESC=你是一个AI助手,我需要你模拟一名温柔贴心的女朋友来回答我的问题. \
-e MAX_TOKENS=512 \
-e TEMPREATURE=0.9 \
-e TOP_P=1 \
-e FREQ=0.0 \
-e PRES=0.6 \
-p 8081:8081 \
qingshui869413421/chatgpt-web:latest
端口号冲突了,所以改了。
帮忙看看是什么问题啊
项目 https://github.com/dirk1983/chatgpt 中提供了自定义openai接口地址的功能
建议在配置文件中添加类似于 api_endpoint 选项,默认使用 https://api.openai.com/v1/chat/completions ,用户可以自定义该选项,便于使用相关代理。
#替换your api key和your ing domian即可
`apiVersion: apps/v1
kind: Deployment
metadata:
name: chatgpt-web
labels:
app: chatgpt-web
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: chatgpt-web
template:
metadata:
name: chatgpt-web
labels:
app: chatgpt-web
spec:
containers:
- name: chatgpt-web
image: qingshui869413421/chatgpt-web:latest
ports:
- containerPort: 8080
env:
- name: APIKEY
value: your api key
apiVersion: v1
kind: Service
metadata:
name: chatgpt-web
namespace: default
spec:
selector:
app: chatgpt-web
ports:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: chatgpt-web
namespace: default
spec:
rules:
非常感谢作者,这个项目,一下子让操作方便多了。
我是小白,只会依照步骤操作,有点疑问,想请教一下大家。
如果设定了语法标准英语类角色,是不是在其他方面的回答就会弱一点?有些专业领域的问题是不是需要来回切换一下角色?
一般性事务的话,是不是基本不用专门调整参数了吧?默认即可解决大多数情况了。
两个疑惑,
1、后期有时间会在清空对话旁边有简易的ai 切换 比如: 软件工程师,修改润色,问题回答,之类的按钮切换?
2、Windows的这个dos窗口能否后台运行,不在任务栏出现。
非常感谢。
好的,那么您可以将示例代码中的模板文件名更改为index.html,并更新内容,以添加密码登录表单。以下是您可以使用的index.html文件示例,您可以将其替换为现有的index.html文件:
<title>AI Chatbot</title> {{if .PasswordIncorrect}}Password incorrect, try again.
{{end}} Password: Submit注意,这个模板文件使用了Go模板语言,它允许您在HTML中嵌入动态内容。模板使用{{if .PasswordIncorrect}}语句来检查是否有密码不正确的错误,并显示相应的消息。密码输入框使用HTML表单的标准方式添加。
然后,将以下更改应用于main.go文件:
package main
import (
"html/template"
"net/http"
)
const password = "mySecretPassword"
var tpl = template.Must(template.ParseFiles("index.html"))
type ViewData struct {
PasswordIncorrect bool
}
func indexHandler(w http.ResponseWriter, r *http.Request) {
if r.Method == "POST" {
// 获取密码并检查是否正确
r.ParseForm()
if r.Form.Get("password") == password {
// 密码正确,渲染页面
tpl.Execute(w, ViewData{false})
return
} else {
// 密码不正确,渲染登录表单
tpl.Execute(w, ViewData{true})
return
}
}
// 尚未提交密码,渲染登录表单
tpl.Execute(w, ViewData{false})
}
func main() {
http.HandleFunc("/", indexHandler)
http.ListenAndServe(":8080", nil)
}
在这里,我们为模板文件定义了一个名为ViewData的结构体类型,该结构体可以传递用于HTML模板的变量。我们修改了indexHandler函数,以使用ViewData{false}或ViewData{true}作为模板数据来渲染index.html,表明密码是否不正确或者需要输入密码。
最后,请注意,我们使用了一个常量来存储密码,这不是最安全的方式。在实际的Web应用程序中,应该使用一些安全的方法来存储和管理密码,例如使用密码哈希和盐值,或者将密码存储在安全的数据库中并使用加密传输。
突然就请求错误,error,status code:500了,上两天还是可以用的
安装在vps上,不需要代理要怎么设置呢?
测试了删除代理那一行,但是没有用。
我用的是最新的0.0.7.
更换过新生成的key也是一样的。
但是用curl试试是没有问题的
curl https://api.openai.com/v1/chat/completions \
-H "Authorization: Bearer sk-xxxxxxxx"
-H "Content-Type: application/json"
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "What is your name?"}]
}'
可以在web加一个basic认证来提高安全性吗
需要自己创建反代吗?如果需要的话,如何填入反代呢?
非常好支持
docker pull qingshui869413421/chatgpt-web后提示
mediaType in manifest should be 'application/vnd.docker.distribution.manifest.v2+json' not 'application/vnd.oci.image.manifest.v1+json'
虽然GO能运行,但是还是习惯用DOCKER,咋办?
An error occurred in the request,Post "https://api.openai.com/v1/chat/completions": proxyconnect tcp: dial tcp 127.0.0.1:10809: connectex: No connection could be made because the target machine actively refused it.
如题
docker部署镜像在哪里
The password was configured as required and the program failed to start
1、支持保存以前的对话(类chatGPT交互)
2、管理员查看记录
3、增加登录逻辑
4、可以改欢迎词
我知道已经被墙了,但是我挂了代理也没用,是不能用clash吗
由于作者非专业前端,前端能力实在有限,希望有积极的前端开发者来帮我实现以下功能:
除了第一点,简单来说抄一下官网功能。目前前端代码在 chat-new 目录下,基于react实现。
网页在手机上面不能自适应,看看能不能兼容自适应下
环境:
https://github.com/869413421/chatgpt-web#%E4%BD%BF%E7%94%A8docker%E8%BF%90%E8%A1%8C 第二种方式启动
{
"api_key": "sk-uxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"port": 8080,
"bot_desc": "以下是与AI助手的对话。助手乐于助人,富有创造力,聪明且非常友好",
"model": "gpt-3.5-turbo-0301",
"max_tokens": 512,
"temperature": 0.8,
"top_p": 1,
"frequency_penalty": 0.0,
"presence_penalty": 0.6
}
有时候需要chatgpt切换不同的设定,而这需要重新修改配置文件,能否做一个快速切换功能,可以在已经设置好的设定中快速切换,方便使用
问了很多问题得到都是类似于国产智能助手的那种比较僵化的回答,跟网页版体验完全不一样,不知道这是为什么,人机参数都是按照官网设置的
我是使用您的dokcer版,提问最近世界的大赛,它的回答是2021年,而我其他基于3.0的模型,回答则是2023年的
如题,会不会被调试抓出来。。。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.