- Artificial Intelligence
- 221
- September-08-2023
- by Junaid A
What is makersuite?
MakerSuite is a tool that helps developers quickly and easily prototype generative AI applications with Google's large language models (LLMs). It provides a simple interface for crafting and iterating on prompts, generating synthetic data, and tuning custom models. When you're ready to move to code, MakerSuite will let you export your prompt as code in your favorite languages and frameworks.
Here are some of the features of MakerSuite:
Prompt engineering: MakerSuite makes it easy to craft and iterate on prompts that will generate the desired output from the LLM. You can use a variety of tools to help you, such as a prompt suggestion engine, a prompt debugger, and a prompt history.
Synthetic data generation: MakerSuite can generate synthetic data to help you train and tune your LLM. This can be useful if you don't have enough real data available.
Custom model tuning: MakerSuite lets you tune your LLM to improve its performance on specific tasks. You can do this by adjusting the LLM's hyperparameters and training data.
Code export: When you're ready to move your prototype to production, MakerSuite can export your prompt as code in your favorite languages and frameworks. This makes it easy to deploy your application to a cloud platform or on-premises.
MakerSuite is currently in private preview, but it will be available to the public soon. To learn more about MakerSuite, visit the MakerSuite website: https://makersuite.google.com/.
Here are some examples of what you can do with MakerSuite:
Build a travel itinerary generator that recommends the best places to visit based on your interests.
Create a passage summarizer that can shorten long texts into a few sentences.
Develop a chatbot that can answer your questions in an informative way.
Design a creative text generator that can write poems, code, scripts, and other creative content.
MakerSuite is a powerful tool that can help you bring your generative AI ideas to life. If you're a developer interested in building generative AI applications, I encourage you to check it out.
how makerSuite works?
MakerSuite works by connecting to Google's large language models (LLMs) through the Generative Language API. When you create a prompt in MakerSuite, the API sends the prompt to the LLM and returns the output. MakerSuite then displays the output to you.
You can use MakerSuite to experiment with different prompts and see how they affect the output of the LLM. You can also use MakerSuite to generate synthetic data to help you train and tune your LLM.
When you're ready to move your prototype to production, MakerSuite can export your prompt as code in your favorite languages and frameworks. This makes it easy to deploy your application to a cloud platform or on-premises.
Here are the steps on how MakerSuite works:
You create a prompt in MakerSuite. The prompt is a text instruction that tells the LLM what to do. For example, a prompt for a poem generator might be "Write a poem about love."
MakerSuite sends the prompt to the Generative Language API.
The Generative Language API sends the prompt to the LLM.
The LLM generates output based on the prompt.
MakerSuite displays the output to you.
You can iterate on the prompt and see how it affects the output.
You can also use MakerSuite to generate synthetic data to help you train and tune your LLM.
When you're ready to move your prototype to production, MakerSuite can export your prompt as code in your favorite languages and frameworks.
Here are some of the things to keep in mind when using MakerSuite:
The LLMs that MakerSuite uses are trained on a massive dataset of text and code. This means that they can generate output that is very realistic and creative. However, it also means that they can generate output that is offensive or harmful. It is important to use MakerSuite responsibly and to be aware of the potential risks.
The LLMs that MakerSuite uses are still under development. This means that they can sometimes make mistakes or generate output that is not what you expected. It is important to be patient and to experiment with different prompts until you find the one that works best for you.
maker suite is free?
nowadays maker suite is free of cost.
MakerSuite is currently in private preview, and it is not yet known if it will be free for public use. However, Google has stated that they are committed to making generative AI technologies accessible to everyone, so it is likely that MakerSuite will be offered at a free or low-cost price point.
In the meantime, you can sign up for the MakerSuite waitlist to be notified when it becomes available to the public. You can also learn more about MakerSuite and the Generative Language API on the MakerSuite website: https://makersuite.google.com/.
makersuite in asp.net
to view sample codeof makersuite in asp.net
to view sample codeof makersuite in C#
visit following urls
https://futureminutes.com/posts/palm-api-for-text-and-chat-free-40579
Below is sample code
using AJ.Business.Dtos.Inventory;
using AJ.Business.Inventory.Interfaces;
using AJ.WebUI.Models;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using RestSharp;
using System.Diagnostics;
namespace AJ.WebUI.Controllers
{
public class HomeController : Controller
{
private readonly ILogger<HomeController> _logger;
private readonly IProductService _productService;
public HomeController(IProductService productService)
{
_productService = productService;
}
public ActionResult datagrammarrewrite()
{
var myDeserializedClass = new MSGRoot();
return View(myDeserializedClass);
}
[HttpPost]
public ActionResult datagrammarrewrite(string kw)
{
var client = new RestClient("https://generativelanguage.googleapis.com/v1beta2/models/text-bison-001:generateText?key=AIzaSyDYTZ3STnOqjchQ1oM7zW9NH2-z9zlMHKg");
// client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.Post;
request.AddHeader("Content-Type", "text/plain");
var body = @"{ ""prompt"": { ""text"": ""Rewrite the following sentence twice, first to repair grammar in the fixed output, and last to flip the grammar of the sentence around in the reordered output.\nOriginal: I go the bank, to stick money ATM for retrieval. \nFixed: I go to the bank, to withdraw money from the ATM.\nReordered: I will withdraw some money from the ATM when I go to the bank later.\nOriginal: Tacos be delicious, I would please have 5 more now.\nFixed: Tacos are delicious, so I'\''ll have another five, please.\nReordered: Please make me five more tacos, they are delicious!\nOriginal: To make news, information must be written accurate.\nFixed: To make the news, a reporter accurately writes about information. \nReordered: A reporter who is creating news must accurately write about information around them.\nOriginal: __kw__\nFixed:""}, ""temperature"": 0.9, ""top_k"": 40, ""top_p"": 0.95, ""candidate_count"": 1, ""max_output_tokens"": 1024, ""stop_sequences"": [], ""safety_settings"": [{""category"":""HARM_CATEGORY_DEROGATORY"",""threshold"":1},{""category"":""HARM_CATEGORY_TOXICITY"",""threshold"":1},{""category"":""HARM_CATEGORY_VIOLENCE"",""threshold"":2},{""category"":""HARM_CATEGORY_SEXUAL"",""threshold"":2},{""category"":""HARM_CATEGORY_MEDICAL"",""threshold"":2},{""category"":""HARM_CATEGORY_DANGEROUS"",""threshold"":2}]}";
body = body.Replace("__kw__", kw);
request.AddParameter("text/plain", body, ParameterType.RequestBody);
var response = client.Execute(request);
Console.WriteLine(response.Content);
var myDeserializedClass = JsonConvert.DeserializeObject<AJ.WebUI.Models.MSGRoot>(response.Content);
return View(myDeserializedClass);
}
public ActionResult travelagent()
{
var myDeserializedClass = new MSGRoot();
return View(myDeserializedClass);
}
[HttpPost]
public ActionResult travelagent(string kw)
{
var client = new RestClient("https://generativelanguage.googleapis.com/v1beta2/models/text-bison-001:generateText?key=AIzaSyDYTZ3STnOqjchQ1oM7zW9NH2-z9zlMHKg");
// client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.Post;
request.AddHeader("Content-Type", "text/plain");
var body = @"{ ""prompt"": { ""text"": ""Speak as if you are a travel agent, sharing a general overview without bullets about a location.\nLocation: Athens\nDescription: Athens, the capital of Greece, is a city with a rich history and culture. It is home to many ancient ruins, including the Acropolis. The Acropolis is a hilltop citadel that was once the center of ancient Athens. \n\nAthens is also home to many museums, including the National Archaeological Museum, which is one of the largest museums in Greece. The museum houses a collection of artifacts from ancient Greece, including sculptures, pottery, and jewelry.\n\nAthens is a great city to visit for a weekend getaway or a longer vacation. There is something for everyone in Athens, from history and culture to nightlife and festivals.\nExcited Voice: Athens is rich in history and culture! It is home to a ton of ruins, some amazing museums, and some of the coolest artifacts in the world!\nLocation: Temecula\nDescription: Temecula is located in the Temecula Valley, which is a popular destination for wine tasting, golfing, and other outdoor activities. \n\nThe city is also home to several historical sites, including the Temecula Valley Museum and the Old Town Temecula Historic District.\nExcited Voice: Temecula is an amazing visit while visiting the valley for wine, golf or other outdoor excursions! Check out the historic district, you'\''ll be glad you did.\nLocation: Troy Michigan\nDescription: Troy is a diverse city with a population of over 87,000 people. Troy is also home to a number of colleges and universities, including the Carnegie Institute and Walsh College.\n\nTroy is a popular destination for shopping, dining, and entertainment. The city is home to the Somerset Collection, a large shopping mall, and a number of restaurants and bars. \n\nTroy is also home to a number of theaters, including the Troy Performing Arts Center.\nExcited Voice: Troy Michigan is a hub for education and learning, home to many colleges and universities. While you'\''re here to learn, make sure to check out all the great shopping as well!\nLocation: __kw__\nDescription:""}, ""temperature"": 0.25, ""top_k"": 40, ""top_p"": 0.95, ""candidate_count"": 1, ""max_output_tokens"": 1024, ""stop_sequences"": [], ""safety_settings"": [{""category"":""HARM_CATEGORY_DEROGATORY"",""threshold"":1},{""category"":""HARM_CATEGORY_TOXICITY"",""threshold"":1},{""category"":""HARM_CATEGORY_VIOLENCE"",""threshold"":2},{""category"":""HARM_CATEGORY_SEXUAL"",""threshold"":2},{""category"":""HARM_CATEGORY_MEDICAL"",""threshold"":2},{""category"":""HARM_CATEGORY_DANGEROUS"",""threshold"":2}]}";
body = body.Replace("__kw__", kw);
request.AddParameter("text/plain", body, ParameterType.RequestBody);
var response = client.Execute(request);
Console.WriteLine(response.Content);
var myDeserializedClass = JsonConvert.DeserializeObject<AJ.WebUI.Models.MSGRoot>(response.Content);
return View(myDeserializedClass);
}
public ActionResult Analogy()
{
var myDeserializedClass = new MSGRoot();
return View(myDeserializedClass);
}
[HttpPost]
public ActionResult Analogy(string kw)
{
var client = new RestClient("https://generativelanguage.googleapis.com/v1beta2/models/text-bison-001:generateText?key=AIzaSyDYTZ3STnOqjchQ1oM7zW9NH2-z9zlMHKg");
// client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.Post;
request.AddHeader("Content-Type", "text/plain");
var body = @"{ ""prompt"": { ""text"": ""Word Busy\nAnalogy like a bee\nWord Living\nAnalogy in a bubble\nWord Talking\nAnalogy to a brick wall\nWord Sly\nAnalogy like a fox\nWord Life\nAnalogy is but a walking shadow\nWord __kw__\nAnalogy""}, ""temperature"": 0.35, ""top_k"": 40, ""top_p"": 0.95, ""candidate_count"": 1, ""max_output_tokens"": 1024, ""stop_sequences"": [], ""safety_settings"": [{""category"":""HARM_CATEGORY_DEROGATORY"",""threshold"":1},{""category"":""HARM_CATEGORY_TOXICITY"",""threshold"":1},{""category"":""HARM_CATEGORY_VIOLENCE"",""threshold"":2},{""category"":""HARM_CATEGORY_SEXUAL"",""threshold"":2},{""category"":""HARM_CATEGORY_MEDICAL"",""threshold"":2},{""category"":""HARM_CATEGORY_DANGEROUS"",""threshold"":2}]}";
body = body.Replace("__kw__", kw);
request.AddParameter("text/plain", body, ParameterType.RequestBody);
var response = client.Execute(request);
// Console.WriteLine(response.Content);
var myDeserializedClass = JsonConvert.DeserializeObject<AJ.WebUI.Models.MSGRoot>(response.Content);
return View(myDeserializedClass);
}
public ActionResult Opposite()
{
var myDeserializedClass = new MSGRoot();
return View(myDeserializedClass);
}
[HttpPost]
public ActionResult Opposite(string kw)
{
var client = new RestClient("https://generativelanguage.googleapis.com/v1beta2/models/text-bison-001:generateText?key=AIzaSyDYTZ3STnOqjchQ1oM7zW9NH2-z9zlMHKg");
// client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.Post;
request.AddHeader("Content-Type", "text/plain");
var body = @"{ ""prompt"": { ""text"": ""Find a word or phrase with opposite meaning.\nWord: Strong\nOpposite: Weak\nWord: Thick\nOpposite: Thin\nWord: Sparse\nOpposite: Dense\nWord: Sloppy\nOpposite: Organized\nWord:_kw_\nOpposite:""}, ""temperature"": 0.7, ""top_k"": 40, ""top_p"": 0.95, ""candidate_count"": 1, ""max_output_tokens"": 1024, ""stop_sequences"": [], ""safety_settings"": [{""category"":""HARM_CATEGORY_DEROGATORY"",""threshold"":1},{""category"":""HARM_CATEGORY_TOXICITY"",""threshold"":1},{""category"":""HARM_CATEGORY_VIOLENCE"",""threshold"":2},{""category"":""HARM_CATEGORY_SEXUAL"",""threshold"":2},{""category"":""HARM_CATEGORY_MEDICAL"",""threshold"":2},{""category"":""HARM_CATEGORY_DANGEROUS"",""threshold"":2}]}
" + "\n" +
@"";
body = body.Replace("_kw_", kw);
request.AddParameter("text/plain", body, ParameterType.RequestBody);
var response = client.Execute(request);
Console.WriteLine(response.Content);
var myDeserializedClass = JsonConvert.DeserializeObject<AJ.WebUI.Models.MSGRoot>(response.Content);
return View(myDeserializedClass);
}
public async Task<IActionResult> Index()
{
AJ.WebUI.Models.MSGRoot myDeserializedClass = new MSGRoot();
return View(myDeserializedClass);
}
[HttpPost]
public async Task<IActionResult> Index(string kw)
{
var client = new RestClient("https://generativelanguage.googleapis.com/v1beta2/models/text-bison-001:generateText?key=AIzaSyDYTZ3STnOqjchQ1oM7zW9NH2-z9zlMHKg");
// client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.Post;
request.AddHeader("Content-Type", "text/plain");
var body = @"{ ""prompt"": { ""text"":""__""} }";
body= body.Replace("__", kw);
request.AddParameter("text/plain", body, ParameterType.RequestBody);
var response = client.Execute(request);
// Console.WriteLine(response.Content);
var myDeserializedClass = JsonConvert.DeserializeObject<AJ.WebUI.Models.MSGRoot>(response.Content);
return View(myDeserializedClass);
}
public ActionResult PartyIdea()
{
var myDeserializedClass = new MSGRoot();
return View(myDeserializedClass);
}
[HttpPost]
public ActionResult PartyIdea(string kw)
{
var client = new RestClient("https://generativelanguage.googleapis.com/v1beta2/models/text-bison-001:generateText?key=AIzaSyDYTZ3STnOqjchQ1oM7zW9NH2-z9zlMHKg");
// client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.Post;
request.AddHeader("Content-Type", "application/json");
var body = @"{ ""prompt"": { ""text"": ""_kw_""}, ""temperature"": 0.7, ""top_k"": 40, ""top_p"": 0.95, ""candidate_count"": 1, ""max_output_tokens"": 1024, ""stop_sequences"": [], ""safety_settings"": [{""category"":""HARM_CATEGORY_DEROGATORY"",""threshold"":1},{""category"":""HARM_CATEGORY_TOXICITY"",""threshold"":1},{""category"":""HARM_CATEGORY_VIOLENCE"",""threshold"":2},{""category"":""HARM_CATEGORY_SEXUAL"",""threshold"":2},{""category"":""HARM_CATEGORY_MEDICAL"",""threshold"":2},{""category"":""HARM_CATEGORY_DANGEROUS"",""threshold"":2}]}";
body = body.Replace("_kw_", kw);
request.AddParameter("application/json", body, ParameterType.RequestBody);
var response = client.Execute(request);
Console.WriteLine(response.Content);
var myDeserializedClass = JsonConvert.DeserializeObject<AJ.WebUI.Models.MSGRoot>(response.Content);
return View(myDeserializedClass);
}
public ActionResult GenerateMessage()
{
var myDeserializedClass = new MSGGenerateMessageRoot();
return View(myDeserializedClass);
}
[HttpPost]
public ActionResult GenerateMessage(string kw)
{
var client = new RestClient("https://generativelanguage.googleapis.com/v1beta2/models/chat-bison-001:generateMessage?key=AIzaSyDYTZ3STnOqjchQ1oM7zW9NH2-z9zlMHKg");
//client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.Post;
request.AddHeader("Content-Type", "text/plain");
var body = @"{ ""prompt"": {""messages"": [{""content"":""_kw_""}]},
" + "\n" +
@" ""temperature"": 0.1,
" + "\n" +
@" ""candidate_count"": 1,
" + "\n" +
@" ""topP"": 0.8,
" + "\n" +
@" ""topK"": 10 }";
body = body.Replace("_kw_", kw);
request.AddParameter("text/plain", body, ParameterType.RequestBody);
var response = client.Execute(request);
Console.WriteLine(response.Content);
var myDeserializedClass = JsonConvert.DeserializeObject<AJ.WebUI.Models.MSGGenerateMessageRoot>(response.Content);
return View(myDeserializedClass);
}
public IActionResult Privacy()
{
return View();
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}
}