MCPcopy Create free account
hub / github.com/google/adk-python / _invoke_callable_or_raise

Function _invoke_callable_or_raise

src/google/adk/cli/fast_api.py:804–815  ·  view source on GitHub ↗
(
        invocation_callable: Callable[..., Any],
        invocation_payload: dict[str, Any],
    )

Source from the content-addressed store, hash-verified

802 yield encoded_chunk
803
804 async def _invoke_callable_or_raise(
805 invocation_callable: Callable[..., Any],
806 invocation_payload: dict[str, Any],
807 ) -> Any:
808 if inspect.iscoroutinefunction(invocation_callable):
809 return await invocation_callable(**invocation_payload)
810 elif inspect.isasyncgenfunction(invocation_callable):
811 return invocation_callable(**invocation_payload)
812 else:
813 return await run_in_threadpool(
814 invocation_callable, **invocation_payload
815 )
816
817 # Implement a FastAPI middleware to extract and attach OpenTelemetry trace
818 # context from a custom Google-Agent-Engine-Traceparent header in incoming

Callers 2

queryFunction · 0.85
stream_queryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected