* try to fixup tests, enable e2e Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Generate JSON character data with tools Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Rework generation of character Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Simplify text Signed-off-by: mudler <mudler@localai.io> * Relax some test constraints Signed-off-by: mudler <mudler@localai.io> * Fixups * Properly fit schema generation * Swap default model * ci fixups --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Signed-off-by: mudler <mudler@localai.io>
27 lines
590 B
Go
27 lines
590 B
Go
package e2e_test
|
|
|
|
import (
|
|
localagent "github.com/mudler/LocalAgent/pkg/client"
|
|
|
|
. "github.com/onsi/ginkgo/v2"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
var _ = Describe("Agent test", func() {
|
|
Context("Creates an agent and it answer", func() {
|
|
It("create agent", func() {
|
|
client := localagent.NewClient(localagentURL, "")
|
|
|
|
err := client.CreateAgent(&localagent.AgentConfig{
|
|
Name: "testagent",
|
|
})
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
result, err := client.SimpleAIResponse("testagent", "hello")
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(result).ToNot(BeEmpty())
|
|
})
|
|
})
|
|
})
|