Giter Site home page Giter Site logo

dsdanielpark / generative-ai-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google-gemini/generative-ai-python

0.0 0.0 0.0 456 KB

The Gemini API Python SDK enables developers to use Google's state-of-the-art generative AI models to build AI-powered features and applications.

Home Page: https://ai.google.dev/

License: Apache License 2.0

Python 100.00%

generative-ai-python's Introduction

Google AI Python SDK for the Gemini API

PyPI version Python support PyPI - Downloads

The Google AI Python SDK is the easiest way for Python developers to build with the Gemini API. The Gemini API gives you access to Gemini models created by Google DeepMind. Gemini models are built from the ground up to be multimodal, so you can reason seamlessly across text, images, and code.

Get started with the Gemini API

  1. Go to Google AI Studio.
  2. Login with your Google account.
  3. Create an API key.
  4. Try a Python SDK quickstart in the Gemini API Cookbook.
  5. For detailed instructions, try the Python SDK tutorial on ai.google.dev.

Usage example

See the Gemini API Cookbook or ai.google.dev for complete code.

Install from PyPI.

pip install -U google-generativeai

Import the SDK and configure your API key.

import google.generativeai as genai
import os

genai.configure(api_key=os.environ["GOOGLE_API_KEY"])

Create a model and run a prompt.

model = genai.GenerativeModel('gemini-1.0-pro-latest')
response = model.generate_content("The opposite of hot is")
print(response.text)

Documentation

See the Gemini API Cookbook or ai.google.dev for complete documentation.

Contributing

See Contributing for more information on contributing to the Google AI Python SDK.

License

The contents of this repository are licensed under the Apache License, version 2.0.

generative-ai-python's People

Contributors

markdaoust avatar markmcd avatar shilpakancharla avatar mayureshagashe2105 avatar keertk avatar andy963 avatar hamza-nabil avatar ymodak avatar aidoskanapyanov avatar a-stupid-sun avatar luo-anthony avatar jybaek avatar eavanvalkenburg avatar aertoria avatar random-forests avatar waltforme avatar kaycebasques avatar pandaspirate avatar tymichaelchen avatar rajveer43 avatar thesanju avatar lll-lll-lll-lll avatar yebowenhu avatar yeuoly avatar hu-po avatar mpursley avatar nbro avatar ftnext avatar sbagri avatar yihong0618 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.