Skip to content

Google Gemini

Install

$pip install aiguard-safety

Set GEMINI_API_KEY.

Code

python
import aiguard

response = aiguard.chat(
    model="gemini/gemini-1.5-pro",
    messages=[{"role": "user", "content": "Explain RAG in one paragraph."}],
)
print(response.choices[0].message.content)