-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
GitAuto: 访问 llama-3.1-70b-versatile 失败,请检查网络或 API 密钥 #152
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -23,7 +23,7 @@ const gradients = [ | |||||||||||
|
||||||||||||
export default async (word, options) => { | ||||||||||||
console.log(''); | ||||||||||||
const { iciba, groq, GROQ_API_KEY } = options; | ||||||||||||
const { iciba, groq, GROQ_API_KEY, OTHER_API_KEYS } = options; | ||||||||||||
const endcodedWord = encodeURIComponent(word); | ||||||||||||
|
||||||||||||
// iciba | ||||||||||||
|
@@ -45,8 +45,8 @@ export default async (word, options) => { | |||||||||||
|
||||||||||||
// groq ai | ||||||||||||
if (isTrueOrUndefined(groq)) { | ||||||||||||
const groqClient = new Groq({ | ||||||||||||
apiKey: GROQ_API_KEY || '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', | ||||||||||||
const apiKey = OTHER_API_KEYS || GROQ_API_KEY; | ||||||||||||
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. 在选择API密钥时,建议优先考虑用户指定的密钥顺序,而不仅仅是 |
||||||||||||
apiKey: apiKey || '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', | ||||||||||||
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. Secret detected: Base64 High Entropy String
Comment on lines
+48
to
+49
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
|
||||||||||||
}); | ||||||||||||
const model = 'llama-3.1-70b-versatile'; | ||||||||||||
const spinner = ora(`正在请教 ${model}...`).start(); | ||||||||||||
|
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 simplifying the conditional assignment for
options[key]
by using a single line ternary operator to make the code more concise and readable. [enhancement]