Chapter 7½: inside ask/src
lib.rs, top to bottom:
- The page's small rules:
MAX_INPUT_CHARS,THRESHOLDandis_yes,SUREandis_sure,likelihood, andclean(what is done to an input before it is asked: trimmed, and cut to 500 characters). - Reading the kind:
ALSO,kind_probability,readings, andquestion_id, which is how four facts share one question. - The questions:
fact_question(the eight from chapter 7, word for word),drafted_question(what the LLM wrote, as a Jev question), andcheck. - The request:
Wanted,wanted, andPrepared, which holds the exact bytes that will be sent. - The answers:
learned,Judged,judged, and theOutcomeof a call, withsendfor a live call andreadfor a kept one.
tests.rs checks, among other things, that the body the page shows is the
body the client sends (the_request_shown_is_the_request_sent), against a
scripted transport, so no Jev key is needed.
Try it.
cargo test -p ask.
| File | What |
|---|---|
| lib.rs | The questions put to Jev, the request, and the record of each call. |
| tests.rs | Requests, answers and kept responses, against a scripted transport. |
← Previous: Chapter 7, ask/ · Up: ask · Next: Chapter 8, llm/ →