Skip to main content

AI Llama Module

ai_llama_module is a lightweight Python wrapper for the Llama AI API, allowing you to easily send messages and receive AI-generated responses.

Installation

Install via pip:

pip install ai_llama_module

Requirements: • Python 3.9+ • requests • python-dotenv

Make sure you have an environment variable llama_ai set with your Llama AI API key, e.g., in a .env file:

You can also pass an API key through with the variable api_key when calling the function, otherwise it will default to the enviornment variable.

llama_ai = your_api_key_here

Usage

from ai_llama_module import call_ai

Single message

response = call_ai("Hello, Llama!")

print(response)

or you can use

response = call_ai("Hello World!", model, api_key = "YOUR KEY HERE")

print(response)

Multiple messages

messages = [
    {"role": "user", "content": "Hello!"},
    {"role": "assistant", "content": "Hi there! How can I help?"}
]

response = call_ai(messages)

print(response)

Features:

•	Supports single and multi-message inputs
•	Automatically reads API key from environment variables
•	Simple and easy-to-use interface
•	You can specify the model used with the variable 'model' which defualts to Llama-4-Maverick-17B-128E-Instruct-FP8

Dependencies

•	requests
•	python-dotenv

License

MIT License – see LICENSE for details.

Release files for ai-llama-module 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-llama-module 0.1.6
File Size Uploaded
ai_llama_module-0.1.6.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-llama-module 0.1.6
File Interpreter ABI Platform
ai_llama_module-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / ai_llama_module-0.1.6.tar.gz

Download URL ai_llama_module-0.1.6.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2cc66de14c4d390bb666aec27cc84beffc2691b5b9d03e77171e1b76f058a6ba
BLAKE2b-256 checksum
How to use checksums
99812f6fe5244b6d1e91233ad14d851547347297b8c313aeab19fc442a19f97c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / ai_llama_module-0.1.6-py3-none-any.whl

Download URL ai_llama_module-0.1.6-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7318a070e3a35582e5e0065f4f2b1a55975baa222938d72bac94c68cccc22345
BLAKE2b-256 checksum
How to use checksums
348d3ccb745975f23b2eaeeaecac560c27e6f426d94d9249dcbe2e8d87a78465
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page