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.
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.0.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for magic_lamp-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3496fbf88d97ffff8d20bf442858092a9e6928d426c4295ee6fd87c76847c7a |
|
MD5 | 97ed31ba2427f13f3d2da90c5991dc61 |
|
BLAKE2b-256 | d8f9b59e4dd8c1262b8475d3b0d6f9768d8f28f1575a2a348ed75370c1c74d87 |