Skip to main content

Swarmauri Lepton AI Model

Project description

Swamauri Logo

PyPI - Downloads 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

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

Uploaded Python 3

File details

Details for the file swarmauri_llm_leptonai-0.7.4.dev20.tar.gz.

File metadata

File hashes

Hashes for swarmauri_llm_leptonai-0.7.4.dev20.tar.gz
Algorithm Hash digest
SHA256 5351ca926c9b4b515928b48fe011652c9aa75e484474bc059eabd8800e2dfe58
MD5 d069d991116c0aa9e004d6df6e8d6e1b
BLAKE2b-256 53e044383ace6a9941472a18013157a220823c4f32481a380828b7f4875c4c6b

See more details on using hashes here.

File details

Details for the file swarmauri_llm_leptonai-0.7.4.dev20-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_llm_leptonai-0.7.4.dev20-py3-none-any.whl
Algorithm Hash digest
SHA256 a08bccff9893ecf21e9cd2579c91e064b099ef0fa9ea0c6092517057584a97e7
MD5 05c8b92d4c8ca4b2ea511cb3b05ed8a5
BLAKE2b-256 6e885f2fb921536e6d8242294b37fe36445455995223bc1ebb27137a46e1bbaf

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