{"body":"unit class Rose::ContentAnalysis::Perspective;\n\nuse API::Perspective;\n\nmy $perspective-api = API::Perspective.new(:api-key(%*ENV<PERSPECTIVE_API_KEY>));\n\nmulti method submit(Str :$message, MODEL :@models = TOXICITY) {\n    my $score = $perspective-api.analyze(:@models, :comment($message));\n    say @models Z=> $score<attributeScores>{@models}.map: *<summaryScore><value>;\n}\n\nmulti method submit(Str :$name, MODEL :@models = TOXICITY) {\n    my $score = $perspective-api.analyze(:@models, :comment($name));\n    say @models Z=> $score<attributeScores>{@models}.map: *<summaryScore><value>;\n}","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/giLLltSC","modified":1561472470,"id":"giLLltSC","size":588,"lines":15,"own_paste":false,"theme":"","date":1561472470}