Skip to main content

Swarmauri Lepton AI Model

Project description

Swamauri Logo

PyPI - Downloads GitHub Hits PyPI - Python Version PyPI - License PyPI - swarmauri_llm_leptonai


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

This version

0.7.1

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.1.tar.gz (9.0 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.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_llm_leptonai-0.7.1.tar.gz.

File metadata

File hashes

Hashes for swarmauri_llm_leptonai-0.7.1.tar.gz
Algorithm Hash digest
SHA256 46e5ae39e596e5f3abe02800a534e783ad1666efbfb8b4d2ce71936cbdab9e0b
MD5 d038c528f90ef8acb56fa7f758d86b51
BLAKE2b-256 0c55fb7f364e25a9e1418be70d73c997f0a3dc8e79a7305517f56b64611e9105

See more details on using hashes here.

File details

Details for the file swarmauri_llm_leptonai-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_llm_leptonai-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ebb62220e77504390a5f738c995681222d90fedb27ab254c96152c86a8f57230
MD5 a4a681b74ce177f26043c026e3a9e5b4
BLAKE2b-256 7dccbdbfaad2e7fe33f4c1ffdf5be4340e2d7fd153a0c52403d05e88f247fa24

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