Skip to main content

nuclia support for guillotina

Project description

This package lets your Guillotina instance talk to Nuclia. Below is the only thing you have to do: drop the utility in app_settings and export your credentials.

Install

pip install guillotina_nuclia

Configure the Nuclia utility

Add this to the settings you pass when starting Guillotina.

import os

app_settings = {
    "load_utilities": {
        "nuclia": {
            # interface that the utility will provide
            "provides": "guillotina_nuclia.utility.INucliaUtility",
            # dotted path to the factory
            "factory": "guillotina_nuclia.utility.NucliaUtility",
            # parameters forwarded to the factory
            "settings": {
                # which LLM model Nuclia will use for generative answers
                "generative_model": os.environ.get("GENERATIVE_MODEL", "chatgpt4o"),
                # your personal Nuclia key (required)
                "nua_key": os.environ.get("NUA_KEY"),
                # hard limit for tokens (optional)
                "max_tokens": os.environ.get("MAX_TOKENS"),
            },
        }
    }
}

Set the environment variables

Environment variables

Variable

Required

Example value

Description

NUA_KEY

Yes

nua_pk_live_…

API token generated in the Nuclia dashboard.

GENERATIVE_MODEL

No

chatgpt4o (default)

LLM used for ask / predict.

MAX_TOKENS

No

2048

Maximum tokens per answer.

Export them before launching Guillotina:

export NUA_KEY=\"nua_pk_live_your_token_here\"
export GENERATIVE_MODEL=\"chatgpt4o\"   # optional
export MAX_TOKENS=2048                 # optional

Done!

Start Guillotina as usual—INucliaUtility is now available everywhere and the built-in routes (@NucliaAsk, @NucliaSearch, etc.) will automatically work.

❤️ Happy coding!

1.0.1 (2025-07-28)

  • Fixing KBID auth [nilbacardit26]

  • Adding @NucliaAskStream endpoint [nilbacardit26]

1.0.0 (2025-07-23)

  • Initial release [nilbacardit26]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guillotina_nuclia-1.0.1.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

guillotina_nuclia-1.0.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file guillotina_nuclia-1.0.1.tar.gz.

File metadata

  • Download URL: guillotina_nuclia-1.0.1.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for guillotina_nuclia-1.0.1.tar.gz
Algorithm Hash digest
SHA256 632579ee3d8d7c7cac33d74b78adc748b0f7c6ba38e8edd6153a68a8d4c2a309
MD5 3b1896e58a71305ccb655a95bf4a89f1
BLAKE2b-256 292faac32c9e8b45754c953487ad80242f5609cd71c33902b4b1c5b2c0a62790

See more details on using hashes here.

File details

Details for the file guillotina_nuclia-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for guillotina_nuclia-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e39f95c797a7fec5723caace0dcf35c191d02f36e7b317adccffd7ed04df1e1
MD5 6a6eec18e822876bc3857ccf2b138fa9
BLAKE2b-256 1486bc8680684e14731a5cc5518367a34706acb053dd303b4e029ee794e54179

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page