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.6.1.dev16.tar.gz (8.7 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.6.1.dev16-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_llm_leptonai-0.6.1.dev16.tar.gz.

File metadata

  • Download URL: swarmauri_llm_leptonai-0.6.1.dev16.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.9 Linux/6.8.0-1021-azure

File hashes

Hashes for swarmauri_llm_leptonai-0.6.1.dev16.tar.gz
Algorithm Hash digest
SHA256 b0dcdff081d999ae2dfb18f46dc9f40349f4b6746a331ad8cb54f558ad08190f
MD5 426d384b230e4ba161581dad5db474aa
BLAKE2b-256 0eb12518e47102add3eba89ad5b473e16fdee4a0499b8c710479ef1349b40779

See more details on using hashes here.

File details

Details for the file swarmauri_llm_leptonai-0.6.1.dev16-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_llm_leptonai-0.6.1.dev16-py3-none-any.whl
Algorithm Hash digest
SHA256 9cf538c5952434ef84e85c59c52234c959874314e755410f935905af801889bb
MD5 0ec6563ba8a98b72ec66586c01eae2d9
BLAKE2b-256 47ac473f89893e42e09bffb58754a621cc5fa922cb0e6236a8272e35741c2abf

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