Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeURL added in v0.1.7

func NormalizeURL(apiURL string) string

NormalizeURL strips a trailing "/api/v1" suffix (with or without a trailing slash) so that the SDK — which appends "api/v1" itself — does not double it. Self-hosted users commonly set LANGSMITH_ENDPOINT to "https://host/api/v1".

Types

type Client

type Client struct {
	SDK *langsmith.Client
	// contains filtered or unexported fields
}

Client wraps the LangSmith Go SDK and provides helpers for raw HTTP calls.

func New

func New(apiKey, apiURL string) *Client

New creates a new Client.

func (*Client) RawDelete

func (c *Client) RawDelete(ctx context.Context, path string, result any) error

RawDelete performs a DELETE request to the LangSmith API.

func (*Client) RawGet

func (c *Client) RawGet(ctx context.Context, path string, result any) error

RawGet performs a GET request to the LangSmith API.

func (*Client) RawPost

func (c *Client) RawPost(ctx context.Context, path string, body any, result any) error

RawPost performs a POST request to the LangSmith API.

func (*Client) ResolveSessionID

func (c *Client) ResolveSessionID(ctx context.Context, projectName string) (string, error)

ResolveSessionID resolves a project name to its session UUID, with caching.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL