Skip to content

Commit 30c414b

Browse files
committed
fix: linters
1 parent 869be78 commit 30c414b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

posthog/test/ai/langchain/test_callbacks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import asyncio
12
import logging
23
import math
34
import os
45
import time
56
import uuid
6-
import asyncio
77
from typing import List, Optional, TypedDict, Union
88
from unittest.mock import patch
99

@@ -13,7 +13,7 @@
1313
from langchain_community.llms.fake import FakeListLLM, FakeStreamingListLLM
1414
from langchain_core.messages import AIMessage, HumanMessage
1515
from langchain_core.prompts import ChatPromptTemplate
16-
from langchain_core.runnables import RunnableLambda, RunnableParallel
16+
from langchain_core.runnables import RunnableLambda
1717
from langchain_openai.chat_models import ChatOpenAI
1818
from langgraph.graph.state import END, START, StateGraph
1919

@@ -1019,8 +1019,8 @@ async def sleep(x): # -> Any:
10191019
)
10201020
approximate_latency = math.floor(time.time() - start_time)
10211021
assert mock_client.capture.call_count == 3
1022+
10221023
first_call, second_call, third_call = mock_client.capture.call_args_list
1023-
print(approximate_latency, third_call[1]["properties"]["$ai_latency"])
10241024
assert first_call[1]["event"] == "$ai_generation"
10251025
assert second_call[1]["event"] == "$ai_trace"
10261026
assert second_call[1]["properties"]["$ai_trace_name"] == "RunnableSequence"

0 commit comments

Comments
 (0)