httpclient

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an llm toolkit HTTP client that wraps the base HTTP client and provides typed methods for interacting with the llm toolkit API.

func New

func New(url string, opts ...client.ClientOpt) (*Client, error)

New creates a new llm toolkit HTTP client with the given base URL and options. The url parameter should point to the shared API endpoint (the same one the registry, filer and credential clients use), e.g. "http://localhost:8080/api" - each method includes its own "llm/..." path segment, matching how httphandler registers its routes.

func (*Client) CallTool

func (c *Client) CallTool(ctx context.Context, name string, input json.RawMessage) (json.RawMessage, error)

CallTool runs the tool with the canonical name, such as "weatherapi:current", with the input, which may be empty, and returns its result as JSON, or nil when the tool has no result

func (*Client) GetTool

func (c *Client) GetTool(ctx context.Context, name string) (*schema.Tool, error)

GetTool returns the tool with the name, which is its canonical name, such as "weatherapi:current", or its name without a namespace, when only one namespace has a tool with the name

func (*Client) ListTools

func (c *Client) ListTools(ctx context.Context, req schema.ToolListRequest) (*schema.ToolList, error)

ListTools returns the tools matching the request, in order of canonical name, with the total number matching

Jump to

Keyboard shortcuts

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