Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM API Playground

Minimal, copy-paste friendly examples for making chat completion API calls to major LLM providers in Python and Java.

Providers

  • OpenAI — GPT-4o
  • Anthropic — Claude Sonnet 4.5
  • Google Gemini — Gemini 2.5 Flash
  • Mistral — Mistral Large

Running the Python Examples

cd python
python -m venv .venv

# Activate the virtual environment
source .venv/bin/activate        # macOS / Linux
.venv\Scripts\activate           # Windows

pip install -r requirements.txt

Set up your API keys:

cp ../.env.example ../.env
# Edit ../.env and add your API keys
OPENAI_API_KEY=sk-proj.......XY

Run an example:

python openai_chat.py

Running the Java Examples

Requires Java 17+ and Maven.

cd java
mvn compile
mvn exec:java -Dexec.mainClass="OpenAIChat"

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages