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

swap axios for fetch in the JS client #409

Merged
merged 3 commits into from
May 3, 2023
Merged

Conversation

jeffchuber
Copy link
Contributor

@jeffchuber jeffchuber commented Apr 22, 2023

All the good stuff here is credit of @gustawdaniel . This separate PR is mainly handling merge conflicts from main moving on with additional functionality.

#348

This PR

@gustawdaniel feel free to push up this PR separately and I'll merge yours instead

TODO: bump npm and cut new release

@jeffchuber jeffchuber requested a review from HammadB April 24, 2023 13:22
@gustawdaniel
Copy link

@jeffchuber for me this does not matter. Feel free to merge this and close my PR :)

@jeffchuber
Copy link
Contributor Author

@gustawdaniel roger that. all the credit to you - thanks for figuring out the hard edges here!

// we need to override constructors to make it work with jest
// https://stackoverflow.com/questions/76007003/jest-tobeinstanceof-expected-constructor-array-received-constructor-array
function repack(value: unknown): any {
if (Boolean(value) && typeof value === "object") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

does if value give the same semantics here?

function repack(value: unknown): any {
if (Boolean(value) && typeof value === "object") {
if (Array.isArray(value)) {
return new Array(...value);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to handle nested values?

Documents = 'documents',
Embeddings = 'embeddings',
Metadatas = 'metadatas',
Distances = 'distances'
Copy link
Collaborator

@HammadB HammadB Apr 26, 2023

Choose a reason for hiding this comment

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

Is this unused?

@HammadB
Copy link
Collaborator

HammadB commented Apr 26, 2023

Approved pending comments!

@r03t
Copy link

r03t commented May 2, 2023

Can you merge this one?

@jeffchuber jeffchuber merged commit 25e2cff into main May 3, 2023
@jeffchuber jeffchuber deleted the gustawdaniel-rework branch May 3, 2023 06:09
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.

None yet

4 participants