From 483e24fecb9dacb7e0786444bc4b7ab1e2751e97 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Tue, 5 Dec 2023 16:13:06 -0500 Subject: [PATCH] Document Enabling/Disabling Endpoints (#289) --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 52c3e690..6f4e8a40 100644 --- a/README.md +++ b/README.md @@ -449,3 +449,22 @@ Example widget:

+ + + +### Enabling / Disabling Endpoints (LangServe >=0.0.33) + +You can enable / disable which endpoints are exposed. Use `enabled_endpoints` if you want to make sure to never get a new endpoint when upgrading langserve to a newer verison. + +Enable: The code below will only enable `invoke`, `batch` and the corresponding `config_hash` endpoint variants. + + +```python +add_routes(app, chain, enabled_endpoints=("invoke", "batch", "config_hashes")) +``` + +Disable: The code below will disable the playground for the chain + +```python +add_routes(app, chain, disabled_endpoints=["playground"]) +```