(
invocation_callable: Callable[..., Any],
invocation_payload: dict[str, Any],
)
| 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 |
no outgoing calls
no test coverage detected