Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeSnippet ¶
type CodeSnippet struct { CodeLanguage string SelectedCode string Truncated bool // if there are too many changes, we have to truncate the content according to the model context UserLang string // contains filtered or unexported fields }
CodeSnippet 最小 review 单元为 CodeSnippet 1. 当用户选择了一段代码,这本身就是 CodeSnippet 2. 用户选择了一个文件,那么会有多个 CodeSnippet 3. 用户选择整个 mrReviewer,那么需要有多个 CodeSnippet
func (CodeSnippet) CodeReview ¶
func (cs CodeSnippet) CodeReview(i18n i18n.Translator, lang i18n.LanguageCodes, aiSessionID string) string
func (CodeSnippet) GetMarkdownCode ¶
func (cs CodeSnippet) GetMarkdownCode() string
type PromptStruct ¶
type PromptStruct = struct {
Messages []openai.ChatCompletionMessage `yaml:"messages"`
}
Click to show internal directories.
Click to hide internal directories.