Skip to content

Commit c61ac94

Browse files
feat(docs): add python alt for UI how to (langchain-ai#5593)
Fixes langchain-ai#5311
1 parent 61676b8 commit c61ac94

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

docs/docs/cloud/how-tos/generative_ui_react.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,33 @@ export default {
3030

3131
Next, define your UI components in your `langgraph.json` configuration:
3232

33-
```json
34-
{
35-
"node_version": "20",
36-
"graphs": {
37-
"agent": "./src/agent/index.ts:graph"
38-
},
39-
"ui": {
40-
"agent": "./src/agent/ui.tsx"
41-
}
42-
}
43-
```
33+
=== "Python agent"
34+
35+
```json title="langgraph.json"
36+
{
37+
"node_version": "20",
38+
"graphs": {
39+
"agent": "./src/agent.py:graph"
40+
},
41+
"ui": {
42+
"agent": "./src/agent/ui.tsx"
43+
}
44+
}
45+
```
46+
47+
=== "JS agent"
48+
49+
```json title="langgraph.json"
50+
{
51+
"node_version": "20",
52+
"graphs": {
53+
"agent": "./src/agent/index.ts:graph"
54+
},
55+
"ui": {
56+
"agent": "./src/agent/ui.tsx"
57+
}
58+
}
59+
```
4460

4561
The `ui` section points to the UI components that will be used by graphs. By default, we recommend using the same key as the graph name, but you can split out the components however you like, see [Customise the namespace of UI components](#customise-the-namespace-of-ui-components) for more details.
4662

0 commit comments

Comments
 (0)