ดาวน์โหลดหรือติดตั้งไลบรารีเพื่อเข้าถึง 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: วิ่ง dart pub add google_generative_ai
สำหรับ Flutter: เรียกใช้ flutter pub add google_generative_ai
Swift
เพิ่ม generative-ai-swift ลงในโปรเจ็กต์ Xcode โดยใช้ Swift Package Manager
Android
เพิ่มการอ้างอิง implementation("com.google.ai.client.generativeai:generativeai:0.9.0") กับโปรเจ็กต์ Android ของคุณ