Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2024 Changes in this version + const AIGeneratedLevel2TestSetNamePrefix + const AIGeneratedTestSetName + const I18nLang_en_US + const I18nLang_zh_CN + const Name + const OperationTypeGenerate + const OperationTypeSave + var GroupMessages json.RawMessage + var GroupSchema json.RawMessage + var Schema json.RawMessage + func GenerateGroupsForRequirements(ctx context.Context, requirements []*apistructs.Issue, openaiURL *url.URL, ...) (requirementIdToGroups map[uint64][]string, err error) + func New(ctx context.Context, prompt string, background *pb.Background) functions.Function + type AICreateTestCasesResult struct + IsSaveTestCasesSave bool + TestCases interface{} + TestSetsInfo TestcasesDirsInfo + type Function struct + func (f *Function) Callback(ctx context.Context, arguments json.RawMessage, input interface{}) (any, error) + func (f *Function) CompletionOptions() []sdk.PatchOption + func (f *Function) Description() string + func (f *Function) Handler(ctx context.Context, factory functions.FunctionFactory, req *pb.ApplyRequest, ...) (any, error) + func (f *Function) Name() string + func (f *Function) RequestOptions() []sdk.RequestOption + func (f *Function) Schema() (json.RawMessage, error) + func (f *Function) SystemMessage(lang string) string + func (f *Function) UserMessage() string + type FunctionParams struct + Requirements []TestCaseParam + SystemPrompt string + TestSetID uint64 + type GroupList struct + List []string + type MessageByLanguage struct + GenerateGroup string + GenerateTC string + GroupContent string + TaskContent string + type RequireTestCaseIndex struct + RequirementIndex int + TestCaseIndex int + type RequirementGroup struct + Groups []string + ID int64 + type SubDirs struct + Count int + Dir string + RequirementID uint64 + SubDirs []SubDirs + type TestCaseCreateRequestList struct + List []apistructs.TestCaseCreateRequest + type TestCaseFunctionInput struct + IssueID uint64 + Name string + ProjectId uint64 + Prompt string + TestSetID uint64 + TestSetParentDir string + TestSetParentID uint64 + UserId string + type TestCaseParam struct + IssueID uint64 + ParentTestSetDir string + ParentTestSetID uint64 + Prompt string + Reqs []apistructs.TestCaseCreateRequest + type TestcasesDirsInfo struct + RootDir string + SubDirs []SubDirs