refactor(conversations): rename message to content (#261)

Signed-off-by: Mike Nguyen <hey@mike.ee>
This commit is contained in:
Mike Nguyen 2025-02-24 17:40:04 +00:00 committed by GitHub
parent 57347e70c3
commit ab219049a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View File

@ -1093,7 +1093,7 @@ impl JobBuilder {
}
pub struct ConversationInputBuilder {
message: String,
content: String,
role: Option<String>,
scrub_pii: Option<bool>,
}
@ -1101,7 +1101,7 @@ pub struct ConversationInputBuilder {
impl ConversationInputBuilder {
pub fn new(message: &str) -> Self {
ConversationInputBuilder {
message: message.to_string(),
content: message.to_string(),
role: None,
scrub_pii: None,
}
@ -1109,7 +1109,7 @@ impl ConversationInputBuilder {
pub fn build(self) -> ConversationInput {
ConversationInput {
message: self.message,
content: self.content,
role: self.role,
scrub_pii: self.scrub_pii,
}

View File

@ -3261,9 +3261,9 @@ pub struct ConversationRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversationInput {
/// The message to send to the llm
/// The content to send to the llm
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
pub content: ::prost::alloc::string::String,
/// The role to set for the message
#[prost(string, optional, tag = "2")]
pub role: ::core::option::Option<::prost::alloc::string::String>,

Binary file not shown.

View File

@ -21,7 +21,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let request =
ConversationRequestBuilder::new(conversation_component, vec![input.clone()]).build();
println!("conversation input: {:?}", input.message);
println!("conversation input: {:?}", input.content);
let response = client.converse_alpha1(request).await?;

View File

@ -1319,8 +1319,8 @@ message ConversationRequest {
}
message ConversationInput {
// The message to send to the llm
string message = 1;
// The content to send to the llm
string content = 1;
// The role to set for the message
optional string role = 2;