mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-30 05:24:18 +00:00
chore: more API validators
We added: * make sure docstrings are present with 'params' and 'returns' * fail if someone sets 'returns: None' * fail if docstring lines don't end with a valid character. * fix the failing APIs Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
268725868e
commit
ef88a53f9c
23 changed files with 1304 additions and 574 deletions
|
|
@ -54,4 +54,12 @@ class Safety(Protocol):
|
|||
shield_id: str,
|
||||
messages: list[Message],
|
||||
params: dict[str, Any],
|
||||
) -> RunShieldResponse: ...
|
||||
) -> RunShieldResponse:
|
||||
"""Run a shield.
|
||||
|
||||
:param shield_id: The identifier of the shield to run.
|
||||
:param messages: The messages to run the shield on.
|
||||
:param params: The parameters of the shield.
|
||||
:returns: A RunShieldResponse.
|
||||
"""
|
||||
...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue