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
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.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]
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file guillotina_nuclia-1.0.2.tar.gz.
File metadata
- Download URL: guillotina_nuclia-1.0.2.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1134738d905db0b5e58300a534506da1e1159361cc05f5539ed63fca08af63a8
|
|
| MD5 |
214e5a42df282e139d120f9aec8bfec7
|
|
| BLAKE2b-256 |
52eb3cd57d066f97f20943a30806d9cbb3acad484064fd3ec8aebb5c069afb00
|
File details
Details for the file guillotina_nuclia-1.0.2-py3-none-any.whl.
File metadata
- Download URL: guillotina_nuclia-1.0.2-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c533425b2d443785f7a4230db62db1b7e9fe9881634a7ae676823431c62b4c8d
|
|
| MD5 |
13eec288e95c5d7b095562940f1795c2
|
|
| BLAKE2b-256 |
ad9eecdc05625277e82f489848cb84bbc8f90fcc45591dad676824f263f71906
|