Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
pip install traceAI-guardrails
import os
os.environ["OPENAI_API_KEY"] = "your-openai-api-key"
os.environ["FI_API_KEY"] = "your-futureagi-api-key"
os.environ["FI_SECRET_KEY"] = "your-futureagi-secret-key"
from fi_instrumentation import register
from fi_instrumentation.fi_types import ProjectType
trace_provider = register(
project_type=ProjectType.EXPERIMENT,
project_name="openai_project",
)
from traceai_guardrails import GuardrailsInstrumentor
GuardrailsInstrumentor().instrument(tracer_provider=trace_provider)
from guardrails import Guard
guard = Guard()
result = guard(
messages=[
{
"role": "user",
"content": "Tell me about OpenAI",
},
],
model="gpt-4o"
)
print(f"{result}")
Was this page helpful?