Revert "docs: API docstrings cleanup for better documentation rendering (#3661)"

This reverts commit a8da6ba3a7.
This commit is contained in:
Francisco Arceo 2025-10-07 10:18:47 -04:00 committed by GitHub
parent 6389bf5ffb
commit 1b7e893cb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 414 additions and 614 deletions

View file

@ -96,11 +96,6 @@ class ShieldStore(Protocol):
@runtime_checkable
@trace_protocol
class Safety(Protocol):
"""Safety
OpenAI-compatible Moderations API.
"""
shield_store: ShieldStore
@webmethod(route="/safety/run-shield", method="POST", level=LLAMA_STACK_API_V1)
@ -110,9 +105,7 @@ class Safety(Protocol):
messages: list[Message],
params: dict[str, Any],
) -> RunShieldResponse:
"""Run shield.
Run a shield.
"""Run a shield.
:param shield_id: The identifier of the shield to run.
:param messages: The messages to run the shield on.
@ -124,9 +117,7 @@ class Safety(Protocol):
@webmethod(route="/openai/v1/moderations", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
@webmethod(route="/moderations", method="POST", level=LLAMA_STACK_API_V1)
async def run_moderation(self, input: str | list[str], model: str) -> ModerationObject:
"""Create moderation.
Classifies if text and/or image inputs are potentially harmful.
"""Classifies if text and/or image inputs are potentially harmful.
:param input: Input (or inputs) to classify.
Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.
:param model: The content moderation model you would like to use.