add back /v1/openai/v1 temporarily while we update client packages properly

This commit is contained in:
Ashwin Bharambe 2025-09-29 13:35:52 -07:00
parent 1372f2f24a
commit 90bccbc38e
9 changed files with 2777 additions and 0 deletions

View file

@ -114,6 +114,7 @@ class Safety(Protocol):
"""
...
@webmethod(route="/openai/v1/moderations", method="POST", level=LLAMA_STACK_API_V1)
@webmethod(route="/moderations", method="POST", level=LLAMA_STACK_API_V1)
async def run_moderation(self, input: str | list[str], model: str) -> ModerationObject:
"""Classifies if text and/or image inputs are potentially harmful.