Skip to main content

liteforge

函数名函数描述/介绍
liteforge.AnalyzeAudioFile
liteforge.AnalyzeERM
liteforge.AnalyzeFile
liteforge.AnalyzeImage
liteforge.AnalyzeImageFile
liteforge.AnalyzeVideo
liteforge.Execute
liteforge.Refine
liteforge.actionliteforge.action is an option for liteforge.Execute it sets the action type for the liteforge execution, example: ``` liteforge.Execute(<<<P...
liteforge.analyzeCtx
liteforge.analyzeLog
liteforge.analyzeStatusCard
liteforge.contextliteforge.context is an option for liteforge.Execute it sets the context for the liteforge execution example: ``` liteforge.Execute(<<<PROMP...
liteforge.forceImageliteforge.forceImage is an option for liteforge.Execute it forces the execution to require image input example: ``` liteforge.Execute(<<<PRO...
liteforge.idliteforge.id is an option for liteforge.Execute it sets the ID for the liteforge instance example: ``` liteforge.Execute(<<<PROMPT SOME_CONT...
liteforge.imageliteforge.image is an option for liteforge.Execute it adds image data to the execution context example: ``` liteforge.Execute(<<<PROMPT SOME...
liteforge.imageExtraPrompt
liteforge.imageFileliteforge.imageFile is an option for liteforge.Execute it adds image files to the execution context example: ``` liteforge.Execute(<<<PROMPT...
liteforge.knowledgeBaseDesc
liteforge.knowledgeBaseName
liteforge.knowledgeBaseType
liteforge.knowledgeEntryLength
liteforge.outputliteforge.output is an option for liteforge.Execute it can limit the output of the liteforge.Execute use jsonschema.ActionObject to limit the output...
liteforge.refinePrompt
liteforge.strictRefine
liteforge.verboseNameliteforge.verboseName is an option for liteforge.Execute it adds verbose naming options to the execution example: ``` liteforge.Execute(<<<P...

函数定义#

AnalyzeAudioFile#

详细描述#

定义#

AnalyzeAudioFile(audio string, opts ...any) (<-chan *AudioAnalysisResult, error)

参数#

参数名参数类型参数解释
audiostring
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1<-chan *AudioAnalysisResult
r2error

AnalyzeERM#

详细描述#

定义#

AnalyzeERM(path string, option ...any) (*entitybase.EntityRepository, error)

参数#

参数名参数类型参数解释
pathstring
option...any

返回值#

返回值(顺序)返回值类型返回值解释
r1*entitybase.EntityRepository
r2error

AnalyzeFile#

详细描述#

定义#

AnalyzeFile(path string, option ...any) (<-chan AnalysisResult, error)

参数#

参数名参数类型参数解释
pathstring
option...any

返回值#

返回值(顺序)返回值类型返回值解释
r1<-chan AnalysisResult
r2error

AnalyzeImage#

详细描述#

定义#

AnalyzeImage(image any, opts ...any) (*ImageAnalysisResult, error)

参数#

参数名参数类型参数解释
imageany
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1*ImageAnalysisResult
r2error

AnalyzeImageFile#

详细描述#

定义#

AnalyzeImageFile(image string, opts ...any) (*ImageAnalysisResult, error)

参数#

参数名参数类型参数解释
imagestring
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1*ImageAnalysisResult
r2error

AnalyzeVideo#

详细描述#

定义#

AnalyzeVideo(video string, options ...any) (<-chan AnalysisResult, error)

参数#

参数名参数类型参数解释
videostring
options...any

返回值#

返回值(顺序)返回值类型返回值解释
r1<-chan AnalysisResult
r2error

Execute#

详细描述#

定义#

Execute(query string, opts ...any) (*ForgeResult, error)

参数#

参数名参数类型参数解释
querystring
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1*ForgeResult
r2error

Refine#

详细描述#

定义#

Refine(path string, option ...any) (*knowledgebase.KnowledgeBase, error)

参数#

参数名参数类型参数解释
pathstring
option...any

返回值#

返回值(顺序)返回值类型返回值解释
r1*knowledgebase.KnowledgeBase
r2error

action#

详细描述#

liteforge.action is an option for liteforge.Execute it sets the action type for the liteforge execution,

example:

liteforge.Execute(<<<PROMPTSOME_CONTENTPROMPT, liteforge.action("analyze"))

定义#

action(action string) LiteForgeExecOption

参数#

参数名参数类型参数解释
actionstring

返回值#

返回值(顺序)返回值类型返回值解释
r1LiteForgeExecOption

analyzeCtx#

详细描述#

定义#

analyzeCtx(ctx context.Context) AnalysisOption

参数#

参数名参数类型参数解释
ctxcontext.Context

返回值#

返回值(顺序)返回值类型返回值解释
r1AnalysisOption

analyzeLog#

详细描述#

定义#

analyzeLog(handler func(format string, args ...any)) AnalysisOption

参数#

参数名参数类型参数解释
handlerfunc(format string, args ...any)

返回值#

返回值(顺序)返回值类型返回值解释
r1AnalysisOption

analyzeStatusCard#

详细描述#

定义#

analyzeStatusCard(handler func(id string, data any, tags ...string)) AnalysisOption

参数#

参数名参数类型参数解释
handlerfunc(id string, data any, tags ...string)

返回值#

返回值(顺序)返回值类型返回值解释
r1AnalysisOption

context#

详细描述#

liteforge.context is an option for liteforge.Execute it sets the context for the liteforge execution

example:

liteforge.Execute(<<<PROMPTSOME_CONTENTPROMPT, liteforge.context(ctx))

定义#

context(ctx context.Context) LiteForgeExecOption

参数#

参数名参数类型参数解释
ctxcontext.Context

返回值#

返回值(顺序)返回值类型返回值解释
r1LiteForgeExecOption

forceImage#

详细描述#

liteforge.forceImage is an option for liteforge.Execute it forces the execution to require image input

example:

liteforge.Execute(<<<PROMPTSOME_CONTENTPROMPT, liteforge.forceImage(true))

定义#

forceImage(force ...bool) LiteForgeExecOption

参数#

参数名参数类型参数解释
force...bool

返回值#

返回值(顺序)返回值类型返回值解释
r1LiteForgeExecOption

id#

详细描述#

liteforge.id is an option for liteforge.Execute it sets the ID for the liteforge instance

example:

liteforge.Execute(<<<PROMPTSOME_CONTENTPROMPT, liteforge.id("my-forge-instance"))

定义#

id(id string) LiteForgeExecOption

参数#

参数名参数类型参数解释
idstring

返回值#

返回值(顺序)返回值类型返回值解释
r1LiteForgeExecOption

image#

详细描述#

liteforge.image is an option for liteforge.Execute it adds image data to the execution context

example:

liteforge.Execute(<<<PROMPTSOME_CONTENTPROMPT, liteforge.image(imageData))

定义#

image(anyImageInput ...any) LiteForgeExecOption

参数#

参数名参数类型参数解释
anyImageInput...any

返回值#

返回值(顺序)返回值类型返回值解释
r1LiteForgeExecOption

imageExtraPrompt#

详细描述#

定义#

imageExtraPrompt(prompt string) AnalysisOption

参数#

参数名参数类型参数解释
promptstring

返回值#

返回值(顺序)返回值类型返回值解释
r1AnalysisOption

imageFile#

详细描述#

liteforge.imageFile is an option for liteforge.Execute it adds image files to the execution context

example:

liteforge.Execute(<<<PROMPTSOME_CONTENTPROMPT, liteforge.imageFile("path/to/image.jpg"))

定义#

imageFile(filename ...string) LiteForgeExecOption

参数#

参数名参数类型参数解释
filename...string

返回值#

返回值(顺序)返回值类型返回值解释
r1LiteForgeExecOption

knowledgeBaseDesc#

详细描述#

定义#

knowledgeBaseDesc(desc string) RefineOption

参数#

参数名参数类型参数解释
descstring

返回值#

返回值(顺序)返回值类型返回值解释
r1RefineOption

knowledgeBaseName#

详细描述#

定义#

knowledgeBaseName(name string) RefineOption

参数#

参数名参数类型参数解释
namestring

返回值#

返回值(顺序)返回值类型返回值解释
r1RefineOption

knowledgeBaseType#

详细描述#

定义#

knowledgeBaseType(typ string) RefineOption

参数#

参数名参数类型参数解释
typstring

返回值#

返回值(顺序)返回值类型返回值解释
r1RefineOption

knowledgeEntryLength#

详细描述#

定义#

knowledgeEntryLength(length int) RefineOption

参数#

参数名参数类型参数解释
lengthint

返回值#

返回值(顺序)返回值类型返回值解释
r1RefineOption

output#

详细描述#

liteforge.output is an option for liteforge.Execute it can limit the output of the liteforge.Execute use jsonschema.ActionObject to limit the output to an object

example:

liteforge.Execute(<<<PROMPTSOME_CONTENTNPROMPT, liteforge.output(jsonschema.ActionObject(jsonschema.paramString("value"))),

定义#

output(output string) LiteForgeExecOption

参数#

参数名参数类型参数解释
outputstring

返回值#

返回值(顺序)返回值类型返回值解释
r1LiteForgeExecOption

refinePrompt#

详细描述#

定义#

refinePrompt(prompt string) RefineOption

参数#

参数名参数类型参数解释
promptstring

返回值#

返回值(顺序)返回值类型返回值解释
r1RefineOption

strictRefine#

详细描述#

定义#

strictRefine(strict bool) RefineOption

参数#

参数名参数类型参数解释
strictbool

返回值#

返回值(顺序)返回值类型返回值解释
r1RefineOption

verboseName#

详细描述#

liteforge.verboseName is an option for liteforge.Execute it adds verbose naming options to the execution

example:

liteforge.Execute(<<<PROMPTSOME_CONTENTPROMPT, liteforge.verboseName("my-forge-instance"))

定义#

verboseName(opts ...aid.Option) LiteForgeExecOption

参数#

参数名参数类型参数解释
opts...aid.Option

返回值#

返回值(顺序)返回值类型返回值解释
r1LiteForgeExecOption