None the less, if you're building a project for others, you most likely don't want the secret key to be public, which it'd be if you embed it in the client-side code.
That it pretends to be a Scientist? Or that it can perform actions (like sending an email or searching the web)?
If the latter, do you have more info/docs about it? Didn’t see it on the roadmap.
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 john@example.com asking if he wants to have dinner tonight
{
"delegate_to": "email_ai",
"parameters": {
"to": "john@example.com",
"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.https://github.com/enricoros/nextjs-chatgpt-app/blob/main/pa...
transparent to the user and even changeable by them.
Ah, only saw the api one!
Re-reading, I’m guessing the prompt could also be dynamically generated to include the most relevant delegates.
Yup that's how I'm doing it - the system prompt is re-generated for every request, and that includes getting a list of available delegates and the arguments they accept. I only have 10 so I'm just listing all of them, but if you had some huge number you could combine that with embeddings / vector lookup.
In the case you describe, you can have an LLM write the tools.
Yes, the first tools and bridge code might need to be manually built. But after that it could be LLMs all the way down.
Kind of similar to writing a new programming language. At first you write it in another language but after compiling it for the first time, you can then write the language in the language itself.
But come on, read through the source, look for the issue, I'm sure you can track down at least something :)
Works now.