MCPcopy
hub / github.com/mudler/LocalAI / Client

Struct Client

pkg/mcp/localaitools/httpapi/client.go:30–35  ·  view source on GitHub ↗

Client is a thin REST wrapper. It maps each LocalAIClient method to the matching admin endpoint. Errors from non-2xx responses include the body for the MCP layer to surface verbatim to the LLM.

Source from the content-addressed store, hash-verified

28// matching admin endpoint. Errors from non-2xx responses include the body for
29// the MCP layer to surface verbatim to the LLM.
30type Client struct {
31 BaseURL string
32 APIKey string
33
34 HTTPClient *http.Client
35}
36
37// New returns a Client targeting baseURL with an optional bearer token.
38func New(baseURL, apiKey string) *Client {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected