update fix of pr review

This commit is contained in:
better629 2024-02-01 10:42:18 +08:00
parent 2d372a8863
commit c0a4d7c4c9
4 changed files with 7 additions and 17 deletions

View file

@ -254,6 +254,7 @@ async def test_action_node_with_image():
node = await invoice.fill(context="", llm=LLM(), images=[img_base64])
assert node.instruct_content.invoice
class ToolDef(BaseModel):
tool_name: str = Field(default="a", description="tool name", examples=[])
description: str = Field(default="b", description="tool description", examples=[])

View file

@ -18,7 +18,7 @@ class ForTestEnv(Environment):
value: int = 0
@mark_as_readable
def read_api_no_parms(self):
def read_api_no_param(self):
return self.value
@mark_as_readable
@ -46,5 +46,5 @@ async def test_ext_env():
with pytest.raises(ValueError):
await env.observe("not_exist_api")
assert await env.observe("read_api_no_parms") == 15
assert await env.observe("read_api_no_param") == 15
assert await env.observe(EnvAPIAbstract(api_name="read_api", kwargs={"a": 5, "b": 5})) == 10