mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: use valid Gemini model (#2695)
* use proper Gemini model * use named parameters --------- Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
90964acd2d
commit
0d9ae1920d
@@ -11,7 +11,7 @@ const string JokerInstructions = "You are good at telling jokes.";
|
||||
const string JokerName = "JokerAgent";
|
||||
|
||||
string apiKey = Environment.GetEnvironmentVariable("GOOGLE_GENAI_API_KEY") ?? throw new InvalidOperationException("Please set the GOOGLE_GENAI_API_KEY environment variable.");
|
||||
string model = Environment.GetEnvironmentVariable("GOOGLE_GENAI_MODEL") ?? "gemini-2.5-fast";
|
||||
string model = Environment.GetEnvironmentVariable("GOOGLE_GENAI_MODEL") ?? "gemini-2.5-flash";
|
||||
|
||||
// Using a Google GenAI IChatClient implementation
|
||||
// Until the PR https://github.com/googleapis/dotnet-genai/pull/81 is not merged this option
|
||||
@@ -28,7 +28,7 @@ Console.WriteLine($"Google GenAI client based agent response:\n{response}");
|
||||
// Using a community driven Mscc.GenerativeAI.Microsoft package
|
||||
|
||||
ChatClientAgent agentCommunity = new(
|
||||
new GeminiChatClient(apiKey, model),
|
||||
new GeminiChatClient(apiKey: apiKey, model: model),
|
||||
name: JokerName,
|
||||
instructions: JokerInstructions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user