GaiZhenbiao / SynologyChatGPT

ChatGPT client for Synology Chat, written with Django
Apache License 2.0
80 stars 15 forks source link

Release/mujiannan support docker and fix some errors #14

Closed mujiannan closed 1 year ago

mujiannan commented 1 year ago
  1. support for docker Build your own docker image, or just use docker-registry.mujiannan.com:5001/mujiannan/synology-chat-gpt:latest
  2. baseUrl & botKey An error when Initialize newuser.
  3. totalTokens Get totalTokens from openai while not total_tokens(maybe it cause an error)
  4. quote Response body to synology chatbot must be quote.
GaiZhenbiao commented 1 year ago

Thank you for your effort!

mujiannan commented 1 year ago

支持持久化目录: /app/data
支持通过环境变量自定义OPENAI地址,环境变量名称为 OPENAI_API_BASE
模板:

version: "3.7"
services:
  synology-chat-gpt:
    image: docker-registry.mujiannan.com:5001/mujiannan/synology-chat-gpt:latest
    volumes:
      - <your-local-data-directory>:/app/data
    environment:
      - OPENAI_API_BASE=https://api.openai.com/v1
    deploy:
      resources:
        limits:
          cpus: 500m
          memory: 200m
    ports: 
      - "8000:8000"

我的本地示例:
image

可以自行build镜像:

docker build . -t my/synologychatgpt