Skip to content

Commit 19601b2

Browse files
pyschtalizenhom
andauthored
Fix swapped arguments in Ollama instrumentation (#416)
Arguments for `StreamWrapper` in `ageneric_patch` are swapped Co-authored-by: Ali Waleed <[email protected]>
1 parent 8672c8f commit 19601b2

File tree

1 file changed

+1
-1
lines changed
  • src/langtrace_python_sdk/instrumentation/ollama

1 file changed

+1
-1
lines changed

src/langtrace_python_sdk/instrumentation/ollama/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async def traced_method(wrapped, instance, args, kwargs):
8484
try:
8585
result = await wrapped(*args, **kwargs)
8686
if kwargs.get("stream"):
87-
return StreamWrapper(span, result)
87+
return StreamWrapper(result, span)
8888
else:
8989
_set_response_attributes(span, result)
9090
span.end()

0 commit comments

Comments
 (0)