Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/validate_examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ jobs:
[
"actor",
"configuration",
"conversation",
"conversation-alpha1",
"conversation-alpha2",
"crypto",
"jobs",
"grpc-service",
Expand Down
4 changes: 4 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ type Client interface {
// ConverseAlpha1 interacts with a conversational AI model.
ConverseAlpha1(ctx context.Context, request conversationRequest, options ...conversationRequestOption) (*ConversationResponse, error)

// ConverseAlpha2 interacts with a conversational AI model.
ConverseAlpha2(ctx context.Context, request ConversationRequestAlpha2,
options ...conversationRequestOptionAlpha2) (*ConversationResponseAlpha2, error)

// GrpcClient returns the base grpc client if grpc is used and nil otherwise
GrpcClient() pb.DaprClient

Expand Down
16 changes: 16 additions & 0 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,22 @@ func (s *testDaprServer) DeleteJobAlpha1(ctx context.Context, in *pb.DeleteJobRe
return &pb.DeleteJobResponse{}, nil
}

// TODO: remove in 1.17
//
//nolint:staticcheck
func (s *testDaprServer) ConverseAlpha1(ctx context.Context, in *pb.ConversationRequest) (*pb.ConversationResponse,
error,
) {
return &pb.ConversationResponse{}, nil
}

func (s *testDaprServer) ConverseAlpha2(ctx context.Context, in *pb.ConversationRequestAlpha2) (*pb.
ConversationResponseAlpha2,
error,
) {
return &pb.ConversationResponseAlpha2{}, nil
}

func TestGrpcClient(t *testing.T) {
protoClient := pb.NewDaprClient(nil)
client := &GRPCClient{protoClient: protoClient}
Expand Down
Loading