Skip to content

Commit a02dbe2

Browse files
add brevity
1 parent d140f6e commit a02dbe2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ Console.WriteLine(response.Text);
116116

117117
## More examples
118118

119-
The [tests](./tests/) folder contains more examples.
119+
The folders [samples](./samples/) and [tests](./tests/) contain more examples.
120+
121+
- [Simple console application](./samples/Console.Chat/)
120122

121123
## Troubleshooting
122124

samples/Console.Chat/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
apiKey = Environment.GetEnvironmentVariable("GOOGLE_API_KEY");
1414
}
1515

16-
var model = new GenerativeModel(apiKey);
1716
Console.Write("Enter a prompt: ");
1817
string request = Console.ReadLine();
1918

19+
// Send the prompt to Gemini (using Google AI with API key)
20+
var model = new GenerativeModel(apiKey);
2021
var response = await model.GenerateContent(request);
2122

2223
Console.WriteLine($"Prompt: {request}");

0 commit comments

Comments
 (0)