diff --git a/agent/agent_test.go b/agent/agent_test.go index 1f19c18..b52d4a2 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -53,7 +53,7 @@ func (a *TestAction) Definition() action.ActionDefinition { var _ = Describe("Agent test", func() { Context("jobs", func() { - FIt("pick the correct action", func() { + It("pick the correct action", func() { agent, err := New( WithLLMAPIURL(apiModel), WithModel(testModel), @@ -76,6 +76,18 @@ var _ = Describe("Agent test", func() { } Expect(reasons).To(ContainElement(testActionResult), fmt.Sprint(res)) Expect(reasons).To(ContainElement(testActionResult2), fmt.Sprint(res)) + reasons = []string{} + + res = agent.Ask(WithText("Now I want to know the weather in Paris")) + conversation := agent.CurrentConversation() + Expect(len(conversation)).To(Equal(10), fmt.Sprint(conversation)) + for _, r := range res { + reasons = append(reasons, r.Result) + } + Expect(reasons).ToNot(ContainElement(testActionResult), fmt.Sprint(res)) + Expect(reasons).ToNot(ContainElement(testActionResult2), fmt.Sprint(res)) + Expect(reasons).To(ContainElement(testActionResult3), fmt.Sprint(res)) + }) It("pick the correct action", func() { agent, err := New( diff --git a/agent/jobs.go b/agent/jobs.go index 1d1640a..08a9b3b 100644 --- a/agent/jobs.go +++ b/agent/jobs.go @@ -154,6 +154,7 @@ func (a *Agent) consumeJob(job *Job) { if job.Image != "" { // TODO: Use llava to explain the image content + } if job.Text != "" {