A developer sample written in Go that demonstrates Gemini's creative writing abilities. With user input, Gemini writes a novella one section at a time.
This app can be opened in Project IDX, or run in your local dev environment.
-
Open this repo in Project IDX:
- Open in Project IDX
- Wait for the import process to complete.
-
Get a Gemini API key:
- Open the IDX Panel and click "Authenticate" with the Gemini API integration.
- Once authenticated, click to copy the API key to your keyboard.
-
Open a new terminal window:
- Open the command palette (CTRL/CMD-SHIFT-P)
- Begin typing terminal
- Select Terminal: Create New Terminal
-
Follow the steps below to run the app.
-
Clone this repository:
git clone https://github.com/JaewooKim0/go-dreaming-of-adventure
-
Verify that Go 1.22 or later is installed:
- Verify version with
go version
- In needed, install Go, see: https://go.dev/doc/install
- Verify version with
-
Get a Gemini API key:
- Launch Google AI Studio: https://aistudio.google.com/
- Click Get API Key
-
Follow the steps below to run the app.
-
Set the API Key in the
API_KEY
environment varaible:export API_KEY=<your_api_key>
-
Compile and run the program:
go run .
-
When asked "What do you want to dream about?", answer with something fun.
- For example, type:
I want to dream about unicode.
- For example, type: