mirror of
https://github.com/hanzoai/code.git
synced 2026-09-30 20:53:35 +00:00
fix misc
This commit is contained in:
Generated
+250
-10131
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',
|
||||
|
||||
Reference in New Issue
Block a user