Skip to content

Commit 1d6feae

Browse files
committed
update
1 parent c8b4490 commit 1d6feae

File tree

1 file changed

+76
-63
lines changed

1 file changed

+76
-63
lines changed

Others/Windows.md

+76-63
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# LangGraph GUI Setup on Windows
1+
# LangGraph GUI Setup on Windows
22

3-
This guide will help you set up and run the LangGraph-GUI, both backend and frontend, on a Windows environment.
3+
This guide will help you set up and run the LangGraph-GUI, both backend and frontend, on a Windows environment, using environment variables for backend port and Ollama URL.
44

55
## Prerequisites
66

@@ -12,85 +12,98 @@ Before you begin, ensure you have the following installed on your system:
1212

1313
## Backend Setup
1414

15-
1. **Open a PowerShell Terminal**
16-
Open a PowerShell terminal window to start the setup process.
17-
18-
2. **Create a Conda Environment (Optional)**
19-
Create a new Conda environment for the LangGraph backend:
20-
```bash
21-
conda create --name langgraph-backend python=3.11
22-
```
23-
Activate your new environment:
24-
```bash
25-
conda activate langgraph-backend
26-
```
27-
28-
4. **Clone the Backend Repository**
29-
Clone the LangGraph backend repository from GitHub:
30-
```bash
31-
git clone https://github.com/LangGraph-GUI/LangGraph-GUI-backend
32-
```
33-
34-
5. **Navigate to the Backend Directory**
35-
Change directory to the backend project folder:
36-
```bash
37-
cd LangGraph-GUI-backend
38-
```
39-
40-
6. **Install Python Dependencies**
41-
Install the required Python packages using `pip`:
42-
```bash
43-
pip install -r requirements.txt
44-
```
45-
46-
7. **Start the Backend Server**
47-
Run the backend server:
48-
```bash
49-
mkdir src/workspace
50-
cd src/workspace
51-
python ../server.py
52-
```
15+
1. **Open a PowerShell Terminal**
16+
Open a PowerShell terminal window to start the setup process.
17+
18+
2. **Create a Conda Environment (Optional)**
19+
Create a new Conda environment for the LangGraph backend:
20+
```bash
21+
conda create --name langgraph-backend python=3.11
22+
```
23+
Activate your new environment:
24+
```bash
25+
conda activate langgraph-backend
26+
```
27+
28+
3. **Clone the Backend Repository**
29+
Clone the LangGraph backend repository from GitHub:
30+
```bash
31+
git clone https://github.com/LangGraph-GUI/LangGraph-GUI-backend
32+
```
33+
34+
4. **Navigate to the Backend Directory**
35+
Change directory to the backend project folder:
36+
```bash
37+
cd LangGraph-GUI-backend
38+
```
39+
40+
5. **Install Python Dependencies**
41+
Install the required Python packages using `pip`:
42+
```bash
43+
pip install -r requirements.txt
44+
```
45+
6. **Start the Backend Server**
46+
47+
**Set Environment Variables**
48+
Before starting the backend, you need to set the following environment variables. If you skip this, the default values will be used:
49+
50+
* **BACKEND_PORT:** The port number for the backend server. (Default: 5000)
51+
* **OLLAMA_BASE_URL:** The base URL for your Ollama service. (Default: `http://localhost:11434`)
52+
53+
To set these variables for your PowerShell session, use:
54+
55+
```powershell
56+
$env:BACKEND_PORT=5000
57+
$env:OLLAMA_BASE_URL="http://localhost:11434"
58+
```
59+
60+
Run the backend server:
61+
```bash
62+
mkdir src/workspace
63+
cd src/workspace
64+
python ../server.py
65+
```
5366

5467
## Frontend Setup
5568

5669
1. **Open Another PowerShell Terminal**
57-
Open a new PowerShell terminal window.
70+
Open a new PowerShell terminal window.
5871

5972
2. **Clone the Frontend Repository**
60-
**frontend need dep**
61-
Clone the LangGraph frontend repository from GitHub:
62-
```bash
63-
git clone --recursive https://github.com/LangGraph-GUI/LangGraph-GUI-frontend
64-
```
73+
**frontend need dep**
74+
Clone the LangGraph frontend repository from GitHub:
75+
```bash
76+
git clone --recursive https://github.com/LangGraph-GUI/LangGraph-GUI-frontend
77+
```
6578

6679
3. **Navigate to the Frontend Directory**
67-
Change directory to the frontend project folder:
68-
```bash
69-
cd LangGraph-GUI-frontend
70-
```
80+
Change directory to the frontend project folder:
81+
```bash
82+
cd LangGraph-GUI-frontend
83+
```
7184

7285
4. **Install Node.js Dependencies**
73-
Use `npm` to install the required packages:
74-
```bash
75-
npm install
76-
```
86+
Use `npm` to install the required packages:
87+
```bash
88+
npm install
89+
```
7790

7891
5. **Start the Frontend Server**
79-
Launch the frontend server:
80-
```bash
81-
npm start
82-
```
92+
Launch the frontend server:
93+
```bash
94+
npm start
95+
```
8396

8497
## Ollama Setup
8598

8699
1. **Open Another PowerShell Terminal**
87-
Open another PowerShell terminal window.
100+
Open another PowerShell terminal window.
88101

89102
2. **Start Ollama**
90-
Run the Ollama service:
91-
```bash
92-
ollama serve
93-
```
103+
Run the Ollama service:
104+
```bash
105+
ollama serve
106+
```
94107

95108
## Conclusion
96109

0 commit comments

Comments
 (0)