Return JobResult

This commit is contained in:
Ettore Di Giacinto
2024-04-03 23:17:46 +02:00
parent 9df690999c
commit 936b2af4ca
4 changed files with 32 additions and 26 deletions

View File

@@ -13,13 +13,13 @@ type llmOptions struct {
}
type options struct {
LLMAPI llmOptions
character Character
randomIdentityGuidance string
randomIdentity bool
actions Actions
enableHUD bool
context context.Context
LLMAPI llmOptions
character Character
randomIdentityGuidance string
randomIdentity bool
actions Actions
enableHUD, standaloneJob bool
context context.Context
}
func defaultOptions() *options {
@@ -53,6 +53,13 @@ var EnableHUD = func(o *options) error {
return nil
}
// EnableStandaloneJob is an option to enable the agent
// to run jobs in the background automatically
var EnableStandaloneJob = func(o *options) error {
o.standaloneJob = true
return nil
}
func WithLLMAPIURL(url string) Option {
return func(o *options) error {
o.LLMAPI.APIURL = url