Skip to content

Commit 745e223

Browse files
authored
Update index.mdx
indentation
1 parent 5b8bf3d commit 745e223

File tree

1 file changed

+4
-4
lines changed
  • docs/platforms/python/integrations/langchain

1 file changed

+4
-4
lines changed

docs/platforms/python/integrations/langchain/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ import sentry_sdk
8181
sentry_sdk.init(...) # same as above
8282

8383
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-
chain = (llm | StrOutputParser()).with_config({"run_name": "test-run"})
86-
response = chain.invoke([("system", "What is the capital of France?")])
87-
print(response)
84+
with sentry_sdk.start_transaction(op="ai-inference", name="The result of the AI inference"):
85+
chain = (llm | StrOutputParser()).with_config({"run_name": "test-run"})
86+
response = chain.invoke([("system", "What is the capital of France?")])
87+
print(response)
8888
```
8989

9090
After running this script, a transaction will be created in the Performance section of [sentry.io](https://sentry.io). Additionally, an error event (about the bad API key) will be sent to [sentry.io](https://sentry.io) and will be connected to the transaction.

0 commit comments

Comments
 (0)