Updating Conversation SDK (#1469)

FIX: Updated conversation protos and types to reflect property change from `message` to `content`

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
This commit is contained in:
Whit Waldo 2025-02-24 11:46:34 -06:00 committed by GitHub
parent 0dc268f501
commit 2b288a1135
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 7 deletions

View File

@ -96,7 +96,7 @@ public sealed class DaprConversationClient : DaprAIClient
request.Inputs.Add(new P.ConversationInput
{
ScrubPII = input.ScrubPII,
Message = input.Message,
Content = input.Content,
Role = input.Role.GetValueFromEnumMember()
});
}

View File

@ -16,7 +16,7 @@ namespace Dapr.AI.Conversation;
/// <summary>
/// Represents an input for the Dapr Conversational API.
/// </summary>
/// <param name="Message">The message to send to the LLM.</param>
/// <param name="Content">The content to send to the LLM.</param>
/// <param name="Role">The role indicating the entity providing the message.</param>
/// <param name="ScrubPII">If true, scrubs the data that goes into the LLM.</param>
public sealed record DaprConversationInput(string Message, DaprConversationRole Role, bool ScrubPII = false);
public sealed record DaprConversationInput(string Content, DaprConversationRole Role, bool ScrubPII = false);

View File

@ -1225,7 +1225,6 @@ message Job {
// Systemd timer style cron accepts 6 fields:
// seconds | minutes | hours | day of month | month | day of week
// 0-59 | 0-59 | 0-23 | 1-31 | 1-12/jan-dec | 0-6/sun-sat
//
// "0 30 * * * *" - every hour on the half hour
// "0 15 3 * * *" - every day at 03:15
@ -1320,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;
@ -1345,4 +1344,4 @@ message ConversationResponse {
// An array of results.
repeated ConversationResult outputs = 2;
}
}