v0.11.0
What's Changed
Here's a quick example - see README For complete description.
from aviary import fenv
@fenv.start()
def my_env(topic):
# return first observation, and the starting environment state
# (empty in this case)
return f"Write a story about {topic}", {}
@my_env.tool()
def multiply(x: float, y: float) -> float:
"""Multiply two numbers."""
return x * y
@my_env.tool()
def print_story(story: str | bytes, state) -> None:
"""Print a story to user and complete task."""
print(story)
state.reward = 1
state.done = True
env = my_env(topic="foo")
obs, tools = await env.reset()
Full Changelog: v0.10.2...v0.11.0