下載或安裝程式庫即可使用 Gemini

本頁說明如何下載或安裝程式庫 使用 Gemini

Python
SDK:pip install google-generativeai
低階用戶端程式庫:pip install google-ai-generativelanguage
Go
跑步go get github.com/google/generative-ai-go
Node.js
npm install @google/generative-ai
網路
新增import { GoogleGenerativeAI } from 'https://esm.run/@google/generative-ai' 適用於網頁應用程式
飛鏢 (Flutter)
達特:跑步 dart pub add google_generative_ai
Flutter:執行 flutter pub add google_generative_ai
Swift
新增 generative-ai-swift 新增至 Xcode 專案
Android
新增依附元件 implementation("com.google.ai.client.generativeai:generativeai:0.9.0") 加入 Android 專案