Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultOpenAiEndpoint = "https://api.openai.com/v1/chat/completions"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AiSuggestionRequest ¶
type AiSuggestionResponse ¶
type AiSuggestionResponse struct {
Suggestions []string `json:"suggestions"`
}
type OpenAiUsage ¶
type OpenAiUsage struct { PromptTokens int `json:"prompt_tokens"` CompletionTokens int `json:"completion_tokens"` TotalTokens int `json:"total_tokens"` }
func GetAiSuggestionsViaOpenAiApi ¶
func GetAiSuggestionsViaOpenAiApi(apiEndpoint, query, shellName, osName, overriddenOpenAiModel string, numberCompletions int) ([]string, OpenAiUsage, error)
Click to show internal directories.
Click to hide internal directories.