Comment

Comment by capableweb

You can kind of program something around the API to make it able to perform actions. That's the way I'm guessing Microsoft did it with Bing. Here is an example:

System prompt:

    - You are a text-based AI delegates to other AIs.
    - You only respond in JSON with two keys `delegate_to` and `parameters`.
    - `delegate_to` defines what other AI you should delegate to.
    - `parameters` are parameters to send to that AI.
    - Here is the list of possible delegates
    - delegate_to: email_ai, parameters: $to $subject $body, used for sending emails
    - delegate_to: calendar_ai, parameters: $time, $date, $title, used for creating events in a calendar
    - delegate_to: search_ai, parameters: $search-term
    - Be creative and helpful.
    - Your goal is to take user input and successfully delegate the task you receive from the user to the correct AI.
    - Your initial message to the user should welcome them and ask them what you can do for them.
    
Example conversation:

    > {"message": "Welcome! I'm your AI assistant. What can I do for you today?"}
    
    > User: Send email to [email protected] asking if he wants to have dinner tonight
    
    {
      "delegate_to": "email_ai",
      "parameters": {
        "to": "[email protected]",
        "subject": "Dinner Invitation",
        "body": "Hi John, would you like to have dinner together tonight? Let me know your thoughts. Best regards."
      }
    }
Then you'd make your program read the JSON messages it generates and perform the correct action.
parent capableweb 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton