Skip to content

Commit 5982ff6

Browse files
authored
Merge pull request #4923 from RobiladK/patch-10
Update function-calling.md
2 parents 6a815b4 + 164b7d6 commit 5982ff6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/ai-services/agents/how-to/tools/function-calling.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,13 @@ After the run completes, retrieve all messages from the thread to see the full c
345345

346346
```csharp
347347
// Retrieve all messages from the completed thread, oldest first
348-
Pageable<ThreadMessage> messages = client.Messages.GetMessages(
348+
Pageable<PersistentThreadMessage> messages = client.Messages.GetMessages(
349349
threadId: thread.Id,
350350
order: ListSortOrder.Ascending
351351
);
352352

353353
// Iterate through each message in the thread
354-
foreach (ThreadMessage threadMessage in messages)
354+
foreach (PersistentThreadMessage threadMessage in messages)
355355
{
356356
// Iterate through content items in the message (usually just one text item)
357357
foreach (MessageContent content in threadMessage.ContentItems)
@@ -364,7 +364,7 @@ foreach (ThreadMessage threadMessage in messages)
364364
// Print the role (user/agent) and the text content
365365
Console.WriteLine($"[{threadMessage.Role}]: {textItem.Text}");
366366
break;
367-
// Add handling for other content types if necessary (e.g., images)
367+
// Add handling for other content types if necessary (e.g., images)
368368
}
369369
}
370370
}

0 commit comments

Comments
 (0)