Skip to content

Commit

Permalink
type fix graphrag sample
Browse files Browse the repository at this point in the history
  • Loading branch information
lspinheiro committed Jan 9, 2025
1 parent dff93ea commit b9b3ec0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/samples/agentchat_graphrag/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
from autogen_agentchat.messages import TextMessage
from autogen_ext.models.openai import AzureOpenAIChatCompletionClient
from autogen_ext.tools.graphrag import (
GlobalSearchTool,
Expand Down Expand Up @@ -57,7 +58,7 @@ async def main():

response_stream = team.run_stream(task=query)
async for msg in response_stream:
if hasattr(msg, "content"):
if isinstance(msg, TextMessage) and hasattr(msg, "content"):
print(f"\nAgent response: {msg.content}")


Expand Down

0 comments on commit b9b3ec0

Please sign in to comment.