mirror of
https://github.com/mudler/cogito.git
synced 2026-07-23 18:35:23 -04:00
3c2da4beee
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
24 lines
534 B
Go
24 lines
534 B
Go
package cogito_test
|
|
|
|
import (
|
|
"context"
|
|
|
|
. "github.com/mudler/cogito"
|
|
. "github.com/onsi/ginkgo/v2"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
var _ = Describe("Client test", Label("e2e"), func() {
|
|
Context("A simple pipeline", func() {
|
|
It("should ask to the LLM", func() {
|
|
defaultLLM := NewOpenAILLM(defaultModel, "", apiEndpoint)
|
|
|
|
conv := NewEmptyFragment().AddMessage("user", "Hi!")
|
|
|
|
result, err := defaultLLM.Ask(context.TODO(), conv)
|
|
Expect(err).ToNot(HaveOccurred())
|
|
Expect(result.String()).ToNot(BeEmpty())
|
|
})
|
|
})
|
|
})
|