Coder Social home page Coder Social logo

mic1on / chatgpt-web Goto Github PK

View Code? Open in Web Editor NEW
700.0 6.0 262.0 155 KB

chatGPT私有化部署

Home Page: https://code05.com/posts/other/opensource/chatgpt-web.html

Dockerfile 1.98% Python 25.40% Shell 0.28% HTML 1.66% Vue 48.17% TypeScript 18.84% CSS 3.68%
chatgpt chatgpt-api fastapi python vue3

chatgpt-web's Introduction

❤Hi 👋 I'm MicLon!❤


chatgpt-web's People

Contributors

coconutwwater avatar mic1on avatar nowanti avatar xyb avatar

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

chatgpt-web's Issues

支持移动端

1:移动端header布局乱了
2:输入框发送后光标还停留在最后一行

小白问题:免费账号赠送一点额度吧?

刚刚新注册了个chatgpt号码,在官网发了一个问题,有回答。然后开了个API key,用docker加api直接运行在vps中,可以用网页访问了,但余额是0,问问题,提示:You exceeded your current quota, please check your plan and billing details.
应该有一些免费额度吧。我哪里理解错了?

arm64的架构下运行,会报“exec /bin/bash: exec format error”

挺好的项目,写得很简单。amd64下面运行ok,但是arm64的架构下运行,报“exec /bin/bash: exec format error”。
使用“docker image inspect XXX”检查,确认了拉到的image确实是arm64版本的:"Architecture": "arm64"。
看了下Dockerfile,猜测是不是用的“/miclon/py-nodejs:latest”这个原始镜像只支持amd64?
FROM registry.cn-hangzhou.aliyuncs.com/miclon/py-nodejs:latest
另外,在DockerHub上也搜不到“/miclon/py-nodejs:latest”这个镜像,github上也没看到原始的项目。这个方便共享么?

apikey余额

请问一下关于apikey的余额是和什么挂钩啊,如果里面初始值是18,用完需要充值吗

本地部署的问题 没有dist文件夹啊

你好 ,这个项目非常棒,感谢大佬开源分享。
我想本地搭建一下服务,并做一些修改,比如增加自定义system prompt,temperature,增加socks代理等。
但是这一步就没法继续下去了,
cp -r web/dist api/dist
web下面没有dist文件夹。
直接run的话会提示以下错误
chatGPT-web\api\dist\assets' does not exist 求教

建议:api.py增加对http_proxy的代理判断。

我在做公网IP测试访问时,因为没有域名,而https证书是和域名进行绑定的,直接使用https+ip地址证书就会校验失败,所以无法通过https+ip地址访问后台服务。就算开了代理,或proxychain这种终端全局代理,也是无济于事。

#17 的问题呢,可以用 httping 工具做测试,看看代理是否生效,再综合分析原因,校对故障。

API_KEY = os.environ.get('API_KEY')
if proxy := os.environ.get('HTTPS_PROXY'):
PROXIES = {"https://": proxy}

以上都是我个人的理解啦,如有不对,还请作者及大家共同指正。

issue

可以考虑用replicate加入文生图功能哟

app.py

root@22-9-10-:~/chatGPT-web/api# python app.py
File "app.py", line 32
async def root():
^
SyntaxError: invalid syntax
root@22-9-10-
:~/chatGPT-web/api#

32行无效语法咋处理?

docker镜像不支持
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.

问下能否增加账号、密码认证登陆功能

我在家里路由器上用docker搭建了这个chatgpt-web,很好用,但我想开放到公网上随时随地用,但又担心没账号、密码认证会被人滥用,所以我目前的策略是在外时,用VPN连回家,然后再打开chatgpt-web,但这样毕竟比较麻烦。所以想问下能否增加账号、密码认证的功能,如果未来不同的账号能对应不同的历史记录就更好了。

提到chatgpt-web历史记录,我发现历史记录只存在于各个浏览器中,比如我的手机、电脑的历史记录就完全不同,这个不能同步统一么?

香港服务器已阵亡(api域名被墙)

[root@cvm-3jg255i28a225 ~]# ping api.openai.com
PING api.openai.com (52.152.96.252) 56(84) bytes of data.

直接ping不出来,咋办哦?
大佬弄个反代教程吧,自己有节点。

公众号搭建chatGPT,5s内回复

公众号搭建chatGPT,请问怎么解决5s内回复不了,出现“该公众号提供的服务出现故障,请稍后再试”的问题

增加模型选择

1.增加模型选择,官方开放的能力没有得到全部体现
2.实现ChatGPTUnofficialProxyAPI模式 ,不仅限于官方的开放的功能,体验所有的功能

为什么在Docker中添加了环境变量 API_KEY=xxxx 并没有生效?

根据项目中要求使用Docker命令-e API_KEY=xxxx添加密钥环境变量以后运行,发现API_KEY并没有生效,后台log日志如下:

ChatGPT  | ValueError: API key is required
ChatGPT  | INFO:     192.168.80.100:34574 - "GET / HTTP/1.1" 200 OK
ChatGPT  | INFO:     192.168.80.100:34574 - "GET /credit_summary HTTP/1.1" 500 Internal Server Error
ChatGPT  | ERROR:    Exception in ASGI application
ChatGPT  | Traceback (most recent call last):
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
ChatGPT  |     result = await app(  # type: ignore[func-returns-value]
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
ChatGPT  |     return await self.app(scope, receive, send)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 271, in __call__
ChatGPT  |     await super().__call__(scope, receive, send)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 125, in __call__
ChatGPT  |     await self.middleware_stack(scope, receive, send)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 184, in __call__
ChatGPT  |     raise exc
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 162, in __call__
ChatGPT  |     await self.app(scope, receive, _send)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/starlette/middleware/cors.py", line 84, in __call__
ChatGPT  |     await self.app(scope, receive, send)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
ChatGPT  |     raise exc
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
ChatGPT  |     await self.app(scope, receive, sender)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
ChatGPT  |     raise e
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
ChatGPT  |     await self.app(scope, receive, send)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 706, in __call__
ChatGPT  |     await route.handle(scope, receive, send)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 276, in handle
ChatGPT  |     await self.app(scope, receive, send)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 66, in app
ChatGPT  |     response = await func(request)
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 237, in app
ChatGPT  |     raw_response = await run_endpoint_function(
ChatGPT  |   File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
ChatGPT  |     return await dependant.call(**values)
ChatGPT  |   File "/app/api/app.py", line 46, in credit_summary
ChatGPT  |     res = await api.credit_summary(api_key=api_key)
ChatGPT  |   File "/app/api/api.py", line 12, in wrapper
ChatGPT  |     raise ValueError('API key is required')
ChatGPT  | ValueError: API key is required

这里附上我的Docker-Compose.yml文件:

version: "3.8"
services:
  chatgpt:
    image: miclon/chatgpt:latest
    container_name: ChatGPT
    environment:
      - API_KEY=xxxxxx  
    ports:
      - 8000:8000
    restart: always

收费问题

请问官方接口需要收费吗?
右上角的余额是什么意思呢

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.