You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dspy.asyncify is a good start but it doesn't feel idiomatic. Would be cool if we had an AsyncModule where the forward method is async or alternatively add an aforward method to dspy.Module. The reason this would be useful is
The user will be able to control parallelization inside their Module's forward and
This will enable async tool calls with dspy.ReAct for example
Better integration with async frameworks such as FastAPI etc..
At the moment, using dspy.asyncify on a Module doesn't allow easy async programming inside the forward method because you can't use the await keyword, you have to resort to interacting with the active asyncio loop etc..
The text was updated successfully, but these errors were encountered:
itay1542
changed the title
Async support in dspy.ReAct
Better async support
Dec 22, 2024
dspy.asyncify
is a good start but it doesn't feel idiomatic. Would be cool if we had an AsyncModule where theforward
method is async or alternatively add anaforward
method todspy.Module
. The reason this would be useful isModule
's forward anddspy.ReAct
for exampleAt the moment, using
dspy.asyncify
on a Module doesn't allow easy async programming inside the forward method because you can't use theawait
keyword, you have to resort to interacting with the active asyncio loop etc..The text was updated successfully, but these errors were encountered: