Skip to main content

guillotina_nuclia – Quick Setup

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

These are the settings regarding nuclia already configured in the package. You mostly need to set up the next env variables: NUA_KEY, APIKEY, KBID, GENERATIVE_MODEL

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"),
                # Nuclia's API KEY
                "apikey": os.environ.get("APIKEY"),
                # Knowledge Box ID
                "kbid": os.environ.get("KBID", ""),

            },
        }
    }
}

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 KBID=\"Knwoledge box id\"
export API_KEY=\"Nuclia's api key\"
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 POST (@NucliaAsk, @NucliaFind, @NucliaPredict, @NucliaSearch, @NucliaAskStream, etc.) will automatically work.

❤️ Happy coding!

1.0.7 (2025-12-18)

  • Configuration can be passed in the payload of the request of @NucliaAsk and @NucliaAskStream. [nilbacardit26]

1.0.6 (2025-12-16)

  • Adding chat history param in the body @NucliaAsk and @NucliaAskStream [nilbacardit26]

1.0.5 (2025-12-03)

  • Adding stateless chat endpoints. [nilbacardit26]

1.0.4 (2025-09-23)

  • Changing API Endpoint to progress, and adding API_ENDPOINT env variable to be able to customize it

1.0.3 (2025-07-29)

  • Adding retrieval response in @NucliaAskStream [nilbacardit26]

  • Convert all the endpoints from GET to POST. Now the question goes to the body [nilbacardit26]

1.0.2 (2025-07-28)

  • Fixing TypeError: can only concatenate str when kbid is not passed [nilbacardit26]

1.0.1 (2025-07-28)

  • Fixing KBID auth [nilbacardit26]

  • Adding @NucliaAskStream endpoint [nilbacardit26]

1.0.0 (2025-07-23)

  • Initial release [nilbacardit26]

Metadata

Release files for guillotina-nuclia 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for guillotina-nuclia 1.0.7
File Size Uploaded
guillotina_nuclia-1.0.7.tar.gz 21.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for guillotina-nuclia 1.0.7
File Interpreter ABI Platform
guillotina_nuclia-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 43.6 kB

Release files / guillotina_nuclia-1.0.7.tar.gz

Download URL guillotina_nuclia-1.0.7.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
edc6c36f88620230e461a279bb28bd1f23db0fb3c732fa8edfbfc2e8f2f9a4eb
BLAKE2b-256 checksum
How to use checksums
b8e2bbbb4096c827946eb775c0d105ff5bf80f61d347e2ce2ba8ad1c641ac680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.4

Release files / guillotina_nuclia-1.0.7-py3-none-any.whl

Download URL guillotina_nuclia-1.0.7-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6365be0990defad4786c2dd4f3dac095e58450bb367731b89498ddf459056321
BLAKE2b-256 checksum
How to use checksums
6387174eb2d71bb9b813551b4b6c61f5cd807e7c7701fc2184b3ee79d2d8bc77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page