mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-08 07:11:06 +00:00
feat: impl. multi-model / attachments, images
This commit is contained in:
parent
9e8ad44cdf
commit
9c9897706b
@ -87,22 +87,3 @@ func TestBuildChatOptionsDefaultSeed(t *testing.T) {
|
||||
options := flags.BuildChatOptions()
|
||||
assert.Equal(t, expectedOptions, options)
|
||||
}
|
||||
|
||||
func TestBuildChatRequest(t *testing.T) {
|
||||
flags := &Flags{
|
||||
Context: "test-context",
|
||||
Session: "test-session",
|
||||
Pattern: "test-pattern",
|
||||
Message: "test-message",
|
||||
}
|
||||
|
||||
expectedRequest := &common.ChatRequest{
|
||||
ContextName: "test-context",
|
||||
SessionName: "test-session",
|
||||
PatternName: "test-pattern",
|
||||
Messages: "test-message",
|
||||
Meta: "test",
|
||||
}
|
||||
request := flags.BuildChatRequest("test")
|
||||
assert.Equal(t, expectedRequest, request)
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestNormalizeMessages(t *testing.T) {
|
||||
msgs := []*Message{
|
||||
msgs := []*goopenai.ChatCompletionMessage{
|
||||
{Role: goopenai.ChatMessageRoleUser, Content: "Hello"},
|
||||
{Role: goopenai.ChatMessageRoleAssistant, Content: "Hi there!"},
|
||||
{Role: goopenai.ChatMessageRoleUser, Content: ""},
|
||||
@ -15,7 +15,7 @@ func TestNormalizeMessages(t *testing.T) {
|
||||
{Role: goopenai.ChatMessageRoleUser, Content: "How are you?"},
|
||||
}
|
||||
|
||||
expected := []*Message{
|
||||
expected := []*goopenai.ChatCompletionMessage{
|
||||
{Role: goopenai.ChatMessageRoleUser, Content: "Hello"},
|
||||
{Role: goopenai.ChatMessageRoleAssistant, Content: "Hi there!"},
|
||||
{Role: goopenai.ChatMessageRoleUser, Content: "How are you?"},
|
||||
|
@ -1,6 +1,7 @@
|
||||
package fsdb
|
||||
|
||||
import (
|
||||
goopenai "github.com/sashabaranov/go-openai"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user