Runtime-independent typed LLM nodes for workgraph
Dependencies
import {
"totto2727/workgraph-llm"
}moon run package/workgraph-llm/src/examples/basicpub struct LlmNodeSpec[S, P] {
provider : BoxedProvider
build_request : (NodeContext, S) -> LlmRequest raise
decode_response : (S, CollectResult) -> NodeOutput[P] raise
}fn[S, P] LlmNodeSpec::LlmNodeSpec(provider : BoxedProvider, build_request : (NodeContext, S) -> LlmRequest raise, decode_response : (S, CollectResult) -> NodeOutput[P] raise) -> LlmNodeSpec[S, P]Runtime-independent typed LLM nodes for workgraph
Dependencies