X-PLUG / MobileAgent

Mobile-Agent: The Powerful Mobile Device Operation Assistant Family
https://arxiv.org/abs/2406.01014
MIT License
2.3k stars 193 forks source link

MobileAgent使用GPT-4o #20

Closed cpken closed 1 month ago

cpken commented 1 month ago

使用 MobileAgent 测试一些功能,

gpt-4o
python 3.10
openai 1.30
base_url: https://api.nextapi.fun/v1/chat/completions

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

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: ==============

步骤

执行结果

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

334632865-55015af8-e29e-4174-9278-ac3f53d1dc5c