Skip to content

Commit 82598a2

Browse files
committed
remove type
1 parent 03cea4e commit 82598a2

File tree

1 file changed

+2
-5
lines changed
  • src/langtrace_python_sdk/instrumentation/google_genai

1 file changed

+2
-5
lines changed

src/langtrace_python_sdk/instrumentation/google_genai/patch.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from opentelemetry.trace import Tracer, SpanKind
1212
from opentelemetry.sdk.trace import Span
1313
from langtrace.trace_attributes import SpanAttributes
14-
from google.genai.types import GenerateContentResponse
1514

1615
from typing import Iterator
1716

@@ -72,9 +71,7 @@ def traced_method(wrapped, instance, args, kwargs):
7271
return traced_method
7372

7473

75-
def set_streaming_response_attributes(
76-
span: Span, response: Iterator[GenerateContentResponse]
77-
):
74+
def set_streaming_response_attributes(span: Span, response):
7875
accum_completion = ""
7976
for chunk in response:
8077
set_span_attribute(
@@ -103,7 +100,7 @@ def set_streaming_response_attributes(
103100
set_event_completion(span, [{"role": "assistant", "content": accum_completion}])
104101

105102

106-
def set_response_attributes(span: Span, response: GenerateContentResponse):
103+
def set_response_attributes(span: Span, response):
107104
completions = []
108105
for candidate in response.candidates:
109106
set_span_attribute(

0 commit comments

Comments
 (0)