Expand description
Rust client for the cerno service.
use cerno_sdk::Client;
let client = Client::new("http://localhost:3000")?;
let answers = client
.systemone("Ticket: server room at 31C, rising.")
.noul("urgent", "Is this urgent?")
.choice("team", "Which team?", ["IT", "Facility", "HR"])
.score("sev", "How severe?", 5)
.send()
.await?;
assert!(answers.noul("urgent")? > 0.8);
assert_eq!(answers.choice("team")?, "Facility");The wire types come from cerno-types, the same crate the server serialises from, so the
client cannot drift from the service it talks to.
The same client exists for Python and TypeScript, written by hand against the same OpenAPI document and tested against the same conformance cases, so all three build identical requests.
Structs§
- Answers
- The answers to one request, with accessors that fail loudly on the wrong id or type.
- Calibration
- Temperature scaling applied to label logits before the softmax.
- Client
- Error
Response - Levels
- A score rubric: either a plain count or the text of each level.
- Model
Info - Models
Response - System
One - A request under construction.
- System
OneRequest - A shared state plus the questions to ask about it.
- System
OneResponse