From 4ee38de7e74c209b5283f06d007df3f7ee0f3847 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 26 Apr 2023 19:39:15 +0800 Subject: [PATCH] [fix] tests --- openai/openai_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openai/openai_test.go b/openai/openai_test.go index e40ab25b..a37425e3 100644 --- a/openai/openai_test.go +++ b/openai/openai_test.go @@ -3,6 +3,7 @@ package openai import ( "testing" + "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/yaoapp/yao/config" "github.com/yaoapp/yao/connector" @@ -94,13 +95,13 @@ func TestEdits(t *testing.T) { defer test.Clean() openai := prepare(t, "text-davinci-edit-001") - data, err := openai.Edits("Fix the spelling mistakes", nil) + data, err := openai.Edits("Hello world"+uuid.NewString(), nil) if err != nil { t.Fatal(err.Message) } assert.NotNil(t, data.(map[string]interface{})["created"]) - data, err = openai.Edits("Fix the spelling mistakes 2nd", map[string]interface{}{"input": "What day of the wek is it?"}) + data, err = openai.Edits("Fix the spelling mistakes 2nd"+uuid.NewString(), map[string]interface{}{"input": "What day of the wek is it?"}) if err != nil { t.Fatal(err.Message) }