icebaker / ruby-nano-bots

Ruby Implementation of Nano Bots: small, AI-powered bots that can be easily shared as a single file, designed to support multiple providers such as Anthropic Claude, Cohere Command, Google Gemini, Maritaca AI, Mistral AI, Ollama, OpenAI ChatGPT, and others, with support for calling tools (functions).
https://rubygems.org/gems/nano-bots
MIT License
96 stars 11 forks source link

Adding support for Google Gemini #9

Closed icebaker closed 9 months ago

icebaker commented 9 months ago

New provider:

provider:
  id: google
  credentials:
    project-id: ENV/GOOGLE_PROJECT_ID
    file-path: ENV/GOOGLE_CREDENTIALS_FILE_PATH
    region: ENV/GOOGLE_REGION
  options:
    model: gemini-pro
    stream: true
  settings:
    safetySettings:
      - category: HARM_CATEGORY_DANGEROUS_CONTENT
        threshold: BLOCK_NONE
    generationConfig:
      temperature: 0.9
      maxOutputTokens: 8192
      topK: 32
      topP: 1.0
      stopSequences:
        - .