Public discoverability on pkg.go.dev. Also fixes stream tool call test fixture to match real Mistral API responses (finish_reason, usage).
17 lines
418 B
Go
17 lines
418 B
Go
package mistral
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/VikingOwl91/mistral-go-sdk/workflow"
|
|
)
|
|
|
|
// GetWorkflowWorkerInfo retrieves information about the current worker.
|
|
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
|
|
}
|