We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53fad65 commit 5b8bf3dCopy full SHA for 5b8bf3d
docs/platforms/python/integrations/langchain/index.mdx
@@ -81,8 +81,9 @@ import sentry_sdk
81
sentry_sdk.init(...) # same as above
82
83
llm = ChatOpenAI(model="gpt-3.5-turbo-0125", temperature=0, api_key="bad API key")
84
-with sentry_sdk.start_transaction(op="ai-inference", name="The result of the AI inference"):
85
- response = llm.invoke([("system", "What is the capital of France?")])
+ with sentry_sdk.start_transaction(op="ai-inference", name="The result of the AI inference"):
+ chain = (llm | StrOutputParser()).with_config({"run_name": "test-run"})
86
+ response = chain.invoke([("system", "What is the capital of France?")])
87
print(response)
88
```
89
0 commit comments