Crates.io | unspoken |
lib.rs | unspoken |
version | 0.1.2 |
source | src |
created_at | 2024-09-17 08:49:24.044791 |
updated_at | 2024-09-19 08:37:44.27811 |
description | Chatbot API client library and CLI interface. |
homepage | |
repository | https://github.com/dmitry-markin/unspoken |
max_upload_size | |
id | 1377236 |
size | 89,553 |
NOTICE This project has been renamed to jutella
and has been moved to https://github.com/dmitry-markin/jutella. This crate/binary has been moved to jutella from 0.2.0
Chatbot API client library and CLI interface. Currently supports OpenAI chat API.
To get started with CLI, put your API key and endpoint into ~/.config/unspoken.toml
. See a config example.
To use the chat API, initialize ChatClient
with api_key
and ChatClientConfig
:
let mut chat = ChatClient::new(api_key, ChatClientConfig::default());
Request answers via ChatClient::ask()
:
let answer = chat.ask("What is the highest point on Earth?".to_string())?;
println!("The answer is: {answer}");
ChatClient
keeps the conversation context and sends it with every ask()
to the chatbot API.
Expect breaking changes in the API and transition to async requests.