Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = cli.Command{
Name: "completion",
Action: cmdCompletion,
Flags: []cli.Flag{
flagModel,
flagPrompt,
flagN,
flagStop,
flagEcho,
flagUser,
},
}
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { Model string `json:"model"` Prompt string `json:"prompt"` Suffix *string `json:"suffix"` MaxTokens int `json:"max_tokens"` Temperature int `json:"temperature"` TopP int `json:"top_p"` N int `json:"n"` Stream bool `json:"stream"` Logprobs *int `json:"logprobs"` Echo bool `json:"echo"` Stop string `json:"stop,omitempty"` PresencePenalty float64 `json:"presence_penalty"` BestOf int `json:"best_of"` LogitBias map[string]int `json:"logit_bias,omitempty"` User string `json:"user"` }
type Response ¶
type Response struct { ID string `json:"id"` Object string `json:"object"` Created int `json:"created"` Model string `json:"model"` Choices []Choice `json:"choices"` Usage struct { PromptTokens int `json:"prompt_tokens"` CompletionTokens int `json:"completion_tokens"` TotalTokens int `json:"total_tokens"` } `json:"usage"` }
Click to show internal directories.
Click to hide internal directories.