blob: 2b910f503b5c8ae39376bf5872910d44c0bea493 [file] [log] [blame]
# run.py
import hamilton_anthropic
from hamilton import driver, lifecycle
dr = (
driver.Builder()
.with_modules(hamilton_anthropic)
.with_config({"provider": "anthropic"})
# we just need to add this line to get things printing
# to the console; see DAGWorks for a more off-the-shelf
# solution.
.with_adapters(lifecycle.PrintLn(verbosity=2))
.build()
)
print(dr.execute(["joke_response"], inputs={"topic": "ice cream"}))