Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playground): plumb through tools on spans to playground #5203

Merged
merged 5 commits into from
Oct 28, 2024

Conversation

Parker-Stafford
Copy link
Contributor

  • plumbs through tools on spans to playground
  • fixes a bug whre input / output pane was not scrollable
  • fixes a bug where llm.tools attributes were not being added as lists to span attributes but as a map of tool_id => tool in playground spans
  • supports for rendering tool cal output messages when coming from span to playground

tools on span to playground

Screen.Recording.2024-10-25.at.4.07.54.PM.mov

scrollable input / output

made the whole pane scrollable so we didn't have to make each accordion item scroll which would make us need to enforce a max height on each, causing one to shrink when the other grows

Screen.Recording.2024-10-25.at.10.27.58.AM.mov

Resulting ui error from tool attributes bug

Screenshot 2024-10-25 at 3 49 09 PM
attributes
Screenshot 2024-10-25 at 3 11 53 PM

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 25, 2024
@@ -624,7 +624,7 @@ def _llm_output_messages(
yield f"{LLM_OUTPUT_MESSAGES}.0.{MESSAGE_ROLE}", "assistant"
if content := "".join(chunk.content for chunk in text_chunks):
yield f"{LLM_OUTPUT_MESSAGES}.0.{MESSAGE_CONTENT}", content
for tool_call_index, tool_call_chunks_ in tool_call_chunks.items():
for tool_call_index, (_tool_call_id, tool_call_chunks_) in enumerate(tool_call_chunks.items()):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving this id in here so it can be used in #5194 and #5195

[ToolAttributePostfixes.json_schema]: toolJSONSchemaSchema,
}),
})
.optional()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made everything optional here and filtered before passing to the playground so we can capture some tools even if some are malformed

@Parker-Stafford Parker-Stafford self-assigned this Oct 28, 2024
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Oct 28, 2024
@Parker-Stafford Parker-Stafford merged commit be1a103 into main Oct 28, 2024
35 checks passed
@Parker-Stafford Parker-Stafford deleted the parker/span-tools-to-playground branch October 28, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants