# Basic interaction with LLMs in Python

This folder contains Python examples for interacting with OpenAI, Anthropic, Google Gemini, and local Ollama models.

## Requirements

- [Python](https://www.python.org/) 3.6+
- Corresponding API keys are set as environment variables (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, and `GOOGLE_API_KEY`) for cloud examples
- [Ollama](https://ollama.com/) installed locally for the local model example

## Examples

- `openai-gpt-basic/`: Basic interaction with OpenAI GPT models.
- `openai-gpt-streaming/`: Streaming responses from OpenAI GPT models.
- `anthropic-claude-basic/`: Basic interaction with Anthropic Claude models.
- `anthropic-claude-streaming/`: Streaming responses from Anthropic Claude models.
- `google-gemini-basic/`: Basic interaction with Google Gemini models.
- `google-gemini-streaming/`: Streaming responses from Google Gemini models.
- `ollama-local-basic/`: Basic interaction with a local LLM using Ollama.
- `ollama-local-streaming/`: Streaming responses from a local LLM using Ollama.

## Running the examples

Each example is in its own folder and contains a `README.md` with instructions on how to run it.
