diff --git a/cli/flags_test.go b/cli/flags_test.go index 93e230e..4167bb4 100644 --- a/cli/flags_test.go +++ b/cli/flags_test.go @@ -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) -} diff --git a/common/domain_test.go b/common/domain_test.go index 49dcdf3..494082e 100644 --- a/common/domain_test.go +++ b/common/domain_test.go @@ -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?"}, diff --git a/plugins/db/fsdb/sessions_test.go b/plugins/db/fsdb/sessions_test.go index 93078ea..82c99fe 100644 --- a/plugins/db/fsdb/sessions_test.go +++ b/plugins/db/fsdb/sessions_test.go @@ -1,6 +1,7 @@ package fsdb import ( + goopenai "github.com/sashabaranov/go-openai" "testing" )