couchbase-shell
couchbase-shell copied to clipboard
Make ask prompt configurable
Add a configurable prompt for each model in the ask command, add example under examples/writer-agent. This would enable ai agents creation with cbsh.
Here is an example that specify answers must always be in JSON format:
👤 Laurent Doguin 🏠 capella in ☁️ cbsh.commits._default
> ask --prompt "you are a helpful bot, always answering in the JSON text format" "list all films by Steven Spielberg with their name, release date and main cast"
{
"films": [
{
"name": "Jaws",
"release_date": "1975",
"main_cast": ["Roy Scheider", "Robert Shaw", "Richard Dreyfuss"]
},
{
"name": "E.T. the Extra-Terrestrial",
"release_date": "1982",
"main_cast": ["Henry Thomas", "Drew Barrymore", "Dee Wallace"]
},
{
"name": "Jurassic Park",
"release_date": "1993",
"main_cast": ["Sam Neill", "Laura Dern", "Jeff Goldblum"]
},
{
"name": "Schindler's List",
"release_date": "1993",
"main_cast": ["Liam Neeson", "Ben Kingsley", "Ralph Fiennes"]
},
{
"name": "Saving Private Ryan",
"release_date": "1998",
"main_cast": ["Tom Hanks", "Matt Damon", "Tom Sizemore"]
},
{
"name": "Catch Me If You Can",
"release_date": "2002",
"main_cast": ["Leonardo DiCaprio", "Tom Hanks", "Christopher Walken"]
},
{
"name": "The Terminal",
"release_date": "2004",
"main_cast": ["Tom Hanks", "Catherine Zeta-Jones", "Stanley Tucci"]
}
]
}