From 0bedfa3628fe9dfdb78c5b1d7af00c315d28c1f6 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Thu, 31 Oct 2024 07:00:37 -0700 Subject: [PATCH] docs: Fix typos (#2266) --- docs/docs/how-tos/use-remote-graph.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/docs/how-tos/use-remote-graph.md b/docs/docs/how-tos/use-remote-graph.md index c1295c9da..ecca665e2 100644 --- a/docs/docs/how-tos/use-remote-graph.md +++ b/docs/docs/how-tos/use-remote-graph.md @@ -38,10 +38,10 @@ Additionally, you have to provide one of the following: === "JavaScript" - ```js + ```ts import { RemoteGraph } from "@langchain/langgraph/remote"; - const url = ; + const url = ``; const graphName = "agent"; const remoteGraph = new RemoteGraph({ graphId: graphName, url }); ``` @@ -63,11 +63,11 @@ Additionally, you have to provide one of the following: === "JavaScript" - ```js + ```ts import { Client } from "@langchain/langgraph-sdk"; import { RemoteGraph } from "@langchain/langgraph/remote"; - const client = new Client({ apiUrl: }); + const client = new Client({ apiUrl: `` }); const graphName = "agent"; const remoteGraph = new RemoteGraph({ graphId: graphName, client }); ``` @@ -99,7 +99,7 @@ Since `RemoteGraph` is a `Runnable` that implements the same methods as `Compile === "JavaScript" - ```js + ```ts // invoke the graph const result = await remoteGraph.invoke({ messages: [{role: "user", content: "what's the weather in sf"}] @@ -162,9 +162,11 @@ By default, the graph runs (i.e. `.invoke()` or `.stream()` invocations) are sta === "JavaScript" - ```js + ```ts import { Client } from "@langchain/langgraph-sdk"; - const url = ; + import { RemoteGraph } from "@langchain/langgraph/remote"; + + const url = ``; const graphName = "agent"; const client = new Client({ apiUrl: url }); const remoteGraph = new RemoteGraph({ graphId: graphName, url }); @@ -173,7 +175,7 @@ By default, the graph runs (i.e. `.invoke()` or `.stream()` invocations) are sta const thread = await client.threads.create(); // invoke the graph with the thread config - const config = { configurable: { thread_id: thread["thread_id"] }}; + const config = { configurable: { thread_id: thread.thread_id }}; const result = await remoteGraph.invoke({ messages: [{ role: "user", content: "what's the weather in sf" }], }, config); @@ -219,11 +221,11 @@ Since the `RemoteGraph` behaves the same way as a regular `CompiledGraph`, it ca === "JavaScript" - ```js + ```ts import { MessagesAnnotation, StateGraph, START } from "@langchain/langgraph"; import { RemoteGraph } from "@langchain/langgraph/remote"; - const url = ; + const url = ``; const graphName = "agent"; const remoteGraph = new RemoteGraph({ graphId: graphName, url });