Skip to the content.

← Back to Index

Installation Guide

Prerequisites

Quick Installation

Using pip:

pip install yamllm-core

Using uv (recommended):

uv pip install yamllm-core

Development Installation

  1. Clone the repository:
    git clone https://github.com/codehalwell/yamllm.git
    cd yamllm
    
  2. Create and activate a virtual environment:
    uv init
    .venv/Scripts/activate
    

or

python -m venv .venv
.venv/Scripts/activate
  1. Install development dependencies: Using uv
    uv pip install -e ".[dev]"
    

Using pip

pip install -e ".[dev]"

Configuration

  1. Create a .env file in your project root:
    # Required API keys (use at least one)
    OPENAI_API_KEY=your_openai_key_here
    GOOGLE_API_KEY=your_google_key_here
    MISTRAL_API_KEY=your_mistral_key_here
    DEEPSEEK_API_KEY=your_deepseek_key_here
    
  2. Create a configuration file (config.yaml): ```yaml provider: name: “mistralai” # or openai, google, deepseek model: “mistral-small-latest” api_key: ${MISTRAL_API_KEY}

model_settings: temperature: 0.7 max_tokens: 1000


## Verifying Installation

```python
from yamllm.core.llm import MistralAI
import os
import dotenv

dotenv.load_dotenv()

# Initialize LLM
llm = MistralAI(
    config_path="config.yaml",
    api_key=os.environ.get("MISTRAL_API_KEY")
)

# Test query
response = llm.query("Hello, how are you?")

System Requirements

Troubleshooting

Common Issues

  1. Permission Errors: ```bash

    Windows (Run as Administrator)

    pip install –user yamllm-core

Linux/macOS

pip install –user yamllm-core


2. SSL Certificate Errors:
```bash
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org yamllm-core
  1. Virtual Environment Issues: ```bash

    Windows

python -m pip install –upgrade pip python -m pip install virtualenv python -m virtualenv .venv

Linux/macOS

python3 -m pip install –upgrade pip python3 -m pip install virtualenv python3 -m virtualenv .venv ```

Next Steps

Support

If you encounter any issues:

  1. Check the GitHub Issues