(docs + fix) Add docs on Moderations endpoint, Text Completion (#6947)

* fix _pass_through_moderation_endpoint_factory

* fix route_llm_request

* doc moderations api

* docs on /moderations

* add e2e tests for moderations api

* docs moderations api

* test_pass_through_moderation_endpoint_factory

* docs text completion
This commit is contained in:
Ishaan Jaff 2024-11-27 16:30:48 -08:00 committed by GitHub
parent 330361be0c
commit 4170433365
7 changed files with 390 additions and 6 deletions

View file

@ -1040,8 +1040,11 @@ def test_pattern_match_deployment_set_model_name(
async def test_pass_through_moderation_endpoint_factory(model_list):
router = Router(model_list=model_list)
response = await router._pass_through_moderation_endpoint_factory(
original_function=litellm.amoderation, input="this is valid good text"
original_function=litellm.amoderation,
input="this is valid good text",
model=None,
)
assert response is not None
@pytest.mark.parametrize(