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_dot_io 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.0.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file l1m_dot_io-0.1.0.tar.gz.
File metadata
- Download URL: l1m_dot_io-0.1.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce9306b2be11910c486c006e72906885aaee4b7113b0d1f107cf02ee9b0ba9e8
|
|
| MD5 |
dbf5e82dbce40b61ed71175d60268b50
|
|
| BLAKE2b-256 |
c8b3b68fdf37eb040d3cd72e9fa44d9a8e0eac7dbc6580677476fae43d5909d8
|
File details
Details for the file l1m_dot_io-0.1.0-py3-none-any.whl.
File metadata
- Download URL: l1m_dot_io-0.1.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa5144a80d68aa4735c7a1b55571556a515ccd5a1c0c1230a5525999d1fb9616
|
|
| MD5 |
98e2391bf2227c04e64483f7fd6a6512
|
|
| BLAKE2b-256 |
29281cce9b460a023a3a1980d0843cdf66aae869accc81c33a0867c1ac39ea06
|