Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.72 KB

README.md

File metadata and controls

56 lines (40 loc) · 1.72 KB

README

License Hex Package Hex Docs CI

GoogleAI is an Elixir library that provides a community-maintained Google AI API client.

See https://ai.google.dev/tutorials/rest_quickstart for more information of the Google AI REST API.

Installation

The package can be installed by adding google_ai to your list of dependencies in mix.exs:

def deps do
  [
    {:google_ai, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/google_ai.

Features

  • generateContent - Text-only input
  • generateContent - Text-and-image Input
  • generateContent - Multi-turn conversation
  • generateContent - Configuration
  • streamGenerateContent
  • countTokens
  • embedContent
  • batchEmbedContents
  • Get model
  • List models

Configuration

You can configure google_ai in your mix config.exs (default $project_root/config/config.exs). If you're using Phoenix add the configuration in your config/dev.exs|test.exs|prod.exs files. An example config is:

import Config

config :google_ai,
  # find it at https://makersuite.google.com/app/apikey
  api_key: "your-api-key",

License

MIT