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

[Widgets] refactor call api-inference function #1034

Merged
merged 2 commits into from
Oct 18, 2023
Merged

Conversation

mishig25
Copy link
Collaborator

@mishig25 mishig25 commented Oct 17, 2023

Refactors call api-inference function. See files tab

@mishig25 mishig25 marked this pull request as ready for review October 17, 2023 14:29
Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

looks simpler / more compact indeed

Copy link
Contributor

@SBrandeis SBrandeis left a comment

Choose a reason for hiding this comment

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

Cleaner 👍


type Result<T> = Success<T> | LoadingModel | Error | CacheNotFound;

export async function getResponse<T>(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpicking, but getResponse is a very generic name

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe callInferenceApi ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

handled in e16171c

@mishig25 mishig25 merged commit 4699e14 into main Oct 18, 2023
@mishig25 mishig25 deleted the refactor_call_api branch October 18, 2023 10:05
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.

3 participants