Crates.io | cleverbotfreeapi |
lib.rs | cleverbotfreeapi |
version | 0.1.1 |
source | src |
created_at | 2024-10-04 17:55:10.815227 |
updated_at | 2024-10-04 18:22:30.672278 |
description | Interact with a washed down version of the Cleverbot API for free |
homepage | https://github.com/rootofminus1atu/cleverbotfreeapi |
repository | |
max_upload_size | |
id | 1396894 |
size | 83,962 |
cleverbotfreeapi
is a Rust client library for interacting with a washed down version of the Cleverbot API for free.
This crate provides easy-to-use interfaces for sending messages to Cleverbot and receiving responses. Suitable for async builds like web servers or bots.
Here is a basic example of using cleverbotfreeapi
to send a message to Cleverbot and receive a response:
use cleverbotfreeapi::{CleverbotBuilder, Error};
#[tokio::main]
async fn main() -> Result<(), Error> {
let cleverbot = CleverbotBuilder::default().build().await?;
let response = cleverbot.get_response("are you a bot").await?;
println!("response: {}", response); // would respond with something like "no, I'm human"
Ok(())
}
For more detailed examples, see the examples directory in the repository.
Contributions are welcome!