Skip to content

the1mattkaufman/intro-to-gemini

Repository files navigation

intro-to-gemini

In this talk, I quickly walk through the basics of Google Gemini. We then play with AI Studio to test Gemini using a pre-built UI. Finally, we create our own web service using Project IDX as our IDE and then deploy it to Google Cloud Run using Google Cloud Build.

Gemini References

Visit the cookbook

Open Google AI Studio

Open the docs

Join Discord

Prompt Best Practices

Function Calling Live Example

Tuning Quickstart

Other References

Project IDX

Project IDX Community

Google Cloud Build

Google Cloud Run

Steps to Walkthrough the demo

Testing a GET Operation

  1. Open Project IDX
  2. Click the Import a repo button
  3. Paste the URL of this repo (or your forked instance of it)
  4. Open the Terminal in your IDX
  5. run npm install
  6. Get your AI Studio API key (see slide 17)
  7. Create a new file at the root of the project named .env
  8. Add a new line to the file as follows API_KEY=[YOUR_KEY_GOES_HERE]
  9. Hard Restart the IDX Preview window from its refresh icon menu
  10. Test a GET on your web service by passing in a prompt URL parameter

Testing a POST Operation

  1. Open the Command Pallet and choose: Project IDX: Generate Access Token
  2. Open the Terminal in IDX
  3. Enter export ACCESS_TOKEN=[YOUR_ACCESS_TOKEN]
  4. If you don't know your port, click on the Output view in the Panel and select IDX in the dropdown
  5. In the Terminal enter curl -H "Content-Type: application/json" -H "Authorization: Bearer $ACCESS_TOKEN" -d '{ "model": "gemini-1.5-pro", "prompt": "What is the capital of Nevada"}' -X POST https://9002-$WEB_HOST

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published