Versions in this module Expand all Collapse all v0 v0.5.0 Jun 24, 2024 Changes in this version + var ErrNoChoices = errors.New("no choices in chat completion") + var ErrPromptRequired = errors.New("prompt is required") + func GetDiffSize(leftText, rightText string) (bool, int, int) + func GetInputText(inputFilePath string) (string, error) + func GetPromptText(prompt, promptPath string) (string, error) + func Print(outputText, inputText string, useDiff bool) + func WriteResult(outputText, outpath string) error + type ShapePrompt string + type ShapeResult struct + ChatCompletion *openai.ChatCompletion + Prompt string + RawResult string + Result string + func NewShapeResult(prompt string, chatCompletion *openai.ChatCompletion, rawResult, result string) *ShapeResult + type Shaper struct + func NewShaper(gai openai.GenerativeAIClient, maxCompletionRepeatCount int, ...) *Shaper + func (s *Shaper) MakeShapePrompt(inputFilePath, promptOrg, inputOrg string) ShapePrompt + func (s *Shaper) Shape(ctx context.Context, prompt ShapePrompt) (*ShapeResult, error)