Easily integrate LLMs into Python code.
Project description
magic-lamp
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)
Built Distribution
Close
Hashes for magic_lamp-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a52ef3ebc3f6aec303354af15dbf43cd24d019f066a696438d764f7f1a605ab7 |
|
MD5 | 386aec38605caa6f3067a5acfb15e404 |
|
BLAKE2b-256 | 64e78cbcdaadfc1bd212020854bbc88343902fd440cc7b904ea6843be02b9e2d |