Skip to content

Class Tryll::Client::GraphDescription

ClassList > Tryll > Client > GraphDescription

Fluent builder for a workflow graph description sent to the server. More...

  • #include <GraphDescription.h>

Classes

Type Name
struct NodeDesc
Internal serialisable description of one node.

Public Functions

Type Name
GraphDescription & AddCannedResponse (std::string name, ::Tryll::NodeParams::CannedResponseParamsT params)
GraphDescription & AddClassifyIntent (std::string name, ::Tryll::NodeParams::ClassifyIntentParamsT params)
GraphDescription & AddClassifyIntentLLM (std::string name, ::Tryll::NodeParams::ClassifyIntentLLMParamsT params)
GraphDescription & AddGenerate (std::string name, ::Tryll::NodeParams::GenerateParamsT params)
GraphDescription & AddHumanMessageGuardrail (std::string name, ::Tryll::NodeParams::HumanMessageGuardrailParamsT params)
GraphDescription & AddInstruction (std::string name, ::Tryll::NodeParams::InstructionParamsT params)
GraphDescription & AddIntentToInstruction (std::string name, ::Tryll::NodeParams::IntentToInstructionParamsT params)
GraphDescription & AddRetrieve (std::string name, ::Tryll::NodeParams::RetrieveParamsT params)
GraphDescription & AddToolCall (std::string name, ::Tryll::NodeParams::ToolCallParamsT params)
const std::string & GetDefaultModelName () noexcept const
const std::vector< NodeDesc > & GetNodes () noexcept const
const std::string & GetStartNode () noexcept const
GraphDescription & SetDefaultModelName (std::string name)
Set the fallback model name for nodes that do not specify model_name.
GraphDescription & SetStartNode (std::string name)

Detailed Description

Typical usage:

using namespace Tryll::NodeParams;
auto graph = Tryll::Client::GraphDescription{}
    .AddGenerate("gen", GenerateParamsT{.model_name="qwen2.5-0.5b-instruct",
                                       .system_prompt="You are helpful."})
    .SetStartNode("gen");

Public Functions Documentation

function AddCannedResponse

GraphDescription & Tryll::Client::GraphDescription::AddCannedResponse (
    std::string name,
    ::Tryll::NodeParams::CannedResponseParamsT params
) 

function AddClassifyIntent

GraphDescription & Tryll::Client::GraphDescription::AddClassifyIntent (
    std::string name,
    ::Tryll::NodeParams::ClassifyIntentParamsT params
) 

function AddClassifyIntentLLM

GraphDescription & Tryll::Client::GraphDescription::AddClassifyIntentLLM (
    std::string name,
    ::Tryll::NodeParams::ClassifyIntentLLMParamsT params
) 

function AddGenerate

GraphDescription & Tryll::Client::GraphDescription::AddGenerate (
    std::string name,
    ::Tryll::NodeParams::GenerateParamsT params
) 

function AddHumanMessageGuardrail

GraphDescription & Tryll::Client::GraphDescription::AddHumanMessageGuardrail (
    std::string name,
    ::Tryll::NodeParams::HumanMessageGuardrailParamsT params
) 

function AddInstruction

GraphDescription & Tryll::Client::GraphDescription::AddInstruction (
    std::string name,
    ::Tryll::NodeParams::InstructionParamsT params
) 

function AddIntentToInstruction

GraphDescription & Tryll::Client::GraphDescription::AddIntentToInstruction (
    std::string name,
    ::Tryll::NodeParams::IntentToInstructionParamsT params
) 

function AddRetrieve

GraphDescription & Tryll::Client::GraphDescription::AddRetrieve (
    std::string name,
    ::Tryll::NodeParams::RetrieveParamsT params
) 

function AddToolCall

GraphDescription & Tryll::Client::GraphDescription::AddToolCall (
    std::string name,
    ::Tryll::NodeParams::ToolCallParamsT params
) 

function GetDefaultModelName

inline const std::string & Tryll::Client::GraphDescription::GetDefaultModelName () noexcept const

function GetNodes

inline const std::vector< NodeDesc > & Tryll::Client::GraphDescription::GetNodes () noexcept const

function GetStartNode

inline const std::string & Tryll::Client::GraphDescription::GetStartNode () noexcept const

function SetDefaultModelName

Set the fallback model name for nodes that do not specify model_name.

GraphDescription & Tryll::Client::GraphDescription::SetDefaultModelName (
    std::string name
) 


function SetStartNode

GraphDescription & Tryll::Client::GraphDescription::SetStartNode (
    std::string name
) 


The documentation for this class was generated from the following file C:/_tryll/_monorepo2/server/client-cpp/include/tryll/GraphDescription.h