Effortlessly generate LLM APIs by simply defining input and output schemas (by pydantic).
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.