Class: Telnyx::Models::AI::ConversationFlowReq::Node::Prompt

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/ai/conversation_flow_req.rb

Defined Under Namespace

Modules: InstructionsMode, ToolsMode, Type

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, instructions:, external_llm: nil, instructions_mode: nil, llm_api_key_ref: nil, model: nil, name: nil, position: nil, shared_tool_ids: nil, tools_mode: nil, transcription: nil, type: nil, voice_settings: nil) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::AI::ConversationFlowReq::Node::Prompt for more details.

One step in a conversation flow, as supplied by API clients.

Each node carries the prompt, tool scope, and optional overrides for model/voice/transcription. Unset overrides cascade from the assistant.

Parameters:

  • id (String)

    Caller-supplied unique identifier for this node within the flow.

  • instructions (String)

    Prompt that drives the LLM while this node is active. Required.

  • external_llm (Telnyx::Models::AI::ExternalLlmReq) (defaults to: nil)

    Override for ‘Assistant.external_llm` while this node is active. Use this to rou

  • instructions_mode (Symbol, Telnyx::Models::AI::ConversationFlowReq::Node::Prompt::InstructionsMode) (defaults to: nil)

    How ‘instructions` combine with the assistant-level instructions. `replace` (def

  • llm_api_key_ref (String) (defaults to: nil)

    Override for ‘Assistant.llm_api_key_ref` while this node is active. Part of the

  • model (String) (defaults to: nil)

    Override for ‘Assistant.model` while this node is active. Part of the LLM bundle

  • name (String) (defaults to: nil)

    Optional human-readable label, displayed in authoring UIs.

  • position (Telnyx::Models::AI::NodePosition) (defaults to: nil)

    Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored

  • shared_tool_ids (Array<String>) (defaults to: nil)

    IDs of shared (org-level) tools available at this node. Knowledge bases are atta

  • tools_mode (Symbol, Telnyx::Models::AI::ConversationFlowReq::Node::Prompt::ToolsMode) (defaults to: nil)

    How ‘shared_tool_ids` combine with the assistant-level tool set. `replace` (defa

  • transcription (Telnyx::Models::AI::TranscriptionSettings) (defaults to: nil)

    Per-node transcription override (model/language/region). Unset fields cascade fr

  • type (Symbol, Telnyx::Models::AI::ConversationFlowReq::Node::Prompt::Type) (defaults to: nil)

    Node kind discriminator. ‘prompt` (default) is an LLM-driven step; `tool` is a s

  • voice_settings (Telnyx::Models::AI::VoiceSettings) (defaults to: nil)

    Per-node voice override. Only fields set here override the assistant-level voice



# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 171

Instance Attribute Details

#external_llmTelnyx::Models::AI::ExternalLlmReq?

Override for ‘Assistant.external_llm` while this node is active. Use this to route a node’s turns to a different external LLM (different ‘model`, `base_url`, credentials). Part of the LLM bundle — see `model` for cascade semantics. Mutually exclusive with `model` on the node (a single LLM identity per node).



93
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 93

optional :external_llm, -> { Telnyx::AI::ExternalLlmReq }

#idString

Caller-supplied unique identifier for this node within the flow.

Returns:

  • (String)


78
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 78

required :id, String

#instructionsString

Prompt that drives the LLM while this node is active. Required.

Returns:

  • (String)


84
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 84

required :instructions, String

#instructions_modeSymbol, ...

How ‘instructions` combine with the assistant-level instructions. `replace` (default): the node’s instructions are used alone. ‘append`: the node’s instructions are concatenated after the assistant’s instructions.



101
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 101

optional :instructions_mode, enum: -> { Telnyx::AI::ConversationFlowReq::Node::Prompt::InstructionsMode }

#llm_api_key_refString?

Override for ‘Assistant.llm_api_key_ref` while this node is active. Part of the LLM bundle — see `model` for cascade semantics.

Returns:

  • (String, nil)


108
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 108

optional :llm_api_key_ref, String

#modelString?

Override for ‘Assistant.model` while this node is active. Part of the LLM bundle (`model` + `llm_api_key_ref` + `external_llm`): when any of the three is set on the node, all three are taken from the node and the assistant-level LLM identity is not consulted. When none of the three is set, the assistant’s bundle cascades unchanged.

Returns:

  • (String, nil)


118
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 118

optional :model, String

#nameString?

Optional human-readable label, displayed in authoring UIs.

Returns:

  • (String, nil)


124
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 124

optional :name, String

#positionTelnyx::Models::AI::NodePosition?

Optional canvas coordinates used by authoring UIs to lay out the graph. Ignored by the runtime; round-trips so frontends can persist graph layout across reloads.



132
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 132

optional :position, -> { Telnyx::AI::NodePosition }

#shared_tool_idsArray<String>?

IDs of shared (org-level) tools available at this node. Knowledge bases are attached the same way — via a shared retrieval tool. Tools not listed here are not callable while this node is active.

Returns:

  • (Array<String>, nil)


140
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 140

optional :shared_tool_ids, Telnyx::Internal::Type::ArrayOf[String]

#tools_modeSymbol, ...

How ‘shared_tool_ids` combine with the assistant-level tool set. `replace` (default): only the node’s tools are callable. ‘append`: the node’s tools are added to the assistant’s tools. Ignored when ‘shared_tool_ids` is null.



148
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 148

optional :tools_mode, enum: -> { Telnyx::AI::ConversationFlowReq::Node::Prompt::ToolsMode }

#transcriptionTelnyx::Models::AI::TranscriptionSettings?

Per-node transcription override (model/language/region). Unset fields cascade from the assistant-level transcription.



155
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 155

optional :transcription, -> { Telnyx::AI::TranscriptionSettings }

#typeSymbol, ...

Node kind discriminator. ‘prompt` (default) is an LLM-driven step; `tool` is a standalone tool execution (see `ToolNodeReq`).



162
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 162

optional :type, enum: -> { Telnyx::AI::ConversationFlowReq::Node::Prompt::Type }

#voice_settingsTelnyx::Models::AI::VoiceSettings?

Per-node voice override. Only fields set here override the assistant-level voice settings; unset fields cascade.



169
# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 169

optional :voice_settings, -> { Telnyx::AI::VoiceSettings }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/ai/conversation_flow_req.rb', line 217