mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-26 02:07:28 +08:00
87b0bca30c
* cloud doc * doc refactor * doc move * seo * remove doc * yml * doc * fix: tsconfig * fix: tsconfig
26 lines
991 B
Plaintext
26 lines
991 B
Plaintext
---
|
|
title: V4.1
|
|
description: Upgrade guide from older versions to FastGPT V4.1
|
|
---
|
|
|
|
If you are **upgrading from an older version to V4.1**, the chat storage structure has been redesigned. You'll need to initialize the existing stored data.
|
|
|
|
## Update Environment Variables
|
|
|
|
V4.1 simplified the PostgreSQL and MongoDB connection variables — you now only need a single URL for each:
|
|
|
|
Note: `/fastgpt` and `/postgres` refer to database names and must match the values from your previous configuration.
|
|
|
|
```bash
|
|
# MongoDB config — no changes needed. If connection fails, try removing ?authSource=admin
|
|
- MONGODB_URI=mongodb://username:password@mongo:27017/fastgpt?authSource=admin
|
|
# PostgreSQL config — no changes needed
|
|
- PG_URL=postgresql://username:password@pg:5432/postgres
|
|
```
|
|
|
|
## Initialization API
|
|
|
|
Deploy the new version, then send 1 HTTP request (remember to include `headers.rootkey` — this value comes from your environment variables):
|
|
|
|
- https://xxxxx/api/admin/initChatItem
|