Updated the Groq chat node and also Llama Index Groq node. #4383 (#4384)

* adding DeepSeekr1 distill to groq

* Added max_tokens to groq.ts and chatGroqLlamaindex.ts plus updated groq models removing the outdated models and adding new models such as compound-beta

* Patched OpenAI typo on ChatGroq_LLamaIndex.ts

* Patching groq llamaindex

* Patched pnpm lint error

* Removed retundant image

* Update ChatGroq_LlamaIndex.ts

---------

Co-authored-by: Henry Heng <henryheng@flowiseai.com>
This commit is contained in:
Adolfo Usier
2025-05-06 17:15:32 +01:00
committed by GitHub
parent d75e847091
commit ac9d732550
3 changed files with 44 additions and 26 deletions
@@ -54,6 +54,14 @@ class Groq_ChatModels implements INode {
default: 0.9,
optional: true
},
{
label: 'Max Tokens',
name: 'maxTokens',
type: 'number',
step: 1,
optional: true,
additionalParams: true
},
{
label: 'Streaming',
name: 'streaming',
@@ -73,6 +81,7 @@ class Groq_ChatModels implements INode {
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
const modelName = nodeData.inputs?.modelName as string
const maxTokens = nodeData.inputs?.maxTokens as string
const cache = nodeData.inputs?.cache as BaseCache
const temperature = nodeData.inputs?.temperature as string
const streaming = nodeData.inputs?.streaming as boolean
@@ -86,6 +95,7 @@ class Groq_ChatModels implements INode {
apiKey: groqApiKey,
streaming: streaming ?? true
}
if (maxTokens) obj.maxTokens = parseInt(maxTokens, 10)
if (cache) obj.cache = cache
const model = new ChatGroq(obj)