MCPcopy Create free account
hub / github.com/LLMQuant/quant-mind / preview_resolve

Function preview_resolve

quantmind/magic.py:101–115  ·  view source on GitHub ↗

Resolve and pretty-print the result without invoking the flow.

(
    natural_language: str,
    *,
    target_flow: Callable[..., Awaitable[Any]],
    resolver_model: str = "gpt-4o-mini",
)

Source from the content-addressed store, hash-verified

99 name=f"magic_resolver_{target_flow.__name__}",
100 instructions=instructions,
101 model=resolver_model,
102 output_type=ResolvedFlowConfig[input_type, cfg_type], # type: ignore[valid-type]
103 )
104 result = await Runner.run(resolver, natural_language)
105 out = result.final_output
106 return out.input_obj, out.cfg_obj
107
108
109async def preview_resolve(
110 natural_language: str,
111 *,
112 target_flow: Callable[..., Awaitable[Any]],
113 resolver_model: str = "gpt-5.6-luna",
114) -> tuple[Any, Any]:
115 """Resolve and pretty-print the result without invoking the flow."""
116 inp, cfg = await resolve_magic_input(
117 natural_language,
118 target_flow=target_flow,

Callers 1

Calls 1

resolve_magic_inputFunction · 0.85

Tested by 1