-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add pagination #96
Add pagination #96
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smaller nitpicks :)
js/src/run_trees.ts
Outdated
@@ -62,7 +62,7 @@ export class RunTree implements BaseRun { | |||
api_key: getEnvironmentVariable("LANGCHAIN_API_KEY"), | |||
caller_options: {}, | |||
start_time: Date.now(), | |||
end_time: Date.now(), | |||
end_time: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: shouldn't that be undefined
instead? Or maybe we should change end_time
data type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
js/src/client.ts
Outdated
@@ -108,6 +108,14 @@ const raiseForStatus = async (response: Response, operation: string) => { | |||
} | |||
}; | |||
|
|||
export async function toArray<T>(iterable: AsyncIterable<T>): Promise<T[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: do we want to expose this function to the outside? (ignore if we're just consuming it ourselves)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm probably not to start ya
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smaller nitpicks :)
js/src/tests/client.int.test.ts
Outdated
for await (const dataset of langchainClient.listDatasets({})) { | ||
datasets.push(dataset); | ||
} | ||
if (datasets.some((dataset: any) => dataset.name === datasetName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Using toArray
we would be able to get rid of any
No description provided.