Skip to content

Commit

Permalink
bug: typo in README and slight cognitive overload terminology lift (#226
Browse files Browse the repository at this point in the history
)

Just a quick fix from `/chain/invoke` in the TypeScript example.

Also tried to do a little clarity lift on the endpoint name. `chain`
felt a little vague for the endpoint, and I think misses the point.

Thanks for the project all!

Co-authored-by: Eugene Yurtsev <[email protected]>
  • Loading branch information
Craig Dennis and eyurtsev authored Nov 15, 2023
1 parent 1b61b04 commit 9ee157e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ prompt = ChatPromptTemplate.from_template("tell me a joke about {topic}")
add_routes(
app,
prompt | model,
path="/chain",
path="/joke",
)

if __name__ == "__main__":
Expand Down Expand Up @@ -135,7 +135,7 @@ from langserve import RemoteRunnable

openai = RemoteRunnable("http://localhost:8000/openai/")
anthropic = RemoteRunnable("http://localhost:8000/anthropic/")
joke_chain = RemoteRunnable("http://localhost:8000/chain/")
joke_chain = RemoteRunnable("http://localhost:8000/joke/")

joke_chain.invoke({"topic": "parrots"})

Expand Down Expand Up @@ -170,7 +170,7 @@ In TypeScript (requires LangChain.js version 0.0.166 or later):
import { RemoteRunnable } from "langchain/runnables/remote";

const chain = new RemoteRunnable({
url: `http://localhost:8000/chain/invoke/`,
url: `http://localhost:8000/joke/`,
});
const result = await chain.invoke({
topic: "cats",
Expand All @@ -182,7 +182,7 @@ Python using `requests`:
```python
import requests
response = requests.post(
"http://localhost:8000/chain/invoke/",
"http://localhost:8000/joke/invoke/",
json={'input': {'topic': 'cats'}}
)
response.json()
Expand All @@ -191,7 +191,7 @@ response.json()
You can also use `curl`:

```sh
curl --location --request POST 'http://localhost:8000/chain/invoke/' \
curl --location --request POST 'http://localhost:8000/joke/invoke/' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": {
Expand Down

0 comments on commit 9ee157e

Please sign in to comment.