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(js): add readExamplesWithRuns method for fetching examples w/ runs #1410

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tendev-eoghan
Copy link

Also made dataKey param optional in _getCursorPaginatedList so that it can be used in multiple functions including new function readExamplesWithRuns.

Previously it was only callable from listRuns.

@agola11 agola11 requested a review from jacoblee93 January 12, 2025 21:19
}
yield responseBody[dataKey];
yield responseBody;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we missing an else here? This would now yield responseBody if responseBody[dataKey] were defined

offset = 0,
limit = 20,
}: {
sessionIds: string[];
Copy link
Collaborator

@jacoblee93 jacoblee93 Jan 15, 2025

Choose a reason for hiding this comment

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

Open Q: should we make the required parameter part of the signature?

body
)) {
if (limit) {
if (examplesYielded >= limit) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This check could happen after incrementing examplesYielded before another call occurs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants