-
-
Notifications
You must be signed in to change notification settings - Fork 145
GitAuto: 更新到10.0后访问deepseek失败☹️(设置了deepseek的api) #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -39,14 +39,14 @@ export default async (word, options) => { | |||||||||||||||||||
| spinner.stop(); | ||||||||||||||||||||
| printIciba(result.dict, options); | ||||||||||||||||||||
| } catch (error) { | ||||||||||||||||||||
| spinner.fail('访问 iciba 失败,请检查网络'); | ||||||||||||||||||||
| spinner.fail('访问 deepseek 失败,请检查网络'); | ||||||||||||||||||||
| } | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| // deepseek | ||||||||||||||||||||
| if (isTrueOrUndefined(deepseek)) { | ||||||||||||||||||||
| const openai = new OpenAI({ | ||||||||||||||||||||
| baseURL: 'https://api.deepseek.com', | ||||||||||||||||||||
| baseURL: 'https://v10.deepseek.cn/api', | ||||||||||||||||||||
| apiKey: LLM_API_KEY || 'sk-a6325c2f3d2044968e6a83f249cc1541', | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The API key 'sk-a6325c2f3d2044968e6a83f249cc1541' is hardcoded. Consider using environment variables or a secure vault to manage sensitive information. |
||||||||||||||||||||
| }); | ||||||||||||||||||||
|
Comment on lines
48
to
51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Ensure that the
Suggested change
|
||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,8 @@ | ||||||||||||||||
| import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'; | ||||||||||||||||
| // Added deepseek API configuration for version 10.0 | ||||||||||||||||
| export const deepseekAPI = { | ||||||||||||||||
| endpoint: 'https://v10.deepseek.cn/api', | ||||||||||||||||
| timeout: 5000 | ||||||||||||||||
|
Comment on lines
+3
to
+5
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Validate the
Suggested change
|
||||||||||||||||
| import { homedir } from 'node:os'; | ||||||||||||||||
| import path from 'node:path'; | ||||||||||||||||
| import { Chalk } from 'chalk'; | ||||||||||||||||
|
|
||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Consider adding error logging for the catch block to capture more details about the failure when accessing Deepseek, which can help in diagnosing issues. [enhancement]