anthropic: Remove cache_control field from ResponseContent (#17165)

This PR removes the `cache_control` field from the variants in
`ResponseContent`.

This field is used on requests to control the caching behavior, but is
not needed on content in the response.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-08-30 12:22:47 -04:00 committed by GitHub
parent 8901d926eb
commit ea25d438d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -450,18 +450,12 @@ pub enum RequestContent {
#[serde(tag = "type")]
pub enum ResponseContent {
#[serde(rename = "text")]
Text {
text: String,
#[serde(skip_serializing_if = "Option::is_none")]
cache_control: Option<CacheControl>,
},
Text { text: String },
#[serde(rename = "tool_use")]
ToolUse {
id: String,
name: String,
input: serde_json::Value,
#[serde(skip_serializing_if = "Option::is_none")]
cache_control: Option<CacheControl>,
},
}