Skip to content
TheChatArchiveThe Chat Archive
Perplexitypplx-7b-online· PerplexityHugging Face Arena Human Preference 55K

What is the "Hello name" example in Motoko?

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Metallama-2-70b-chat’s answer.
  1. User

    What is the "Hello name" example in Motoko?

  2. Perplexity Assistant

    The "Hello name" example in Motoko, a programming language, can be found in the following code snippet:

    public query func hello(name : Text) : async Text {
      return "Hello, " ++ name;
    }
    

    This example defines a public query function hello that takes a Text parameter name and returns an async Text. The function simply concatenates the string "Hello, " with the provided name.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.