Swarmauri Lepton AI Model
Project description
Swarmauri LLM LeptonAI
This package provides integration with Lepton AI's text and image generation models.
Installation
pip install swarmauri_llm_leptonai
Usage
Basic usage examples with code snippets
Text Generation
from swarmauri.llms.LeptonAIModel import LeptonAIModel
# Initialize the model
model = LeptonAIModel(api_key="your_api_key")
# Generate text
conversation = Conversation()
conversation.add_message(HumanMessage(content="Hello, how are you?"))
response = model.predict(conversation=conversation)
print(response.get_last().content)
Image Generation
from swarmauri.image_gens.LeptonAIImgGenModel import LeptonAIImgGenModel
# Initialize the model
img_model = LeptonAIImgGenModel(api_key="your_api_key")
# Generate an image
prompt = "A cute cat playing with a ball of yarn"
image_bytes = img_model.generate_image(prompt=prompt)
# Save the image
with open("generated_image.png", "wb") as img_file:
img_file.write(image_bytes)
Want to help?
If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_llm_leptonai-0.9.0.dev4.tar.gz.
File metadata
- Download URL: swarmauri_llm_leptonai-0.9.0.dev4.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d1eb9779548aa95b7f61c640276e31a973d5f2e209131a150c7d198181fc1f4
|
|
| MD5 |
e585980c3ed896e95838464c7d18858c
|
|
| BLAKE2b-256 |
6216d53489da5cb5cf47b7dcd84a167e64c2a6c9fb7f104d7446ca0743268ca4
|
File details
Details for the file swarmauri_llm_leptonai-0.9.0.dev4-py3-none-any.whl.
File metadata
- Download URL: swarmauri_llm_leptonai-0.9.0.dev4-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d9320f0d34c40d92697b1b6530daeacf385fb69f6cd3c837e6e93e2d82cacf8
|
|
| MD5 |
0c4c30f07e1d3c2488a081a5844a48c7
|
|
| BLAKE2b-256 |
b1e64098fbfc3c51a4bbf07e5a9c90aa25adf6ec3c831aa6fc7f5829e9f483e0
|