language_model: Add tool results to message content (#17363)
This PR updates the message content for an LLM request to allow it contain tool results. Release Notes: - N/A
This commit is contained in:
parent
74907cb3e6
commit
30b2133336
3 changed files with 73 additions and 38 deletions
|
@ -423,6 +423,14 @@ pub enum RequestContent {
|
|||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
cache_control: Option<CacheControl>,
|
||||
},
|
||||
#[serde(rename = "tool_result")]
|
||||
ToolResult {
|
||||
tool_use_id: String,
|
||||
is_error: bool,
|
||||
content: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
cache_control: Option<CacheControl>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue