nsmcp::ChatCompletionsRun method pollJob (public)
<instance of nsmcp::ChatCompletionsRun> pollJob handle
Defined in /usr/local/ns/tcl/nsmcp/question-chat-completions.tcl
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.
Source code: if {${:pins} eq {}} { error "Question tools are not pinned" } :check set context [:context] try { set result [[${:backend} cget -registry] call $context [${:backend} cget -authorizer] log_results [list {} object [list jobHandle string $handle]]] return [ns_json value -- $result] } finally { $context destroy }XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)