Compare commits
2 Commits
v2.1.0
...
chore/para
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47492f890f | ||
|
|
ddac344147 |
@@ -990,7 +990,6 @@ func (a *Agent) periodicallyRun(timer *time.Timer) {
|
||||
}
|
||||
|
||||
func (a *Agent) Run() error {
|
||||
|
||||
a.startNewConversationsConsumer()
|
||||
xlog.Debug("Agent is now running", "agent", a.Character.Name)
|
||||
// The agent run does two things:
|
||||
@@ -1013,7 +1012,12 @@ func (a *Agent) Run() error {
|
||||
var muErr sync.Mutex
|
||||
var wg sync.WaitGroup
|
||||
|
||||
for i := 0; i <= a.options.parallelJobs; i++ {
|
||||
parallelJobs := a.options.parallelJobs
|
||||
if a.options.parallelJobs == 0 {
|
||||
parallelJobs = 1
|
||||
}
|
||||
|
||||
for i := 0; i < parallelJobs; i++ {
|
||||
xlog.Debug("Starting agent worker", "worker", i)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
|
||||
@@ -64,6 +64,7 @@ func (o *options) SeparatedMultimodalModel() bool {
|
||||
|
||||
func defaultOptions() *options {
|
||||
return &options{
|
||||
parallelJobs: 1,
|
||||
periodicRuns: 15 * time.Minute,
|
||||
LLMAPI: llmOptions{
|
||||
APIURL: "http://localhost:8080",
|
||||
|
||||
@@ -25,6 +25,7 @@ var _ = Describe("Agent test", func() {
|
||||
agent, err = New(
|
||||
WithLLMAPIURL(apiURL),
|
||||
WithModel(testModel),
|
||||
WithTimeout("10m"),
|
||||
WithRandomIdentity(),
|
||||
)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
Reference in New Issue
Block a user