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
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
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.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]
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.5.tar.gz.
File metadata
- Download URL: guillotina_nuclia-1.0.5.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a1b69a9fc4cae2f7371d0212274ed1c5a078cf3ca31a22a9e6714b4a9567baf
|
|
| MD5 |
973eb0e8627ca0a01b6eed568ccc4789
|
|
| BLAKE2b-256 |
46f4a3b66c56d7cba28d79f1a83273e448563ae1959f422b104ef23afa41ee07
|
File details
Details for the file guillotina_nuclia-1.0.5-py3-none-any.whl.
File metadata
- Download URL: guillotina_nuclia-1.0.5-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81fc5f5fca0bd5f20268248338edd19e7536a5d6125e99134926045ac0dd2748
|
|
| MD5 |
c21240388e6d920ba6057a1b3d89e914
|
|
| BLAKE2b-256 |
ae12afb2c2f41aba4a4bebb8399c77db4cc07c6146a804cf8a57147b48b5f535
|