Add pre commit (#26)
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
"""The structured output models used in the werewolf game."""
|
||||
from typing import Literal
|
||||
|
||||
from agentscope.agent import AgentBase
|
||||
from pydantic import BaseModel, Field
|
||||
from agentscope.agent import AgentBase
|
||||
|
||||
|
||||
class DiscussionModel(BaseModel):
|
||||
@@ -44,7 +44,9 @@ def get_poison_model(agents: list[AgentBase]) -> type[BaseModel]:
|
||||
poison: bool = Field(
|
||||
description="Do you want to use the poison potion",
|
||||
)
|
||||
name: Literal[tuple(_.name for _ in agents)] | None = Field( # type: ignore
|
||||
name: Literal[ # type: ignore
|
||||
tuple(_.name for _ in agents)
|
||||
] | None = Field(
|
||||
description="The name of the player you want to poison, if you "
|
||||
"don't want to poison anyone, just leave it empty",
|
||||
default=None,
|
||||
@@ -75,7 +77,9 @@ def get_hunter_model(agents: list[AgentBase]) -> type[BaseModel]:
|
||||
shoot: bool = Field(
|
||||
description="Whether you want to use the shooting ability or not",
|
||||
)
|
||||
name: Literal[tuple(_.name for _ in agents)] | None = Field( # type: ignore
|
||||
name: Literal[ # type: ignore
|
||||
tuple(_.name for _ in agents)
|
||||
] | None = Field(
|
||||
description="The name of the player you want to shoot, if you "
|
||||
"don't want to the ability, just leave it empty",
|
||||
default=None,
|
||||
|
||||
Reference in New Issue
Block a user