pub struct PromptRequest {
pub session_id: SessionId,
pub prompt: Vec<ContentBlock>,
pub meta: Option<Value>,
}
Expand description
Request parameters for sending a user prompt to the agent.
Contains the user’s message and any additional context.
See protocol docs: User Message
Fields§
§session_id: SessionId
The ID of the session to send this user message to
prompt: Vec<ContentBlock>
The blocks of content that compose the user’s message.
As a baseline, the Agent MUST support ContentBlock::Text
and ContentBlock::ResourceLink
,
while other variants are optionally enabled via PromptCapabilities
.
The Client MUST adapt its interface according to PromptCapabilities
.
The client MAY include referenced pieces of context as either
ContentBlock::Resource
or ContentBlock::ResourceLink
.
When available, ContentBlock::Resource
is preferred
as it avoids extra round-trips and allows the message to include
pieces of context from sources the agent may not have access to.
meta: Option<Value>
Extension point for implementations
Trait Implementations§
Source§impl Clone for PromptRequest
impl Clone for PromptRequest
Source§fn clone(&self) -> PromptRequest
fn clone(&self) -> PromptRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PromptRequest
impl Debug for PromptRequest
Source§impl<'de> Deserialize<'de> for PromptRequest
impl<'de> Deserialize<'de> for PromptRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PromptRequest
impl JsonSchema for PromptRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref
keyword. Read more