binary-husky / binary-husky/gpt_academic

[Bug]: sses开头的API key解析异常

Open
#2,055 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 | 安装方法与平台

Anaconda (I used latest requirements.txt)

### Version | 版本

Latest | 最新版

### OS | 操作系统

Windows

### Describe the bug | 简述

sses开头的API key 在config 文件中已配置好,CUSTOM_API_KEY_PATTERN =API_KEY = "sess-rVd5FAJePHp8。。。。。。。。。。。。。。。。。sEl1T30NqTVMn5N" ,运行python main.py 识别key成功,在弹出网页中出现:Json解析异常 “error”: { “message”: “Incorrect API key provided: sess-rVd*******************************************Mn5N. You can find your API key at https://platform.openai.com/account/api-keys.”, “type”: “invalid_request_error”, “param”: null, “code”: “invalid_api_key” }}
网页输入框输入该key识别成功并可使用

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

![微信图片_20241126120309](https://github.com/user-attachments/assets/c9ba75a9-9983-442f-b503-90f009afba22)
![微信图片_20241126120304](https://github.com/user-attachments/assets/3c4b74fe-2ea3-433b-9d6c-57283b7d0b5c)
![微信图片_20241126120259](https://github.com/user-attachments/assets/990dd48f-8e6e-4012-98a0-ddea3cfb6a57)

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

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue on Windows with the API key configured in the config file, then compare that path with entering the same key in the web page. Trace how main.py reads and passes the configured key, and consider the issue done when both input paths use the same key successfully without the JSON parsing or invalid-key error.

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.