Commit 4a1abfe4 authored by Jeffrey Morgan's avatar Jeffrey Morgan
Browse files

fix tests

parent bbd41494
...@@ -951,7 +951,8 @@ func generateInteractive(cmd *cobra.Command, opts generateOptions) error { ...@@ -951,7 +951,8 @@ func generateInteractive(cmd *cobra.Command, opts generateOptions) error {
cmd.SetContext(ctx) cmd.SetContext(ctx)
} }
if len(opts.Images) == 0 { if len(opts.Images) == 0 {
fmt.Println("This model requires you to add a jpeg, png, or svg image.\n") fmt.Println("This model requires you to add a jpeg, png, or svg image.")
fmt.Println()
prompt = "" prompt = ""
continue continue
} }
...@@ -1069,7 +1070,7 @@ func getImageData(filePath string) ([]byte, error) { ...@@ -1069,7 +1070,7 @@ func getImageData(filePath string) ([]byte, error) {
// Check if the file size exceeds 100MB // Check if the file size exceeds 100MB
var maxSize int64 = 100 * 1024 * 1024 // 100MB in bytes var maxSize int64 = 100 * 1024 * 1024 // 100MB in bytes
if info.Size() > maxSize { if info.Size() > maxSize {
return nil, fmt.Errorf("file size exceeds maximum limit (100MB).") return nil, fmt.Errorf("file size exceeds maximum limit (100MB)")
} }
buf = make([]byte, info.Size()) buf = make([]byte, info.Size())
......
...@@ -81,7 +81,7 @@ func TestChat(t *testing.T) { ...@@ -81,7 +81,7 @@ func TestChat(t *testing.T) {
Template: tt.template, Template: tt.template,
} }
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
got, err := m.ChatPrompt(tt.msgs) got, _, err := m.ChatPrompt(tt.msgs)
if tt.wantErr != "" { if tt.wantErr != "" {
if err == nil { if err == nil {
t.Errorf("ChatPrompt() expected error, got nil") t.Errorf("ChatPrompt() expected error, got nil")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment