Commit 19244e1
committed
feat(async): integrate nest-asyncio for async tool calls in running event loops
- Added support for using async tools within a running event loop by integrating `nest-asyncio`.
- Updated `pyproject.toml` to include `nest-asyncio` as a dependency.
- Enhanced error handling to prompt installation of `nest-asyncio` if not found.
- Added tests to verify async tool calls from a running event loop.
This change improves the usability of async tools in environments like Jupyter notebooks.1 parent fe03ead commit 19244e1
File tree
5 files changed
+2349
-2316
lines changed- dspy
- adapters/types
- utils
- tests/adapters
5 files changed
+2349
-2316
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
171 | 182 | | |
172 | 183 | | |
173 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
396 | 406 | | |
397 | 407 | | |
398 | 408 | | |
| |||
542 | 552 | | |
543 | 553 | | |
544 | 554 | | |
545 | | - | |
546 | | - | |
547 | 555 | | |
548 | 556 | | |
549 | 557 | | |
550 | 558 | | |
551 | 559 | | |
552 | 560 | | |
553 | 561 | | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
| 562 | + | |
558 | 563 | | |
559 | 564 | | |
560 | 565 | | |
| |||
0 commit comments