Skip to content

Repository contains a boilerplate to connect to LLM's via API

praddyum/llm-via-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

llm-via-api

A boilerplate repository for connecting to Google Gemini via API.

Flow Diagram

image

Features

  • Simple integration with Google Gemini API
  • Easy setup and configuration
  • Ready-to-use Python environment

Limitation

  • The model doesn't keep the memory or maintains any session so each prompt is a whole new conversation
2025-08-20_16-22

Setup

  1. Navigate to Google AI Studio and get a API Key

  2. Clone the repository

    git clone <repository-url>
    cd llm-via-api
  3. Create a virtual environment

    python -m venv venv
  4. Activate the virtual environment

    • On Windows:
      venv\Scripts\activate
    • On macOS/Linux:
      source venv/bin/activate
  5. Install dependencies

    pip install -r requirements.txt
  6. Set up environment variables

    • On Windows(powershell):
      $env:GEMINI_API_KEY="YOUR_API_KEY_HERE"
    • On macOS/Linux:
      export GEMINI_API_KEY='YOUR_API_KEY_HERE'

Usage

Run the main program:

python main.py

Notes

  • Ensure you have a valid Google Gemini API key.
  • For more details, refer to the code and comments.

About

Repository contains a boilerplate to connect to LLM's via API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages