diff --git a/client/conversation.go b/client/conversation.go index 851900f0..5c83c1cf 100644 --- a/client/conversation.go +++ b/client/conversation.go @@ -35,12 +35,6 @@ type ConversationInput struct { ScrubPII *bool // Scrub PII from the input } -type ConversationInputOption func(*ConversationInput) - -func NewConversationInput(message string, opts ...ConversationInputOption) ConversationInput { - return ConversationInput{} -} - type ConversationResponse struct { ContextID string Outputs []ConversationResult diff --git a/examples/conversation/main.go b/examples/conversation/main.go index 405132d3..03c42539 100644 --- a/examples/conversation/main.go +++ b/examples/conversation/main.go @@ -27,10 +27,18 @@ func main() { panic(err) } - resp, err := client.ConverseAlpha1(context.Background(), "echo", []dapr.ConversationInput{{Message: "hello"}}) + input := dapr.ConversationInput{ + Message: "hello world", + // Role: nil, // Optional + // ScrubPII: nil, // Optional + } + + var conversationComponent = "echo" + + resp, err := client.ConverseAlpha1(context.Background(), conversationComponent, []dapr.ConversationInput{input}) if err != nil { log.Fatalf("err: %v", err) } - fmt.Println(resp.Outputs) + fmt.Printf("conversation output: %s", resp.Outputs[1].Result) }