llmgen
Effortlessly generate LLM APIs by simply defining input and output schemas (by pydantic).
Quick Start
Example:
from llmgen import OpenAiApiFactory
factory = OpenAiApiFactory(
api_key="your api key here",
)
@llm.impl()
def make_joke(theme: str) -> str
"""generate a random short joke based on theme""" # just describe your api in docstring
...
# call it just like you implmented it.
res = make_joke('cat')
print(res)
# >>> "Why was the cat sitting on the computer? It wanted to keep an eye on the mouse!"
checkout /demo to see more example.
Release files for llmgen 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llmgen-0.4.0.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llmgen-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / llmgen-0.4.0.tar.gz
| Download URL | llmgen-0.4.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d867d3c6a54670bf8ce7f166774c5d2d3ffd29068dccac181a750cdc4d83fefd
|
|
BLAKE2b-256 checksum How to use checksums |
718fdd5fc7bd436368146b37d05d22292e2f1eeb983ab0f59bc6b6b6142479c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.8.19 Linux/5.15.153.1-microsoft-standard-WSL2
|
Release files / llmgen-0.4.0-py3-none-any.whl
| Download URL | llmgen-0.4.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f82b4ea7d13406078069b040a2cd1d29daf694cf4e5c7e779fa5d0cd95b2b4e
|
|
BLAKE2b-256 checksum How to use checksums |
cae597aeaacb4f82de8c9726530867130d92396a02b6388e858ff0a205f4a554
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.8.19 Linux/5.15.153.1-microsoft-standard-WSL2
|