MCPcopy Create free account
hub / github.com/promptfoo/promptfoo / call_method

Function call_method

src/python/persistent_wrapper.py:168–173  ·  view source on GitHub ↗

Call the method, handling both sync and async functions.

(method_callable, args)

Source from the content-addressed store, hash-verified

166
167
168def call_method(method_callable, args):
169 """Call the method, handling both sync and async functions."""
170 if inspect.iscoroutinefunction(method_callable):
171 return asyncio.run(method_callable(*args))
172 else:
173 return method_callable(*args)
174
175
176def _truncate_body(text, max_length=4096):

Callers 1

_traced_callFunction · 0.70

Calls 1

runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…