Documentation
¶
Index ¶
- Constants
- func BuildAnalyzingStatus() []int
- func BuildDocErrMessage(status int) string
- func BuildDocReqStatusList(status int) []int
- func BuildDocRespStatus(number int) int
- func BuildFilePath(fileDir, fileExt string) string
- func DivideAndRemainder(dividend, divisor int) (quotient, remainder int)
- func ErrCode(code err_code.Code) error
- func ErrStatus(code err_code.Code, status *err_code.Status) error
- func FileEOF(err error) bool
- func GetPageTotal(len, pageSize int) int
- func HasDuplicate(a, b []string) bool
- func HasIntersection(arr1, arr2 []string) bool
- func InLst(item string, lst []string) bool
- func Intersection[T comparable](slice1, slice2 []T) []T
- func JSONParse[T any](jsonStr string, target *T) error
- func MD5(params string) string
- func ReadExcelColumn(filePath string, columnNo int) ([]string, error)
- func ReplaceLast(s, old, new string) string
- func Reverse[T any](lst []T)
- func StrToBool(str string) bool
- func ToErrStatus(key string, args ...string) *err_code.Status
- func UUID() string
- func UrlNameFilter(old string) string
Constants ¶
View Source
const ( KnowledgeImportFileFormatErr = "know_doc_unsupported_file_format" KnowledgeImportFileSizeErr = "know_doc_file_size_exceed" KnowledgeImportSameNameErr = "know_same_name_validation_fail" KnowledgeDocLastFailureErr = "know_doc_last_failure_info" KnowledgeDocParsingServiceErr = "know_doc_parsing_service_error" KnowledgeDocVectorDuplicateErr = "know_doc_vector_duplicate_error" KnowledgeDocDuplicateErr = "know_doc_duplicate_error" KnowledgeDocDownloadErr = "know_doc_download_error" KnowledgeDocSplitErr = "know_doc_split_error" KnowledgeDocEmbeddingErr = "know_doc_embedding_error" KnowledgeDocTextErr = "know_doc_text_error" KnowledgeDocEmptyFileContentErr = "know_doc_empty_file_content" KnowledgeDocFileUnUsableErr = "know_doc_file_unusable" )
Variables ¶
This section is empty.
Functions ¶
func BuildAnalyzingStatus ¶
func BuildAnalyzingStatus() []int
func BuildDocReqStatusList ¶
func BuildDocRespStatus ¶
BuildDocRespStatus rag 1.0 状态码和rag 2.0状态码转换关系如下: rag 2.0 ---> rag 1.0 1 ---> 1 10 ---> 1 2 ---> 2 31-35 ---> 3 4 ---> 4 51-56 ---> 5 61-69 ---> 5
func BuildFilePath ¶
func DivideAndRemainder ¶
int型除法。第一返回值为商,第二为余
func HasDuplicate ¶ added in v0.1.4
HasDuplicate 判断两个数组是否有交集时间复杂度o(m*n)
func HasIntersection ¶ added in v0.1.6
HasIntersection 判断两个数组是否有交集时间复杂度o(m+n)
func Intersection ¶
func Intersection[T comparable](slice1, slice2 []T) []T
Intersection 函数用于找出两个可比较类型切片的交集。
func ReplaceLast ¶
func UrlNameFilter ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.