pydantic-ai
AI overview
Sign in and the AI will write an overview from our coverage.
Headlines · 1
- Debugging Async Shutdown Failures That Mask the Real Error
A Juejin AI author describes three cleanup failures in an AgentScope script after its business flow completed and all seven evaluations passed. Calling run_until_complete() or pydantic-ai's run_sync() inside a running event loop raises “This event loop is already running,” while passing an extra argument to close_models() can raise a TypeError inside finally and hide the original exception. The recommended approach is one top-level asyncio.run() entry point, await internally, catch cleanup errors without rethrowing, and test exit behavior in a subprocess.
掘金 · 人工智能 · 🔥 0
Experience and discussion from the community
Share my pydantic-ai experienceAsk about pydantic-ai
Nobody has shared their experience with pydantic-ai yet.