zmh-program / chatnio

🚀 Next Generation AI One-Stop Internationalization Solution. 🚀 下一代 AI 一站式 B/C 端解决方案,支持 OpenAI,Midjourney,Claude,讯飞星火,Stable Diffusion,DALL·E,ChatGLM,通义千问,腾讯混元,360 智脑,百川 AI,火山方舟,新必应,Gemini,Moonshot 等模型,支持对话分享,自定义预设,云端同步,模型市场,支持弹性计费和订阅计划模式,支持图片解析,支持联网搜索,支持模型缓存,丰富美观的后台管理与仪表盘数据统计。
https://chatnio.com
Apache License 2.0
3.61k stars 539 forks source link

文件解析失败 #178

Closed SHLE1 closed 6 months ago

SHLE1 commented 6 months ago

问题:请问自行搭建的chatnio在上传文件时为什么会出现“解析失败: Network Error“的提示?

配置

  1. Chatnio部署时未修改配置,使用watchtower版docker-compose
  2. Chatnio Nginx

    server {
    server_name my.domain.com;
    client_max_body_size 100M; # 允许最大100MB的请求体
    
    location / {
        proxy_pass http://localhost:8000;
        proxy_set_header Host $host;   
        proxy_set_header X-Real-IP $remote_addr;   
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;   
        proxy_set_header REMOTE-HOST $remote_addr;   
        proxy_set_header Upgrade $http_upgrade;   
        proxy_set_header Connection "upgrade";   
        proxy_http_version 1.1;   
        add_header Cache-Control no-cache;   
        proxy_cache off;  # 关闭缓存  
        proxy_buffering off;  # 关闭代理缓冲  
        chunked_transfer_encoding on;  # 开启分块传输编码  
        tcp_nopush on;  # 开启TCP NOPUSH选项,禁止Nagle算法  
        tcp_nodelay on;  # 开启TCP NODELAY选项,禁止延迟ACK算法  
        keepalive_timeout 300;  # 设定keep-alive超时时间为65秒
    }
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/chat.aigoo.xyz/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/chat.aigoo.xyz/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    }
  3. blob服务运行指令
    docker run -p 8001:8000 --name blob -d --restart always -v /etc/blob/static:/static -e STORAGE_TYPE=local -e LOCAL_STORAGE_DOMAIN=http://blob.aapl.top programzmh/chatnio-blob-service
  4. blob Nginx配置

    
    server {
    server_name blob.domain.com;
    
    location / {
        proxy_pass http://localhost:8001;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

}


- 还出现过404、422code
- 同时尝试过使用vercel部署,也无法正常使用
- 在单独打开blob网页时,可以正常上传解析文件
zmh-program commented 6 months ago

422已修复,请更新容器

zmh-program commented 6 months ago

404应该是你接入点填错了,后面不要加/,附一句应该去 blob 提 issue

SHLE1 commented 6 months ago

解决了,感谢指导