Discover Packages
github.com/lunarxlark/openai-cli
cmd
edit
package
Version:
v0.0.0-...-da38182
Opens a new window with list of versions in this module.
Published: May 6, 2023
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
var Command = cli.Command{
Name: "edit",
Action: cmdEdit,
Flags: []cli.Flag{
flagModel,
flagInput,
flagInstruction,
flagN,
flagTemperature,
flagTopP,
},
}
type Choice struct {
Text string `json:"text"`
Index int `json:"index"`
}
type Request struct {
Model string `json:"model"`
Input string `json:"input"`
Instruction string `json:"instruction"`
N int `json:"n"`
Temperature float64 `json:"temperature"`
TopP float64 `json:"top_p"`
}
type Response struct {
Object string `json:"object"`
Created int `json:"created"`
Choices []Choice `json:"choices"`
Usage Usage `json:"usage"`
}
type Usage struct {
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.