Install
Setup
Connect your application to Phoenix with theregister function:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Instrument LLM applications that use the Guardrails AI framework
pip install openinference-instrumentation-guardrails guardrails-ai
register function:
from guardrails import Guard
from guardrails.hub import TwoWords
import openai
guard = Guard().use(
TwoWords(),
)
response = guard(
llm_api=openai.chat.completions.create,
prompt="What is another name for America?",
model="gpt-3.5-turbo",
max_tokens=1024,
)
print(response)
Was this page helpful?
