Documentation ¶
Overview ¶
Package localclient provides a client for local LLMs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyResponse = errors.New("empty response")
ErrEmptyResponse is returned when the OpenAI API returns an empty response.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a client for a local LLM.
func (*Client) CreateCompletion ¶
func (c *Client) CreateCompletion(ctx context.Context, r *CompletionRequest) (*Completion, error)
CreateCompletion creates a completion.
type CompletionRequest ¶
type CompletionRequest struct {
Prompt string `json:"prompt"`
}
CompletionRequest is a request to create a completion.
Click to show internal directories.
Click to hide internal directories.