Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Souza <[email protected]>
  • Loading branch information
artursouza committed Oct 9, 2024
1 parent bb2a7b1 commit 849c8fa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions conversation/aws/bedrock/bedrock.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func (b *AWSBedrock) Init(ctx context.Context, meta conversation.Metadata) error
if m.Model != "" {
opts = append(opts, bedrock.WithModel(m.Model))
}
b.model = m.Model

llm, err := bedrock.New(
opts...,
Expand Down
1 change: 1 addition & 0 deletions conversation/aws/bedrock/bedrock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"

"github.com/dapr/components-contrib/conversation"

"github.com/stretchr/testify/assert"
"github.com/tmc/langchaingo/llms"
)
Expand Down
4 changes: 3 additions & 1 deletion conversation/echo/echo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import (

"github.com/dapr/components-contrib/conversation"
"github.com/dapr/kit/logger"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestConverse(t *testing.T) {
Expand All @@ -20,7 +22,7 @@ func TestConverse(t *testing.T) {
},
},
})
assert.NoError(t, err)
require.NoError(t, err)
assert.Len(t, r.Outputs, 1)
assert.Equal(t, "hello", r.Outputs[0].Result)
}
3 changes: 2 additions & 1 deletion conversation/openai/openai_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"

"github.com/dapr/components-contrib/conversation"

"github.com/stretchr/testify/assert"

openai "github.com/sashabaranov/go-openai"
Expand All @@ -20,6 +21,6 @@ func TestConvertRole(t *testing.T) {

for k, v := range roles {
r := convertRole(conversation.Role(k))
assert.Equal(t, v, string(r))
assert.Equal(t, v, r)
}
}
8 changes: 2 additions & 6 deletions tests/conformance/conversation/conversation.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ import (
"context"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/dapr/components-contrib/conversation"
"github.com/dapr/components-contrib/metadata"
"github.com/dapr/components-contrib/tests/conformance/utils"
)

const (
conversationComponent = "echo"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

type TestConfig struct {
Expand Down

0 comments on commit 849c8fa

Please sign in to comment.