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.1.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for magic_lamp-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 375f04d92d355de18bfdce737da7e94da69135fdf34b083ce8c9a8cfbec80a58 |
|
MD5 | 14cfa3bc19f5ebc4d0c9053892d6e232 |
|
BLAKE2b-256 | 765239157b4cd41cd24452a1523355b49ee25ac0a9b6f4e5d4262d4e7f304ad4 |