Skip to content

Commit ab21904

Browse files
authored
refactor(conversations): rename message to content (#261)
Signed-off-by: Mike Nguyen <[email protected]>
1 parent 57347e7 commit ab21904

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

dapr/src/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,23 +1093,23 @@ impl JobBuilder {
10931093
}
10941094

10951095
pub struct ConversationInputBuilder {
1096-
message: String,
1096+
content: String,
10971097
role: Option<String>,
10981098
scrub_pii: Option<bool>,
10991099
}
11001100

11011101
impl ConversationInputBuilder {
11021102
pub fn new(message: &str) -> Self {
11031103
ConversationInputBuilder {
1104-
message: message.to_string(),
1104+
content: message.to_string(),
11051105
role: None,
11061106
scrub_pii: None,
11071107
}
11081108
}
11091109

11101110
pub fn build(self) -> ConversationInput {
11111111
ConversationInput {
1112-
message: self.message,
1112+
content: self.content,
11131113
role: self.role,
11141114
scrub_pii: self.scrub_pii,
11151115
}

dapr/src/dapr/dapr.proto.runtime.v1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,9 +3261,9 @@ pub struct ConversationRequest {
32613261
}
32623262
#[derive(Clone, PartialEq, ::prost::Message)]
32633263
pub struct ConversationInput {
3264-
/// The message to send to the llm
3264+
/// The content to send to the llm
32653265
#[prost(string, tag = "1")]
3266-
pub message: ::prost::alloc::string::String,
3266+
pub content: ::prost::alloc::string::String,
32673267
/// The role to set for the message
32683268
#[prost(string, optional, tag = "2")]
32693269
pub role: ::core::option::Option<::prost::alloc::string::String>,

dapr/src/dapr/types.bin

0 Bytes
Binary file not shown.

examples/src/conversation/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
2121
let request =
2222
ConversationRequestBuilder::new(conversation_component, vec![input.clone()]).build();
2323

24-
println!("conversation input: {:?}", input.message);
24+
println!("conversation input: {:?}", input.content);
2525

2626
let response = client.converse_alpha1(request).await?;
2727

proto/dapr/proto/runtime/v1/dapr.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,8 +1319,8 @@ message ConversationRequest {
13191319
}
13201320

13211321
message ConversationInput {
1322-
// The message to send to the llm
1323-
string message = 1;
1322+
// The content to send to the llm
1323+
string content = 1;
13241324

13251325
// The role to set for the message
13261326
optional string role = 2;

0 commit comments

Comments
 (0)