diff --git a/gateway/integrations/guardrails.py b/gateway/integrations/guardrails.py index 3424881..aa73dad 100644 --- a/gateway/integrations/guardrails.py +++ b/gateway/integrations/guardrails.py @@ -364,11 +364,11 @@ async def check_guardrails( json={ "messages": messages, "policies": [g.content for g in guardrails], - "parameters": context.guardrails_parameters or {} + "parameters": context.guardrails_parameters or {}, }, headers={ "Authorization": context.get_guardrailing_authorization(), - "Accept": "application/json" + "Accept": "application/json", }, timeout=5, ) diff --git a/gateway/routes/gemini.py b/gateway/routes/gemini.py index 9a836e7..6e7fe26 100644 --- a/gateway/routes/gemini.py +++ b/gateway/routes/gemini.py @@ -58,8 +58,10 @@ async def gemini_generate_content_gateway( if endpoint not in ["generateContent", "streamGenerateContent"]: return Response( content="Invalid endpoint - the only endpoints supported are: \ - /api/v1/gateway/gemini//models/:generateContent or \ - /api/v1/gateway//gemini/models/:generateContent", + /api/v1/gateway/gemini//models/:generateContent \ + /api/v1/gateway//gemini/models/:generateContent \ + /api/v1/gateway/gemini//models/:streamGenerateContent or \ + /api/v1/gateway//gemini/models/:streamGenerateContent", status_code=400, ) headers = {