We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd7ecc3 commit f36b618Copy full SHA for f36b618
packages/toolbox-core/src/toolbox_core/tool.py
@@ -335,13 +335,18 @@ async def resolve_value(
335
"""
336
Asynchronously or synchronously resolves a given source to its value.
337
338
+ If the `source` is a coroutine function, it will be awaited.
339
+ If the `source` is a regular callable, it will be called.
340
+ Otherwise (if it's not a callable), the `source` itself is returned directly.
341
+
342
Args:
343
source: The value, a callable returning a value, or a callable
344
returning an awaitable value.
345
346
Returns:
347
The resolved value.
348
349
350
if asyncio.iscoroutinefunction(source):
351
return await source()
352
elif callable(source):
0 commit comments