Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartCommanderCodex ¶
Types ¶
type CmdrCodex ¶
type CmdrCodex struct {
// contains filtered or unexported fields
}
func NewCmdrCodex ¶
func NewCmdrCodex(codexApi OpenApiCodex) *CmdrCodex
type CodexApi ¶
type CodexApi struct {
// contains filtered or unexported fields
}
func (*CodexApi) GetCodexSuggestion ¶
type CodexApiMock ¶
type CodexApiMock struct {
// contains filtered or unexported fields
}
func (*CodexApiMock) GetCodexSuggestion ¶
func (c *CodexApiMock) GetCodexSuggestion(ctx context.Context, prompt string) (suggestion CodexSuggestion, err error)
type CodexRequest ¶
type CodexSuggestion ¶
type CodexSuggestion struct { ID string `json:"id"` Object string `json:"object"` Created int `json:"created"` Model string `json:"model"` Choices []struct { Text string `json:"text"` Index int `json:"index"` Logprobs interface{} `json:"logprobs"` FinishReason string `json:"finish_reason"` } `json:"choices"` Usage struct { PromptTokens int `json:"prompt_tokens"` CompletionTokens int `json:"completion_tokens"` TotalTokens int `json:"total_tokens"` } `json:"usage"` }
type OpenApiCodex ¶
type OpenApiCodex interface {
GetCodexSuggestion(ctx context.Context, prompt string) (suggestion CodexSuggestion, err error)
}
func NewCodexApi ¶
func NewCodexApi(apiKey string) OpenApiCodex
func NewCodexApiMock ¶
func NewCodexApiMock(apiKey string) OpenApiCodex
Click to show internal directories.
Click to hide internal directories.