Nodes/ComfyUI-Artha-Nodes/πŸ”± Artha Gemini Question
ComfyUI Node

πŸ”± Artha Gemini Question

A one-shot Q&A node for when you don't need a chatbot

By CyrostarΒ·Created 10 months agoΒ·Updated 8 months agoΒ· 0
πŸ”± Artha Gemini Question
    • answer
    β—„questionβ–Ί
    β—„api_keyβ–Ί
    β—„modelgemini-2.5-flashβ–Ί
    β—„max_tokens5000β–Ί
    β—„temperature0.7β–Ί

    Artha Gemini Question is the pack's plainest AI node: ask a question, get an answer. It's a single-turn Q&A call to Gemini with no memory, no conversation, and no pretense of being a chatbot - the description says it straight: "the context will not be preserved as this node is not suitable for dialogue purposes." Every run is a fresh, stateless question with whatever you typed in the question field, and the answer comes back through a single output.

    That sounds trivial, and in one sense it is. But in a node graph it's exactly what you want: deterministic, inspectable, per-call AI. There's no hidden state to confuse you, no conversation history to accidentally carry over between runs - the answer you get is purely a function of the question you asked.

    What you set

    • question - your question, multiline. This is the whole job.
    • api_key, model (default gemini-2.5-flash), max_tokens (5000), temperature (0.7) - the pack's standard plumbing.

    One output: answer, a plain string.

    Under the hood it's a straightforward generate_content call with a fixed system prompt ("You are an intelligent ai assistant."). There's no image input and no extra context - just question in, answer out.

    Where it earns its place

    The statelessness is the feature. A few genuinely useful patterns:

    • Conditional text in a workflow. Ask Gemini a yes/no or short-answer question, then wire answer into a text-switch or logic node to steer the graph. "Is this prompt suitable for a children's book?" β†’ route accordingly.
    • Batch interrogation. Same question, different batches, deterministic-ish answers you can compare.
    • A cheap second opinion. Stuck between two prompt styles? Ask. It's a Gemini text call, which is the cheapest thing the pack does.

    The honest limits: no conversation, no context beyond the question, and no image understanding (for that you want Artha Gemini Vision). And while it's cheap per call, it's not free - every execution hits the API. If you're asking the same question every run of a batch, you'll pay for each one.

    The failure mode is the pack standard: an empty answer with the error printed to the ComfyUI console, so empty output means "read the console," not "try again." Key resolution is the usual chain - api_key field, then api.json in the pack folder, then the GEMINI_API_KEY environment variable - and api.json is the version that keeps your key out of shared workflow files.

    Install

    It rides along with the whole πŸ”± pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Cyrostar/ComfyUI-Artha-Nodes
    cd ComfyUI-Artha-Nodes
    pip install -r requirements.txt
    

    Restart ComfyUI, or install "Artha" via ComfyUI Manager. Get a key from Google AI Studio - this node is just an API call, so the key is the whole setup.

    CategoryArtha/LLM/Gemini

    Inputs (5)

    NameTypeDefaultDescription
    questionSTRINGβ€”
    api_keySTRINGAPI key will be visible in plain text. Consider adding your api to the api.json located inside this custom node folder.
    modelCOMBOgemini-2.5-flash5 options: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash, gemini-2.0-flash-lite
    max_tokensINT50001–8192For Gemini models, a token is equivalent to about 4 characters. 100 tokens is equal to about 60–80 English words.
    temperatureFLOAT0.70–2A temperature of 0 means only the most likely tokens are selected. Higher values increase randomness.

    Outputs (1)

    NameTypeDescription
    answerSTRINGβ€”