Class ::nsmcp::ChatCompletionsRun

::nsmcp::ChatCompletionsRun[i] create ... \
           [ -backend:required backend:required ] \
           [ -calls (default "") ] \
           [ -content (default "") ] \
           [ -deadline deadline ] \
           [ -done (default "false") ] \
           [ -emit:required emit:required ] \
           [ -eventData (default "") ] \
           [ -finish (default "") ] \
           [ -firstLine (default "true") ] \
           [ -hasReasoning (default "false") ] \
           [ -lineBuffer (default "") ] \
           [ -pins (default "") ] \
           [ -reasoning (default "") ] \
           [ -requestUsage (default "") ] \
           [ -requestsStarted (default "0") ] \
           [ -requestsWithUsage (default "0") ] \
           [ -toolCount (default "0") ] \
           [ -usageTotals (default "") ]

Defined in /usr/local/ns/tcl/nsmcp/question-chat-completions.tcl

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::nsmcp::Object[i]

Methods (to be applied on instances)

  • pollJob (scripted, public)

     <instance of nsmcp::ChatCompletionsRun[i]> pollJob handle

    Poll a background tool job using this question's pinned inventory. Check cancellation and the deadline before invoking the permitted result tool.

    Parameters:
    handle (required)
    Retained job or conversation handle; ownership and expiry checks still apply.
    Returns:
    Serialized JSON for the background job's current result.

    Testcases:
    No testcase defined.
  • run (scripted, public)

     <instance of nsmcp::ChatCompletionsRun[i]> run question state

    Run one streaming chat-completions question turn. Enforce request, tool and evidence limits while emitting text and tool events and retaining valid continuation state.

    Parameters:
    question (required)
    Question text supplied to the selected provider.
    state (required)
    Opaque retained provider continuation or scan state.
    Returns:
    The status complete or cancelled; failures raise an error.

    Testcases:
    No testcase defined.