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): create llm span for playground runs #4982

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

axiomofjoy
Copy link
Contributor

@axiomofjoy axiomofjoy commented Oct 14, 2024

Creates LLM span for playground runs.

Screenshot 2024-10-13 at 9 16 06 PM Screenshot 2024-10-13 at 9 16 18 PM

resolves #4856

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Oct 14, 2024
@axiomofjoy axiomofjoy changed the base branch from main to playground October 14, 2024 04:24
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Oct 14, 2024
Comment on lines +238 to +239
if isinstance(obj, BaseModel):
return obj.model_dump()
Copy link
Contributor

Choose a reason for hiding this comment

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

fyi, we have a jsonify() helper function in utilities

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems to be breaking when exported over OTel

"""
Converts an integer to a hexadecimal string.
"""
return hex(number)[2:]
Copy link
Contributor

Choose a reason for hiding this comment

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

fyi, this has a difference in terms of string length.

Screenshot 2024-10-14 at 8 27 19 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using number.to_bytes(8, "big") results in OverflowError: int too big to convert

src/phoenix/server/api/subscriptions.py Show resolved Hide resolved
src/phoenix/server/api/subscriptions.py Show resolved Hide resolved
src/phoenix/server/api/subscriptions.py Show resolved Hide resolved
@axiomofjoy axiomofjoy merged commit 39c9940 into playground Oct 14, 2024
30 checks passed
@axiomofjoy axiomofjoy deleted the xander/playground-spans branch October 14, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[playground][gql] LLM span recording of chat completions (persistence)
2 participants