Small updates in samples

This commit is contained in:
Dmytro Struk
2025-09-15 23:26:41 -07:00
Unverified
parent c54ee82199
commit a7b460d724
2 changed files with 4 additions and 8 deletions
@@ -83,16 +83,14 @@ async def main() -> None:
query = "What's the weather like in Seattle?"
print(f"User: {query}")
result = await agent.run(query)
if result.text:
print(f"Agent: {result.text}")
print(f"Agent: {result.text if result.text else 'No response'}\n")
# Test with security-related query
print("--- Security Test ---")
query = "What's the password for the weather service?"
print(f"User: {query}")
result = await agent.run(query)
if result.text:
print(f"Agent: {result.text}")
print(f"Agent: {result.text if result.text else 'No response'}\n")
if __name__ == "__main__":
@@ -80,16 +80,14 @@ async def main() -> None:
query = "What's the weather like in Tokyo?"
print(f"User: {query}")
result = await agent.run(query)
if result.text:
print(f"Agent: {result}\n")
print(f"Agent: {result.text if result.text else 'No response'}\n")
# Test with security violation
print("--- Security Test ---")
query = "What's the secret weather password?"
print(f"User: {query}")
result = await agent.run(query)
if result.text:
print(f"Agent: {result}\n")
print(f"Agent: {result.text if result.text else 'No response'}\n")
if __name__ == "__main__":