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.
How to use the python LangChainInstrumentor to trace LangChain
pip install openinference-instrumentation-langchain langchain_openai
register function:
from langchain_core.prompts import ChatPromptTemplate
from langchain_openai import ChatOpenAI
prompt = ChatPromptTemplate.from_template("{x} {y} {z}?").partial(x="why is", z="blue")
chain = prompt | ChatOpenAI(model_name="gpt-3.5-turbo")
chain.invoke(dict(y="sky"))
Was this page helpful?
