Skip to main content

Python SDK for L1M

Project description

L1M Python SDK

Python SDK for interacting with the L1M API.

Installation

pip install l1m-dot-io

Usage

from pydantic import BaseModel
from l1m import L1M, ClientOptions, ProviderOptions

class ContactDetails(BaseModel):
  email: str
  phone: str

class UserProfile(BaseModel):
  name: str
  company: str
  contactInfo: ContactDetails


client = L1M(
  options=ClientOptions(
    provider=ProviderOptions(
      model="gpt-4",
      url="https://api.openai.com/v1/chat/completions",
      key="your-openai-key"
    )
  )
)

# Generate a structured response
user_profile = client.structured(
  input="John Smith was born on January 15, 1980. He works at Acme Inc. as a Senior Engineer and can be reached at john.smith@example.com or by phone at (555) 123-4567.",
  schema=UserProfile
)

Development

# Run tests
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

l1m_dot_io-0.1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

l1m_dot_io-0.1.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file l1m_dot_io-0.1.1.tar.gz.

File metadata

  • Download URL: l1m_dot_io-0.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for l1m_dot_io-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7181f2994ace30788b5d3e549942a0a022a49e76b6e25112c410ba0f39390c31
MD5 415ab14719c78979c684d1a824da542a
BLAKE2b-256 8cff36784e521bb480f5d7d297226ef22d1bc63e213cf4b2950cbeea8d337157

See more details on using hashes here.

File details

Details for the file l1m_dot_io-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: l1m_dot_io-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for l1m_dot_io-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31532dd057dfd9fb25f1c3fb6fef5e3d420ffb6a47b30cb85f977d4b801a0340
MD5 0635b0c176283c57332647f462d13575
BLAKE2b-256 8b4ef4bf414864927b58097ceee72838cb6a2244a025f99614c09db150309a16

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