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

add webhooks modal example #173

Merged
merged 6 commits into from
Apr 19, 2024
Merged

Conversation

hwchase17
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Apr 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langsmith-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2024 0:39am

@@ -77,3 +77,116 @@ When delivering events to your webhook endpoint we follow these guidelines
- If your endpoint returns a 5xx status code in less than 5 seconds we retry up to 2 times with exponential backoff.
Copy link

@charlesfrye charlesfrye Apr 17, 2024

Choose a reason for hiding this comment

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

There are some cases where a Modal web endpoint might not spin up and ACK in less than 5 seconds. To avoid that, you can put keep_warm on the stub.function so you don't hit cold boots, but then you lose autoscaling. You can also reduce the chance of by putting less work in the path of the request -- e.g. defining a separate stub.function to handle a run and using Function.spawn to launch it as a background task, which means you can get to the ACK faster.

I'll include that in my example, so no need to put it in here, just wanted to raise the issue.

Copy link

@charlesfrye charlesfrye left a comment

Choose a reason for hiding this comment

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

Left some comments -- the code changes are the only ones I'd consider blocking, the rest are just nice-to-haves.

@hwchase17 hwchase17 changed the title [DO NOT MERGE] add docs for classifier optimization add webhooks modal example Apr 18, 2024
@hwchase17 hwchase17 merged commit fb9ada9 into main Apr 19, 2024
4 checks passed
@hwchase17 hwchase17 deleted the harrison/classifier-optimization branch April 19, 2024 00:44
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