Skip to content

Commit b25ee21

Browse files
authored
Update index.mdx
indentations
1 parent 734bbc8 commit b25ee21

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
@@ -83,10 +83,10 @@ import sentry_sdk
8383
sentry_sdk.init(...) # same as above
8484

8585
llm = ChatOpenAI(model="gpt-3.5-turbo-0125", temperature=0, api_key="bad API key")
86-
with sentry_sdk.start_transaction(op="ai-inference", name="The result of the AI inference"):
87-
chain = (llm | StrOutputParser()).with_config({"run_name": "test-run"})
88-
response = chain.invoke([("system", "What is the capital of France?")])
89-
print(response)
86+
with sentry_sdk.start_transaction(op="ai-inference", name="The result of the AI inference"):
87+
chain = (llm | StrOutputParser()).with_config({"run_name": "test-run"})
88+
response = chain.invoke([("system", "What is the capital of France?")])
89+
print(response)
9090
```
9191

9292
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)