Documentation ¶
Index ¶
Constants ¶
View Source
const ( HumanPrompt = "\n\nHuman:" AIPrompt = "\n\nAssistant:" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Complete ¶
func (c *Client) Complete(ctx context.Context, request *CompletionRequest) (*CompletionResponse, error)
type CompletionRequest ¶
type CompletionRequest struct { Prompt string `json:"prompt"` Temperature float64 `json:"temperature,omitempty"` MaxTokens int `json:"max_tokens_to_sample"` Stop []string `json:"stop_sequences"` TopK int `json:"top_k,omitempty"` TopP float64 `json:"top_p,omitempty"` Model string `json:"model"` Tags map[string]string `json:"tags,omitempty"` Stream bool `json:"stream"` }
type CompletionResponse ¶
Click to show internal directories.
Click to hide internal directories.