Skip to content

Commit

Permalink
push fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
achang97 committed Jul 1, 2024
1 parent c27314c commit 45cb369
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@ def _set_prompts(span, messages):

_set_span_attribute(span, f"{prefix}.role", msg.get("role"))
if msg.get("content"):
_set_span_attribute(span, f"{prefix}.content", msg.get("content"))
content = msg.get("content")
if isinstance(content, list):
content = json.dumps(content)
_set_span_attribute(span, f"{prefix}.content", content)
if msg.get("tool_calls"):
_set_span_attribute(
span, f"{prefix}.tool_calls", json.dumps(msg.get("tool_calls"))
Expand Down

0 comments on commit 45cb369

Please sign in to comment.