Go SDK

HELM カーネル用の Go クライアント — 型指定された理由コードを備えた高パフォーマンス。

Go SDK

You may not need the SDK. Any HTTP client pointing to localhost:8080 works — see the Quickstart. The SDK adds typed Go bindings.

The Go SDK ships in-repo at sdk/go/.

Install

go get github.com/Mindburn-Labs/helm-oss/sdk/go

Usage

import helm "github.com/Mindburn-Labs/helm-oss/sdk/go/client"

c := helm.New("http://localhost:8080")

res, err := c.ChatCompletions(helm.ChatCompletionRequest{
    Model:    "gpt-4",
    Messages: []helm.ChatMessage{{Role: "user", Content: "List /tmp"}},
})

if apiErr, ok := err.(*helm.HelmApiError); ok {
    fmt.Println("Denied:", apiErr.ReasonCode) // DENY_TOOL_NOT_FOUND
}

Next steps