Nodes/ComfyUI_ComfyGroq/GROQ Code Assistant
ComfyUI Node

GROQ Code Assistant

The codegen node with exactly one model and no code inside

By downlifted·Created 11 months ago·Updated 11 months ago· 0
GROQ Code Assistant
    • code
    • explanation
    api_key
    modelcodeqwen-7b
    taskGenerate a Python function that sorts a list of dictionaries by a specified key
    languagepython
    temperature0.20
    max_tokens2048
    include_explanationtrue

    Straight to it: this node is an empty stub. GROQ Code Assistant declares a full set of inputs and two outputs, but the generate_code() function behind it is a pass - no API call, no logic, nothing. Wire it up, hit queue, and you get an error, not code. It's one of three nodes in the ComfyUI_ComfyGroq pack (by downlifted) that are shells waiting on a future implementation, so treat this page as the spec sheet for something that doesn't exist yet.

    What it's supposed to do

    The pitch: tell an LLM what code you want, in ComfyUI's graph. You give it a task like "Generate a Python function that sorts a list of dictionaries by a specified key," pick a language, and it returns code and an optional explanation. Cute idea, but honestly this is the node in the pack you'd least miss - you're going to write that Python in an IDE or in ComfyUI's own custom script node, not fight with a graph node to emit it.

    What the schema says

    The inputs you'd set: api_key (or the GROQ_API_KEY env var), task (a free-text, multiline description), language (one of python, javascript, typescript, java, c++, go, rust), temperature (0–1, default 0.2 for tight output), max_tokens (up to 8192), and an include_explanation toggle. Outputs are code and explanation, both strings.

    Here's a detail worth noting even though the node is dead: the model dropdown has exactly one choice - codeqwen-7b. Not seven, not three. One. And that's a problem beyond the stub, because codeqwen-7b was a real GROQ model for a while and then got retired from their lineup. So even if the author finished the function, the default model would 404 on GROQ's current API. The whole node is a snapshot of an older idea, frozen.

    Install

    Same as the rest of the pack: search "GROQ" or "ComfyGroq" in ComfyUI Manager, or clone https://github.com/downlifted/ComfyUI_GROQ-PromptWizard into custom_nodes, then pip install groq and restart. No models to download - GROQ is a cloud API, so the only setup is an API key from console.groq.com.

    The bottom line

    If you genuinely want code generation, GROQ's current models (like llama-3.3-70b-versatile) are excellent and cheap - through their own API or any chat UI. This node's only advantage would be sitting inside ComfyUI, and even that is marginal for code, which you'll want in a file, not a graph. Check the pack's repo for an update before installing; as of now you'd be adding a node that can't produce output.

    CategoryComfyGroq/Code

    Inputs (7)

    NameTypeDefaultDescription
    api_keySTRING
    modelCOMBOcodeqwen-7b1 options: codeqwen-7b
    taskSTRINGGenerate a Python function that sorts a list of dictionaries by a specified key
    languageCOMBOpython7 options: python, javascript, typescript, java, c++, go, +1
    temperatureFLOAT0.200–1
    max_tokensINT2048100–8192
    include_explanationBOOLEANtrue

    Outputs (2)

    NameTypeDescription
    codeSTRING
    explanationSTRING