Giter Club home page Giter Club logo

chatgpt-web's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatgpt-web's Issues

docker使用user 和password配置后好像没有效果

如题:docker使用user 和password配置后好像没有效果。我使用了您提供的两种docker部署方式,但是均无效。我的无效是指,没有任何地方让我来输入使用的账号或密码。谢谢

被墙了?

"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挨墙了?

建议可以自定义监听地址

目前程序默认监听所有地址,在某些需要使用NGINX等软件套SSL等情况下监听所有地址不太安全,建议配置文件添加选项 listen 设定程序监听地址,默认监听 0.0.0.0 ,用户可以自行更改为例如 127.0.0.1 这样的地址

VPS 上docker 运行, http://vps地址:8081 没有反应

看日志文件: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

端口号冲突了,所以改了。

帮忙看看是什么问题啊

贡献一个k8s部署方式

#替换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:

  • name: http
    protocol: TCP
    port: 8080
    targetPort: 8080

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: chatgpt-web
namespace: default
spec:
rules:

  • host: your ing domian
    http:
    paths:
    • path: /
      backend:
      serviceName: chatgpt-web
      servicePort: http`

"bot-desc"参数设定的问题

非常感谢作者,这个项目,一下子让操作方便多了。
我是小白,只会依照步骤操作,有点疑问,想请教一下大家。
如果设定了语法标准英语类角色,是不是在其他方面的回答就会弱一点?有些专业领域的问题是不是需要来回切换一下角色?
一般性事务的话,是不是基本不用专门调整参数了吧?默认即可解决大多数情况了。
两个疑惑,
1、后期有时间会在清空对话旁边有简易的ai 切换 比如: 软件工程师,修改润色,问题回答,之类的按钮切换?
2、Windows的这个dos窗口能否后台运行,不在任务栏出现。
非常感谢。

请教一下能不能加一个简单的密码登录

因为要放在服务器上,所以想加一个简单的登录防止其他人使用。我对go语言不熟,chatGPT给出的例子我也不知道如何整合进去。
以下是他的回答

好的,那么您可以将示例代码中的模板文件名更改为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应用程序中,应该使用一些安全的方法来存储和管理密码,例如使用密码哈希和盐值,或者将密码存储在安全的数据库中并使用加密传输。

401: incorrected api key

image
我用的是最新的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?"}]
}'

docker pull出错

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,咋办?

提几个建议

1、支持保存以前的对话(类chatGPT交互)
2、管理员查看记录
3、增加登录逻辑
4、可以改欢迎词

一直加载

我知道已经被墙了,但是我挂了代理也没用,是不能用clash吗

希望有积极的前端开发者来帮我实现以下功能

由于作者非专业前端,前端能力实在有限,希望有积极的前端开发者来帮我实现以下功能:

  • feat: 增加AI性格设定界面
  • feat: 增加登录认证界面
  • feat: 对话交互增加流式响应
  • feat: 增加对话历史列表,查看历史对话功能
  • perf: 优化markdown代码格式,增加代码复制功能

除了第一点,简单来说抄一下官网功能。目前前端代码在 chat-new 目录下,基于react实现。

返回 “请求出错,undefined”

环境:

  1. 拉取的 docker hub 下的later版本
  2. 服务器是美国的
  3. 启动命令参考自

https://github.com/869413421/chatgpt-web#%E4%BD%BF%E7%94%A8docker%E8%BF%90%E8%A1%8C 第二种方式启动

  1. 配置如下:
{
  "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
}

报错如下:
image

改进意见

有时候需要chatgpt切换不同的设定,而这需要重新修改配置文件,能否做一个快速切换功能,可以在已经设置好的设定中快速切换,方便使用

感觉不像是chatgpt在回答问题

问了很多问题得到都是类似于国产智能助手的那种比较僵化的回答,跟网页版体验完全不一样,不知道这是为什么,人机参数都是按照官网设置的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.