Skip to content

Commit

Permalink
跟进官网参数设定
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinlic committed Feb 14, 2025
1 parent b2cc132 commit 752aa52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deepseek-free-api",
"version": "0.0.17",
"version": "0.0.20",
"description": "DeepSeek Free API Server",
"type": "module",
"main": "dist/index.js",
Expand Down
11 changes: 7 additions & 4 deletions src/api/controllers/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ const FAKE_HEADERS = {
Priority: "u=1, i",
Referer: "https://chat.deepseek.com/",
"Sec-Ch-Ua":
'"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"',
'"Chromium";v="133", "Google Chrome";v="133", "Not?A_Brand";v="99"',
"Sec-Ch-Ua-Mobile": "?0",
"Sec-Ch-Ua-Platform": '"Windows"',
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin",
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36",
"X-App-Version": "20241129.1"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
"X-App-Version": "20241129.1",
"X-Client-Locale": "zh-CN",
"X-Client-Platform": "web",
"X-Client-Version": "1.0.0-always",
};
const EVENT_COMMIT_ID = '41e9c7b1';
// 当前IP地址
Expand Down Expand Up @@ -155,7 +158,7 @@ async function createSession(model: string, refreshToken: string): Promise<strin
const result = await axios.post(
"https://chat.deepseek.com/api/v0/chat_session/create",
{
agent: "chat",
character_id: null
},
{
headers: {
Expand Down

0 comments on commit 752aa52

Please sign in to comment.