ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
75.4k stars 58.87k forks source link

[Bug] MobileAgent使用GPT-4o #4794

Closed cpken closed 4 months ago

cpken commented 4 months ago

Bug Description

使用 MobileAgent 测试一些功能,

在运行后,发现返回结果为空,仅请求成功而已

res = requests.post(api_url, headers=headers, json=data)
print('================= res-start: =============')
print(res.status_code)
if res.status_code == 200:
    print('请求成功:', res.text)
    print('content:', res.content)
print('================= res-end: ==============')
res = res.json()['choices'][0]['message']['content']
================= res-start: =============
<Response [200]>
200
请求成功: json{}

content: b'json\n{}\n'
================= res-end: ==============

Steps to Reproduce

  1. 安装好 MobileAgent
  2. 更改 MobileAgent/api.pyapi_url = "https://api.nextapi.fun/v1/chat/completions"
  3. 运行 run.py

Expected Behavior

应该正确返回 json 内容,但却返回的是空 json。

Screenshots

图片

Deployment Method

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

Issues-translate-bot commented 4 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] MobileAgent uses GPT-4o

Bug Description

Use MobileAgent to test some functions, -gpt-4o -python 3.10

After running, it was found that the request result could not be obtained, only the request was successful.

res = requests.post(api_url, headers=headers, json=data)
print('================== res-start: =============')
print(res.status_code)
if res.status_code == 200:
    print('Request successful:', res.text)
    print('content:', res.content)
print('================== res-end: ==============')
res = res.json()['choices'][0]['message']['content']
================= res-start: =============
<Response [200]>
200
Request successful: json{}

content: b'json\n{}\n'
================= res-end: ==============

Steps to Reproduce

  1. Install MobileAgent
  2. Change api_url = "https://api.nextapi.fun/v1/chat/completions" in MobileAgent/api.py
  3. Run run.py

Expected Behavior

The json content should be returned correctly, but empty json is returned.

Screenshots

Picture

Deployment Method

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response