Skip to content

Commit 142b99f

Browse files
committed
removed 2 lcoal vars
1 parent 5d7d17d commit 142b99f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

ai_agent_instrumentation/opentelemetry-instrumentation-langchain-v2/tests/test_chains.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def create_chains(llm):
3636
Era: {era}
3737
Playwright: This is a synopsis for the above play:""", # noqa: E501
3838
)
39-
synopsis_chain = LLMChain(llm=llm, prompt=synopsis_prompt, output_key="synopsis", name="synopsis")
4039

4140
review_prompt = PromptTemplate(
4241
input_variables=["synopsis"],
@@ -46,10 +45,9 @@ def create_chains(llm):
4645
{synopsis}
4746
Review from a New York Times play critic of the above play:""", # noqa: E501
4847
)
49-
review_chain = LLMChain(llm=llm, prompt=review_prompt, output_key="review")
5048

5149
overall_chain = SequentialChain(
52-
chains=[synopsis_chain, review_chain],
50+
chains=[LLMChain(llm=llm, prompt=synopsis_prompt, output_key="synopsis", name="synopsis"), LLMChain(llm=llm, prompt=review_prompt, output_key="review")],
5351
input_variables=["era", "title"],
5452
output_variables=["synopsis", "review"],
5553
verbose=True,

ai_agent_instrumentation/opentelemetry-instrumentation-langchain-v2/tests/test_langgraph_agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def calculate(state: State):
4747

4848
langgraph = workflow.compile()
4949

50-
user_request = "What's 5 + 5?"
51-
response = langgraph.invoke(input={"request": user_request})["result"]
50+
response = langgraph.invoke(input={"request": "What's 5 + 5?"})["result"]
5251

5352
spans = span_exporter.get_finished_spans()
5453
for span in spans:

0 commit comments

Comments
 (0)