pub struct ThinkRequest {
pub prompt: String,
pub bindings: HashMap<String, Value>,
pub expect: String,
pub response_tx: Sender<ThinkResponse>,
}Expand description
A request to execute a think block.
The interpreter sends this to the agent, then blocks waiting for ThinkResponse messages on the provided channel.
Fields§
§prompt: StringThe interpolated prompt text to send to the LLM.
bindings: HashMap<String, Value>Variable bindings available in the think block scope.
expect: StringExpected type hint for response extraction (e.g., “string”, “json”).
response_tx: Sender<ThinkResponse>Channel to receive responses from the agent.
The agent will send ThinkResponse messages:
- Zero or more
Domessages for recursive evaluation - Exactly one
Completemessage when finished
Auto Trait Implementations§
impl Freeze for ThinkRequest
impl RefUnwindSafe for ThinkRequest
impl Send for ThinkRequest
impl Sync for ThinkRequest
impl Unpin for ThinkRequest
impl UnsafeUnpin for ThinkRequest
impl UnwindSafe for ThinkRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more