mirror of
https://github.com/YuWanTingbb/unofficial-gpt4.git
synced 2025-10-14 14:11:23 +00:00
新增每个密钥对于特定的机器码,一秘钥一机器码,减小被查询异常
This commit is contained in:
@@ -380,6 +380,7 @@ public class ChatController {
|
||||
|
||||
/**
|
||||
* 为每个密钥设置一个专属的machineId
|
||||
*
|
||||
* @return hexString.toString();
|
||||
*/
|
||||
private static String generateMachineId() {
|
||||
@@ -568,7 +569,7 @@ public class ChatController {
|
||||
String chat_token = copilotTokenList.get(apiKey);
|
||||
Map<String, String> headersMap = new HashMap<>();
|
||||
//添加头部
|
||||
addHeader(headersMap, apiKey, chat_token);
|
||||
addHeader(headersMap, chat_token, apiKey);
|
||||
String json = com.alibaba.fastjson2.JSON.toJSONString(conversation);
|
||||
RequestBody requestBody = RequestBody.create(json, JSON);
|
||||
Request.Builder requestBuilder = new Request.Builder().url(github_chat_url).post(requestBody);
|
||||
@@ -1213,6 +1214,7 @@ public class ChatController {
|
||||
|
||||
/**
|
||||
* 获取模型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Object getModels() {
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
artifactId=gpt-4-copilot
|
||||
groupId=com.gpt4.copilot
|
||||
version=0.1.2
|
Reference in New Issue
Block a user