diff --git a/README.md b/README.md index 132e7ea..73294f5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,6 @@ You can login with your Nuclia user [How to sign-up](https://nuclia.cloud/user/s nuclia auth login ``` - ### Nuclia Knowledgebox You can login to a specific knowledgebox if you have a Service Token (How to get a Service Token) or your NucliaDB is [deployed on-premise](https://docs.nuclia.dev/docs/nucliadb/deploy) @@ -27,7 +26,6 @@ nuclia auth kb --url KB_URL --token SERVICE_TOKEN KB_URL its the url of the Knowledge Box. On the cloud service you can retrieve it on the dashboard. On the on-premise/community deployment its the url mapped to it. - ### Nuclia Understanding API You can login with a Nuclia Understanding API key to process files, predict and train using our system @@ -38,4 +36,4 @@ nuclia auth nua --key ZZZZ ## Documentation -You can find the documentation [here](https://github.com/nuclia/nuclia.py/tree/main/docs) \ No newline at end of file +You can find the documentation [here](https://github.com/nuclia/nuclia.py/tree/main/docs/01-README.md) diff --git a/docs/01-README.md b/docs/01-README.md new file mode 100644 index 0000000..2d262da --- /dev/null +++ b/docs/01-README.md @@ -0,0 +1,33 @@ +# Nuclia CLI/SDK + +This SDK/CLI is designed to facilitate use of the Nuclia API. + +There are two developer experiences: + +- CLI: by using the cli `nuclia` you can interact with Nuclia via command line +- SDK: Using python you can replicate each command using the same structure + +It requires Python (≥3.8) and can be installed with: + +```sh +pip install nuclia +``` + +## Getting started + +First steps should be: + +- [Authentication](02-auth.md) +- [Setting KnowledgeBox or NUA key](03-default.md). + +## Use Cases + +- [Upload files](04-upload.md) +- [Upload url](04-upload.md) +- [Upload text](04-upload.md) +- [Upload conversation](07-conversation.md) +- [Search](06-search.md) +- [Extract information from a file](05-extract.md) +- Detect Entities +- [Get embedding from text](05-extract.md) +- Get answer from a context diff --git a/docs/AUTH.md b/docs/02-auth.md similarity index 100% rename from docs/AUTH.md rename to docs/02-auth.md diff --git a/docs/DEFAULT.md b/docs/03-default.md similarity index 100% rename from docs/DEFAULT.md rename to docs/03-default.md diff --git a/docs/UPLOAD.md b/docs/04-upload.md similarity index 88% rename from docs/UPLOAD.md rename to docs/04-upload.md index cb62eda..c2d0841 100644 --- a/docs/UPLOAD.md +++ b/docs/04-upload.md @@ -1,6 +1,6 @@ # Upload use case -All examples assume you [authenticated](AUTH.md) and defined a [default](DEFAULT.md) knowledgebox. In case you want to overwrite or define a one time knowledgebox you should add on any command/function the `url` and `api_key` parameter. +All examples assume you [authenticated](02-auth.md) and defined a [default](03-default.md) knowledgebox. In case you want to overwrite or define a one time knowledgebox you should add on any command/function the `url` and `api_key` parameter. ## Upload a file in a KnowledgeBox @@ -82,7 +82,6 @@ Pass `origin` or `extra` metadata: nuclia kb upload text --path=FILE_PATH --origin='{"url":"https://somwhere.com"}' --extra='{"metadata":{"whatever":42}}' ``` - ## Upload an URL in a KnowledgeBox Push a text to a knowledgebox: diff --git a/docs/EXTRACT.md b/docs/05-extract.md similarity index 92% rename from docs/EXTRACT.md rename to docs/05-extract.md index a6f172f..d969025 100644 --- a/docs/EXTRACT.md +++ b/docs/05-extract.md @@ -1,6 +1,6 @@ # Extract data from a resource -Once you have [uploaded](UPLOAD.md) a resource you can extract data from it. +Once you have [uploaded](04-upload.md) a resource you can extract data from it. ```bash nuclia kb resource get --rid=RESOURCE_ID --show=extracted --json @@ -38,4 +38,4 @@ nuclia kb resource get --rid=RESOURCE_ID --show=extracted --extracted=vectors -- from nuclia import sdk resource = sdk.NucliaResource() resource.get(rid=RESOURCE_ID, show='extracted', extracted='vectors') -``` \ No newline at end of file +``` diff --git a/docs/SEARCH.md b/docs/06-search.md similarity index 100% rename from docs/SEARCH.md rename to docs/06-search.md diff --git a/docs/CONVERSATION.md b/docs/07-conversation.md similarity index 73% rename from docs/CONVERSATION.md rename to docs/07-conversation.md index 6c6570a..c91e725 100644 --- a/docs/CONVERSATION.md +++ b/docs/07-conversation.md @@ -1,6 +1,6 @@ # Conversational use case -All examples has assumed you [authenticated](AUTH.md) and defined a [default](DEFAULT.md) knowledgebox. In case you want to overwrite or define a one time knowledgebox you should add on any command/function the `url` and `api_key` parameter. +All examples has assumed you [authenticated](02-auth.md) and defined a [default](03-default.md) knowledgebox. In case you want to overwrite or define a one time knowledgebox you should add on any command/function the `url` and `api_key` parameter. ## Upload messages @@ -35,8 +35,8 @@ nuclia kb upload conversation --path=FILE ## Upload files -[Upload documentation](UPLOAD.md) +[Upload documentation](04-upload.md) ## Search on it -[Search documentation](SEARCH.md) +[Search documentation](06-search.md) diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index e786045..0000000 --- a/docs/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Nuclia CLI/SDK - -This SDK/CLI is designed to provide an easy use cased focus experience with Nuclia API. - -There are two developer experiences: - -- CLI: by using the cli `nuclia` you can interact with Nuclia via command line -- SDK: Using python you can replicate each command using the same structure - -## Getting started - -First steps should be: - -- [Authentication](AUTH.md) -- [Setting KnowledgeBox or NUA key](DEFAULT.md). - -## Use Cases - -- [Upload files](UPLOAD.md) -- [Upload url](UPLOAD.md) -- [Upload text](UPLOAD.md) -- [Upload conversation](CONVERSATION.md) -- [Search](SEARCH.md) -- [Extract information from a file](EXTRACT.md) -- Detect Entities -- [Get embedding from text](EXTRACT.md) -- Get answer from a context