chatpire / chatgpt-web-share

ChatGPT Plus 共享方案。ChatGPT Plus / OpenAI API sharing solution.

Home Page:https://cws-docs.pages.dev/zh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

无法访问gpt4问题

Feigerlan opened this issue · comments

Version
dev分支

What's your deploying environment?

  • Docker
  • Caddy
  • mac电脑开发环境,前后端都在电脑上,ninja代理在云主机上

Describe the problem
两个问题:
问题1:
image
api:我选的gpt4模型, 结果似乎给我返回的gpt3

问题2:
web模型:可以使用gpt3.5,无法使用gpt4,ninja报错
2024-01-30T09:38:03.601081Z WARN request{method=POST uri=/backend-api/conversation version=HTTP/1.1}: tower_http::trace::on_failure: response failed classification=Status code: 500 Internal Server Error latency=301 ms
前端报错:
image

Expected behavior
可以正常访问gpt4

Your config.yaml or other configurations
openai_web:
enabled: true
is_plus_account: true
chatgpt_base_url: http://xxxx: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
    disable_uploading: false
    openai_api:
    enabled: true
    #openai_base_url: https://api.openai.com/v1/
    openai_base_url: http://xxxx:7999/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-0613
    common:
    print_sql: false
    create_initial_admin_user: true
    initial_admin_user_username: admin
    initial_admin_user_password: password
    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:cws@192.168.157.129:27017/cws
    mongodb_db_name: cws
    run_migration: false
    max_file_upload_size: 104857600
    auth:
    jwt_secret: MODIFY_THIS_TO_RANDOM_SECURE_STRING
    jwt_lifetime_seconds: 259200
    cookie_max_age: 259200
    user_secret: MODIFY_THIS_TO_ANOTHER_RANDOM_SECURE_STRING
    stats:
    ask_stats_ttl: 7776000
    request_stats_ttl: 2592000
    request_stats_filter_keywords:
  • /status
    log:
    console_log_level: INFO

Screenshots or running logs
2024/01/30 17:56:13.831 INFO: [uvicorn.error] connection open
2024/01/30 17:56:13.835 INFO: [cws.api.routers.chat] admin connected to websocket
ask: gpt_4:工
http://54.162.189.163:7999/backend-api/conversation
2024/01/30 17:56:14.557 ERROR: [cws.api.routers.chat] OpenaiWebException: [500] errors.openaiWeb {"code":500,"msg":"No solver available or solver is invalid"}
2024/01/30 17:56:14.615 INFO: [uvicorn.error] connection closed
2024/01/30 17:56:14.638 INFO: [cws.access] 127.0.0.1:54493 | GET /user/me HTTP/1.1 | 200 OK | 11 ms

Additional context
Add any other context about the problem here.

遇到同样的问题:
2024/01/30 20:45:19.881 INFO: [cws.api.routers.chat] admin connected to websocket
2024/01/30 20:45:19.989 ERROR: [cws.api.routers.chat] OpenaiWebException: [500] errors.openaiWeb {"code":500,"msg":"No solver available or solver is invalid"}

遇到同样的问题: 2024/01/30 20:45:19.881 INFO: [cws.api.routers.chat] admin connected to websocket 2024/01/30 20:45:19.989 ERROR: [cws.api.routers.chat] OpenaiWebException: [500] errors.openaiWeb {"code":500,"msg":"No solver available or solver is invalid"}

@Feigerlan 我这里解决了。是后面的步骤ninja的har文件没有上传。
参考 https://github.com/gngpp/ninja/blob/main/doc/readme_zh.md

遇到同样的问题: 2024/01/30 20:45:19.881 INFO: [cws.api.routers.chat] admin connected to websocket 2024/01/30 20:45:19.989 ERROR: [cws.api.routers.chat] OpenaiWebException: [500] errors.openaiWeb {"code":500,"msg":"No solver available or solver is invalid"}

@Feigerlan 我这里解决了。是后面的步骤ninja的har文件没有上传。 参考 https://github.com/gngpp/ninja/blob/main/doc/readme_zh.md

web和问题上传har可以解决。。api的问题好像还是不行呢?

用api返回的模型连3.5都不是,就是3,选4还是选3.5,都是返回的3,但是我在api的后台里看到的又确实是走的4的接口

还有一个新的问题。gpt4 的web 无法加载出来图片一直处于转圈状态。gpt那边已经画出来了。
image
image

遇到同样的问题: 2024/01/30 20:45:19.881 INFO: [cws.api.routers.chat] admin connected to websocket 2024/01/30 20:45:19.989 ERROR: [cws.api.routers.chat] OpenaiWebException: [500] errors.openaiWeb {"code":500,"msg":"No solver available or solver is invalid"}

请仔细阅读ninja的文档重新配置

还有一个新的问题。gpt4 的web 无法加载出来图片一直处于转圈状态。gpt那边已经画出来了。 image image
这个问题还没解决