We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a23a34f commit 0854815Copy full SHA for 0854815
1 file changed
langfuse/openai.py
@@ -791,6 +791,9 @@ def _wrap(
791
model=model,
792
output=completion,
793
usage_details=usage,
794
+ cost_details=_parse_cost(openai_response.usage)
795
+ if hasattr(openai_response, "usage")
796
+ else None,
797
).end()
798
799
return openai_response
@@ -855,6 +858,9 @@ async def _wrap_async(
855
858
856
859
usage=usage, # backward compat for all V2 self hosters
857
860
861
862
863
864
865
866
0 commit comments