Skip to content

Commit

Permalink
Document Enabling/Disabling Endpoints (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
eyurtsev authored Dec 5, 2023
1 parent 5feccb6 commit 483e24f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,3 +449,22 @@ Example widget:
<p align="center">
<img src="https://github.com/langchain-ai/langserve/assets/3205522/52199e46-9464-4c2e-8be8-222250e08c3f" width="50%"/>
</p>



### 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"])
```

0 comments on commit 483e24f

Please sign in to comment.