Skip to content

Commit 87cf4b5

Browse files
committed
docs: improved fastapi section
1 parent 4f0e034 commit 87cf4b5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/prompt_engineering/tutorials/prompt_commit.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,13 @@ It's important to understand that LangSmith webhooks for prompt commits are gene
182182

183183
## Implementing a FastAPI Server for Webhook Reception
184184

185-
To effectively process webhook notifications from LangSmith when prompts are updated, a dedicated FastAPI server is implemented. This publicly accessible server is designed to:
185+
To effectively process webhook notifications from LangSmith when prompts are updated, an intermediary server application is necessary. This server will act as the receiver for HTTP POST requests sent by LangSmith. For demonstration purposes in this guide, we will outline the creation of a simple FastAPI application to fulfill this role.
186186

187-
1. **Receive Webhook Requests:** Listen for incoming HTTP POST requests sent by LangSmith.
188-
2. **Parse Payloads:** Extract and interpret the JSON-formatted prompt manifest from the request body.
189-
3. **Commit to GitHub:** Programmatically create a new commit in your specified GitHub repository, containing the updated prompt manifest. This ensures your prompts remain version-controlled and synchronized with changes made in LangSmith.
187+
This publicly accessible server will be responsible for:
188+
189+
1. **Receiving Webhook Requests:** Listening for incoming HTTP POST requests.
190+
2. **Parsing Payloads:** Extracting and interpreting the JSON-formatted prompt manifest from the request body.
191+
3. **Committing to GitHub:** Programmatically creating a new commit in your specified GitHub repository, containing the updated prompt manifest. This ensures your prompts remain version-controlled and synchronized with changes made in LangSmith.
190192

191193
For deployment, platforms like [Render.com](https://render.com/) (offering a suitable free tier), Vercel, Fly.io, or other cloud providers (AWS, GCP, Azure) can be utilized to host the FastAPI application and obtain a public URL.
192194

0 commit comments

Comments
 (0)