Skip to content

GPT Vision

BobMaster edited this page Jun 22, 2024 · 4 revisions

sample compose.yaml

services:
  app:
    image: hibobmaster/matrixchatgptbot:latest
    container_name: matrix_chatgpt_bot
    restart: unless-stopped
    # build:
    #   context: .
    #   dockerfile: ./Dockerfile
    env_file:
      - .env
    volumes:
      # use env file or config.json
      # - ./config.json:/app/config.json
      # use touch to create an empty file db, for persist database only
      - ./sync_db:/app/sync_db
      - ./context.db:/app/context.db
      # import_keys path
      # - ./element-keys.txt:/app/element-keys.txt

sample config.json

{
  "homeserver": "https://matrix.qqs.tw",
  "user_id": "@lullap:xxxxx.org",
  "password": "xxxxxxxxxxxxxxxxxx",
  "device_id": "MatrixChatGPTBot",
  "openai_api_key": "xxxxxxxxxxxxxxxxxxxxxxxx",
  "gpt_vision_api_endpoint": "https://api.openai.com/v1/chat/completions",
  "gpt_vision_model": "gpt-4-vision-preview"
}

sample .env

HOMESERVER="https://matrix.xxxxxx.xxxx"
USER_ID="@lullap:xxxxxxxxxxxxx.xxx"
PASSWORD="xxxxxxxxxxxxxxx"
DEVICE_ID="xxxxxxxxxxxxxx"
GPT_VISION_MODEL="llava"
GPT_VISION_API_ENDPOINT="https://localai.xxxxxxx.xxxxxxx/v1/chat/completions"

Room Level: quote a image and @bot + {prompt}

GPT Vision Room Level

Thread Level: quote a image with a {prompt}

GPT Vision Thread Level

Clone this wiki locally