Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 462 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 462 Bytes

Sucrose

Inspired by fructose https://github.com/bananaml/fructose, but uses the ollama python client. Supports pydantic models.

pip install sucrose_ollama
from sucrose import Sucrose
ai = Sucrose()

@ai
def describe(animals: list[str]) -> str:
  """
  Given a list of animals, use one word that'd describe them all.
  """
  ...

description = describe(["dog", "cat", "parrot", "goldfish"])
print(description) # -> "pets" type: str