Group A — gap fills: - restore Client.GetWorkflowWorkerInfo (regression from v1.3.0; /v1/workflows/workers/whoami is still in the spec and is needed by callers running custom workers) - add Client.GetChatCompletionFields, GetChatCompletionFieldOptions, GetChatCompletionFieldOptionsCounts (previously-missing observability fields API) Group B — Python SDK v2.3.0..v2.4.3 sync: - workflow.EncodedPayloadOption typed enum (offloaded / encrypted / encrypted-partial); replaces []string on NetworkEncodedInput.EncodingOptions. Wire-compatible refinement; source-incompatible for callers that built the slice as []string literals. - workflow-connector integration: ConnectorSlot, ConnectorBindings, ConnectorExtensions, WorkflowExtensions, BuildConnectorExtensions(...) helper, ConnectorAuthTaskState, ConnectorAuthStatus constants. New Extensions map[string]any field on workflow.ExecutionRequest. - HITL confirmation constants: conversation.Confirmation enum (ConfirmationAllow/Deny) and ConfirmationStatusPending/Allowed/Denied alongside the pre-existing ToolCallConfirmation type and tool_confirmations field. No-op verification: - ChatCompletionChoice.message remains singular per spec v1.0.0; Python's 'messages[]' rename was internal SDK shape, not wire format. Tests: 297 (was 284), all green. go vet clean.
21 lines
623 B
Go
21 lines
623 B
Go
package mistral
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/VikingOwl91/mistral-go-sdk/workflow"
|
|
)
|
|
|
|
// GetWorkflowWorkerInfo returns the scheduler URL, namespace, and TLS setting
|
|
// the API expects custom workers to connect with.
|
|
//
|
|
// Most callers using managed deployments do not need this — see
|
|
// Registration.DeploymentID. It is exposed for users running custom workers.
|
|
func (c *Client) GetWorkflowWorkerInfo(ctx context.Context) (*workflow.WorkerInfo, error) {
|
|
var resp workflow.WorkerInfo
|
|
if err := c.doJSON(ctx, "GET", "/v1/workflows/workers/whoami", nil, &resp); err != nil {
|
|
return nil, err
|
|
}
|
|
return &resp, nil
|
|
}
|