try to fixup tests, enable e2e (#53)
* 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>
This commit is contained in:
committed by
GitHub
parent
31b5849d02
commit
e32a569796
26
tests/e2e/e2e_test.go
Normal file
26
tests/e2e/e2e_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
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())
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user