binary-husky / binary-husky/gpt_academic

[Bug]: 将百度的api填入后报错

Open
#2,162 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
71.3k
Forks
8.3k
PR merge metrics
No merged PRs in 30d

Description

### Installation Method | 安装方法与平台

OneKeyInstall (一键安装脚本-windows)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Windows

### Describe the bug | 简述

如图,更新后显示报错,已经重新卸载后安装。
不知道该这么修改。
Traceback (most recent call last):
File ".\request_llms\bridge_qianfan.py", line 113, in generate_from_baidu_qianfan
incoming = dec['result']
KeyError: 'result'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ".\request_llms\bridge_qianfan.py", line 154, in predict
for response in generate_from_baidu_qianfan(inputs, llm_kwargs, history, system_prompt):
File ".\request_llms\bridge_qianfan.py", line 120, in generate_from_baidu_qianfan
raise RuntimeError(dec['error_msg'])
RuntimeError: Access token invalid or no longer valid

### Screen Shot | 有帮助的截图

![Image](https://github.com/user-attachments/assets/49007c61-97cc-4abe-b723-29549e10c95e)

### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in request_llms/bridge_qianfan.py at lines 113 and 154, then reproduce the Baidu API request with the reported Windows setup and credentials. Inspect the returned response when dec lacks result and confirm whether the access-token error is handled clearly; done means the failure is actionable and the valid-token path still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.