Skip to main content

YAML-based LLM configuration and execution

Project description

YAMLLM

A Python library for YAML-based LLM configuration and execution.

Installation

pip install yamllm-core

Quick Start

from yamllm import LLM
import os

# Initialize LLM with config
llm = LLM(config_path="path/to/config.yaml")
llm.api_key = os.environ.get("OPENAI_API_KEY")

# Make a query
response = llm.query("What is the meaning of life?")
print(response)

Configuration

YAMLLM uses YAML files for configuration. Set up a .config file to define the parameters for your LLM instance. This file should include settings such as the model type, temperature, maximum tokens, and system prompt.

Example configuration:

model: gpt-4-turbo-preview
temperature: 0.7
max_tokens: 500
system_prompt: "You are a helpful AI assistant."

Place the .config file in your project directory and reference it in your code to initialize the LLM instance.

Example configuration:

model: gpt-4-turbo-preview
temperature: 0.7
max_tokens: 500
system_prompt: "You are a helpful AI assistant."

Features

  • YAML-based configuration
  • Simple API interface
  • Customizable prompt templates
  • Error handling and retry logic

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yamllm_core-0.1.5.tar.gz (7.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yamllm_core-0.1.5-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file yamllm_core-0.1.5.tar.gz.

File metadata

  • Download URL: yamllm_core-0.1.5.tar.gz
  • Upload date:
  • Size: 7.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for yamllm_core-0.1.5.tar.gz
Algorithm Hash digest
SHA256 750615f70d8cbc6027339dac56ecc3025a98cd8bb7ee29fc480f4ddb03226083
MD5 5b31fa25e7db66cd4759210d2c6f15be
BLAKE2b-256 daf563c03ddad573358815ed468200cbdeb558ca91e7c2df30b08364984b1dc6

See more details on using hashes here.

File details

Details for the file yamllm_core-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: yamllm_core-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for yamllm_core-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 17e2de43552783e06a72c4e1c2633e123ee991db02e1f2659dff774a87594cdd
MD5 fcd5259f7e8e2007df4be63c95294ed4
BLAKE2b-256 856e649f014eab9047e15276046600f04fd0f115964b8c6cbc55a25c21201789

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page