Skip to content

Commit bb47132

Browse files
authored
Fixed options passed to conversation API without "conversationId" throwing (#1480)
Signed-off-by: Whit Waldo <[email protected]>
1 parent cb065f2 commit bb47132

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Dapr.AI/Conversation/DaprConversationClient.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ public override async Task<DaprConversationResponse> ConverseAsync(string daprCo
7777

7878
if (options is not null)
7979
{
80-
request.ContextID = options.ConversationId;
80+
if (options.ConversationId is not null)
81+
{
82+
request.ContextID = options.ConversationId;
83+
}
84+
8185
request.ScrubPII = options.ScrubPII;
8286

8387
foreach (var (key, value) in options.Metadata)

0 commit comments

Comments
 (0)