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

basic request validation #843

Merged
merged 6 commits into from
Oct 19, 2023
Merged

basic request validation #843

merged 6 commits into from
Oct 19, 2023

Conversation

mxyng
Copy link
Contributor

@mxyng mxyng commented Oct 18, 2023

  • API returns {"error": "EOF"} when request is empty
  • Most handlers pass request fields without checking if they're empty produces bad errors
  • created_at on an empty generate request isn't set so it incorrectly shows 0001-01-01T00:00:00Z
  • Create's workDir isn't used after deprecate modelfile embed command #759

Note: there's an inconsistency in naming the key for model names. Some requests (Generate, Embedding) use model while others (Pull, Push, Create) use name

Copy link
Member

@jmorganca jmorganca left a comment

Choose a reason for hiding this comment

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

Great cleanup!!

@mxyng mxyng merged commit 0a53da0 into main Oct 19, 2023
@mxyng mxyng deleted the mxyng/request-validation branch October 19, 2023 16:30
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

2 participants