Xiaoyun Zhang a16b307dc0
[.Net] Add Goolge gemini (#2868)
* update

* add vertex gemini test

* remove DTO

* add test for vertexGeminiAgent

* update test name

* update IGeminiClient interface

* add test for streaming

* add message connector

* add gemini message extension

* add tests

* update

* add gemnini sample

* update examples

* add test for iamge

* fix test

* add more tests

* add streaming message test

* add comment

* remove unused json

* implement google gemini client

* update

* fix comment
2024-06-10 17:31:45 +00:00

29 lines
782 B
C#

// Copyright (c) Microsoft Corporation. All rights reserved.
// Functions.cs
using AutoGen.Core;
namespace AutoGen.Gemini.Tests;
public partial class Functions
{
/// <summary>
/// Get weather for a city.
/// </summary>
/// <param name="city">city</param>
/// <returns>weather</returns>
[Function]
public async Task<string> GetWeatherAsync(string city)
{
return await Task.FromResult($"The weather in {city} is sunny.");
}
[Function]
public async Task<string> GetMovies(string location, string description)
{
var movies = new List<string> { "Barbie", "Spiderman", "Batman" };
return await Task.FromResult($"Movies playing in {location} based on {description} are: {string.Join(", ", movies)}");
}
}