mirror of
https://github.com/voideditor/void
synced 2026-05-23 01:18:25 +00:00
fix misc
This commit is contained in:
parent
cc3a08e1ab
commit
91c65b6060
4 changed files with 255 additions and 10141 deletions
10381
extensions/void/package-lock.json
generated
10381
extensions/void/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -139,6 +139,7 @@
|
|||
"eslint-plugin-react": "^7.35.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"globals": "^15.9.0",
|
||||
"groq-sdk": "^0.8.0",
|
||||
"lodash": "^4.17.21",
|
||||
"marked": "^14.1.0",
|
||||
"ollama": "^0.5.9",
|
||||
|
|
@ -155,8 +156,5 @@
|
|||
"typescript": "5.5.4",
|
||||
"typescript-eslint": "^8.3.0",
|
||||
"uuid": "^10.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"groq-sdk": "^0.7.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,10 +366,7 @@ const sendGroqMsg: SendLLMMessageFnTypeInternal = async ({ messages, onText, onF
|
|||
didAbort = true;
|
||||
};
|
||||
|
||||
const groq = new Groq({
|
||||
apiKey: voidConfig.groq.apikey,
|
||||
dangerouslyAllowBrowser: true
|
||||
});
|
||||
const groq = new Groq({ apiKey: voidConfig.groq.apikey, dangerouslyAllowBrowser: true });
|
||||
|
||||
try {
|
||||
const stream = await groq.chat.completions.create({
|
||||
|
|
@ -384,14 +381,14 @@ const sendGroqMsg: SendLLMMessageFnTypeInternal = async ({ messages, onText, onF
|
|||
if (didAbort) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
const newText = chunk.choices[0]?.delta?.content || '';
|
||||
if (newText) {
|
||||
fullText += newText;
|
||||
onText(newText, fullText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!didAbort) {
|
||||
onFinalMessage(fullText);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const configString = (description: string, defaultVal: string) => {
|
|||
export const configFields = [
|
||||
'anthropic',
|
||||
'openAI',
|
||||
'groq',//groq modle
|
||||
'groq',
|
||||
'gemini',
|
||||
'greptile',
|
||||
'ollama',
|
||||
|
|
|
|||
Loading…
Reference in a new issue