Skip to main content

Swarmauri Lepton AI Model

Project description

Swarmauri Logo

PyPI - Downloads PyPI - Python Version PyPI - License PyPI - Version


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

swarmauri_llm_leptonai-0.7.0.dev9.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

swarmauri_llm_leptonai-0.7.0.dev9-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_llm_leptonai-0.7.0.dev9.tar.gz.

File metadata

File hashes

Hashes for swarmauri_llm_leptonai-0.7.0.dev9.tar.gz
Algorithm Hash digest
SHA256 b8d2e95b8919375a2c173f68c93aea14ffe364eb63925e208594093f0920823a
MD5 ce3be0f1826d0a0cfcbd8049e6f9be1d
BLAKE2b-256 274ac4a4103d5c060ffb313da9e6200ea3a8b6977f6a9c68dceb8dcf5c399396

See more details on using hashes here.

File details

Details for the file swarmauri_llm_leptonai-0.7.0.dev9-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_llm_leptonai-0.7.0.dev9-py3-none-any.whl
Algorithm Hash digest
SHA256 b60bee2d716921cc40dcb9a19c2f278fc05b605726fff1167afa409403593658
MD5 ee432790f30c3b1f03650443e5e4e4f5
BLAKE2b-256 53b55b3f3ab8794e72f0a0a8d01dfd318121886ea0c49962e1d861949e9851c4

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