Skip to main content

Easily integrate LLMs into Python code.

Project description

magic-lamp

PyPI - Version

Easily integrate LLM calls into Python code. Requires environment variable OPENAI_API_KEY to be set.

pip install magic-lamp

Example

import magic_lamp

format_name = magic_lamp.Function(
    'Format this surname in a way that it would be written out.',
    examples=[
        ("PERALTA", "Peralta"),
        ("OCONNELL", "O'Connel"),
        ("MCDONALD", "McDonald")
    ],
    model="gpt-4o-mini"
)

print(format_name("MCDOWELL"))

Alternatives

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

magic_lamp-0.2.0.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

magic_lamp-0.2.0-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page