language_model: Remove unused impl for MessageContent (#17377)

This PR removes an unused `impl` for the `MessageContent` type.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-09-04 18:51:35 -04:00 committed by GitHub
parent 200a466200
commit 965b23fffe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,16 +174,6 @@ pub enum MessageContent {
ToolResult(LanguageModelToolResult),
}
impl MessageContent {
pub fn as_string(&self) -> &str {
match self {
MessageContent::Text(text) => text.as_str(),
MessageContent::Image(_) => "",
MessageContent::ToolResult(tool_result) => tool_result.content.as_str(),
}
}
}
impl From<String> for MessageContent {
fn from(value: String) -> Self {
MessageContent::Text(value)