Aristech NLP-Client for Rust
This is the Rust client implementation for the Aristech NLP-Server.
Installation
To use the client in your project, add it to your Cargo.toml or use cargo to add it:
Usage
use ;
use Error;
async
There are several examples in the examples directory:
- functions.rs: Demonstrates how to list the available functions.
- process.rs: Demonstrates how to perform NLP processing on a text.
- projects.rs: Demonstrates how to list the available projects.
- intents.rs: Demonstrates how to list intents for a project.
- scoreLimits.rs: Demonstrates how to use score limits to figure out good thresholds for intents.
- content.rs: Demonstrates how to search content for a given prompt.
You can run the examples directly using cargo like this:
- Create a
.envfile in the rust directory:
HOST=nlp.example.com
# The credentials are optional but probably required for most servers:
TOKEN=your-token
SECRET=your-secret
# The following are optional:
# ROOT_CERT=your-root-cert.pem # If the server uses a self-signed certificate
# If neither credentials nor an explicit root certificate are provided,
# you can still enable SSL by setting the SSL environment variable to true:
# SSL=true
# PROJECT_ID=your-project-id # Required for some examples
- Run the examples, e.g.:
Build
To build the library, run: