<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>griefworker</author_name>
  <author_url>https://blog.hatena.ne.jp/griefworker/</author_url>
  <blog_title>present</blog_title>
  <blog_url>https://tnakamura.hatenablog.com/</blog_url>
  <categories>
    <anon>.NET</anon>
    <anon>C#</anon>
  </categories>
  <description>C# で Gemini の API を試したくなったけど、公式の C# クライアントライブラリは存在しなかったので、非公式のクライアントライブラリを使ってみた。 github.com 他言語の公式クライアントライブラリの API に寄せてあるので、公式の C# クライアントライブラリが将来出た場合に移行しやすいかも。 Google AI Studio で入手した API キーを使う。 aistudio.google.com 簡単なチャットができるコンソールアプリを書いてみた。 using GenerativeAI.Models; // Google AI Studio で取得した API Ke…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftnakamura.hatenablog.com%2Fentry%2F2024%2F12%2F02%2Ftry-gemini-api-with-csharp&quot; title=&quot;C# で Gemini の API を試す - present&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-12-02 18:37:20</published>
  <title>C# で Gemini の API を試す</title>
  <type>rich</type>
  <url>https://tnakamura.hatenablog.com/entry/2024/12/02/try-gemini-api-with-csharp</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
