chatpire / chatgpt-web-share

ChatGPT Plus 共享方案。ChatGPT Plus / OpenAI API sharing solution.
https://cws-docs.pages.dev/zh/
GNU General Public License v3.0
4.27k stars 678 forks source link

0.4.6版本提示string indices must be integers,无法正常对话 #366

Closed ljq29 closed 8 months ago

ljq29 commented 8 months ago

Version v0.x.x

What's your deploying method?

Describe the bug 使用Docker安装0.4.6版本,提示string indices must be integers,无法对话

To Reproduce Steps to reproduce the behavior:

  1. 选择Chatgpt 3.5
  2. 输入问题后回车
  3. 提示 string indices must be integers

Expected behavior 正常回复问题

Your config.yaml or other configurations compose:

version: "3"

services:
  chatgpt-web-share:
    image: ghcr.io/chatpire/chatgpt-web-share:0.4.5
    # image: ghcr.io/chatpire/chatgpt-web-share:latest
    container_name: cws
    restart: unless-stopped
    ports:
      - 5000:80
    volumes:
      - ./data:/app/backend/data
    environment:
      - TZ=Asia/Shanghai
      - CWS_CONFIG_DIR=/app/backend/data/config
    depends_on:
      - mongo

  mongo:
    container_name: mongo
    # image: groundhog2k/mongo:6.0.9 #mongo:6.0
    image: mongo:6.0-focal
    restart: always
    # ports:
    #   - 27017:27017
    volumes:
      - ./mongo_data:/data/db
    environment:
      MONGO_INITDB_DATABASE: cws
      MONGO_INITDB_ROOT_USERNAME: cws
      MONGO_INITDB_ROOT_PASSWORD: password

  ninja:
    image: ghcr.io/gngpp/ninja:latest
    container_name: ninja
    restart: unless-stopped
    command: run --disable-webui --arkose-gpt4-har-dir /root/.ninja/gpt4 # --random-chrome-ua
    ports:
      - "7999:7999"
    environment:
      - TZ=Asia/Shanghai
    volumes:
      - "./har/gpt4:/root/.ninja/gpt4"

config.yaml:

openai_web:
  enabled: true
  is_plus_account: true
  enable_team_subscription: false
  team_account_id:
  chatgpt_base_url:http://ninja:7999/backend-api/
  proxy:
  common_timeout: 20
  ask_timeout: 600
  sync_conversations_on_startup: false
  sync_conversations_schedule: false
  sync_conversations_schedule_interval_hours: 12
  enabled_models:
  - gpt_3_5
  - gpt_4
  - gpt_4_plugins
  model_code_mapping:
    gpt_3_5: text-davinci-002-render-sha
    gpt_3_5_mobile: text-davinci-002-render-sha-mobile
    gpt_4: gpt-4
    gpt_4_mobile: gpt-4-mobile
    gpt_4_browsing: gpt-4-browsing
    gpt_4_plugins: gpt-4-plugins
    gpt_4_code_interpreter: gpt-4-code-interpreter
    gpt_4_dalle: gpt-4-dalle
  file_upload_strategy: browser_upload_only
  max_completion_concurrency: 1
  disable_uploading: false
openai_api:
  enabled: true
  openai_base_url: https://api.openai.com/v1/
  proxy:
  connect_timeout: 10
  read_timeout: 20
  enabled_models:
  - gpt_3_5
  - gpt_4
  model_code_mapping:
    gpt_3_5: gpt-3.5-turbo
    gpt_4: gpt-4
common:
  print_sql: false
  create_initial_admin_user: true
  initial_admin_user_username: admin
  initial_admin_user_password: password1
http:
  host: 127.0.0.1
  port: 8000
  cors_allow_origins:
  - http://localhost:8000
  - http://localhost:5173
  - http://127.0.0.1:8000
  - http://127.0.0.1:5173
data:
  data_dir: ./data
  database_url: sqlite+aiosqlite:///data/database.db
  mongodb_url: mongodb://cws:password@mongo:27017
  mongodb_db_name: cws
  run_migration: true
  max_file_upload_size: 104857600
auth:
  jwt_secret: w3MVqy4x9sEwDyQn
  jwt_lifetime_seconds: 259200
  cookie_max_age: 259200
  user_secret: kRYHFRkVry1vWPIo
stats:
  ask_stats_ttl: 7776000
  request_stats_ttl: 2592000
  request_stats_filter_keywords:
  - /status
log:
  console_log_level: INFO
sola97 commented 8 months ago

相同问题

laomu61996 commented 8 months ago

+1

update757 commented 8 months ago

相同问题, 2024/02/06 11:13:27.996 INFO: [cws.api.routers.chat] admin connected to websocket 2024/02/06 11:13:30.768 ERROR: [cws.api.routers.chat] string indices must be integers 2024/02/06 11:13:30.809 DEBUG: [cws.api.routers.chat] terminated ask 8a848a68-1e90-4034-a43d-f8dcce0bd10d (gpt_4) because of error 2024/02/06 11:13:30.812 INFO: [uvicorn.error] connection closed 1

gitwbe commented 8 months ago

+1

spammenotinoz commented 8 months ago

Same error, after rolling back to 0.4.5. Also rolled-back Ninja.

moeakwak commented 8 months ago

0.4.7 已修复