Comments (5)
Please follow the issue template to update description of your issue.
from chatgpt-next-web.
Bot detected the issue body's language is not English, translate it automatically.
Title: [Bug]
from chatgpt-next-web.
临时解决方法是修改json限制session数量,再保存
import json
# 原始文件路径
original_file_path = r'xxxxPM.json'
# 新文件路径
new_file_path = r'yyyPM_limited.json'
# 加载JSON数据
try:
with open(original_file_path, 'r', encoding='utf-8') as file:
data = json.load(file)
print("原始JSON文件加载成功。")
# 限制 'chat-next-web-store' 键下的列表为100条
data['chat-next-web-store']['sessions'] = data['chat-next-web-store']['sessions'][:100]
# 将修改后的数据保存到新文件
with open(new_file_path, 'w', encoding='utf-8') as new_file:
json.dump(data, new_file, ensure_ascii=False, indent=4)
print(f"限制后的数据已保存到新文件:{new_file_path}")
except FileNotFoundError:
print(f"原始文件{original_file_path}未找到。")
except json.JSONDecodeError:
print(f"原始文件{original_file_path}不是有效的JSON格式。")
except Exception as e:
print(f"处理文件时发生错误:{e}")
from chatgpt-next-web.
感谢反馈,会尽快解决这个问题
from chatgpt-next-web.
Bot detected the issue body's language is not English, translate it automatically.
Thanks for the feedback, we will solve this problem as soon as possible
from chatgpt-next-web.
Related Issues (20)
- [Bug] 一直在一个页面不动,等一会儿就显示bug HOT 6
- [Bug] No git or not from git repo HOT 13
- [Bug] 部署在netlify,响应流中断 HOT 2
- [Feature Request]: Support for Multiple NextChat Windows with Different Server Configurations
- [Bug] v2.12.14版本添加代理后无法访问 HOT 20
- [Feature Request]: Open API 07.09 断供会影响使用吗 HOT 3
- [Feature Request]: 云端同步 HOT 1
- [Bug] 会遇到触发finish_reason为stop的情况。 HOT 3
- 在mac图标风格统一的问题[Bug] HOT 3
- [Bug] Auto generate title doesn't work when using a mask
- [Feature Request]: Add a bookmark for a single conversation.
- [Feature Request]: 希望早日支持插件功能 HOT 1
- 请问本地部署以后怎么才能外网访问呢? HOT 5
- [Bug] 自定义api仅仅可以再localhost中使用 HOT 3
- [Bug] docker 镜像更新到latest还是提示v2.12.3,网页端还是提示升级。 HOT 3
- [Feature Request]: 可以支持huggingface吗?
- [Feature Request]: V2.12.4 之后使用claude 3.5 模型会强制走claude API,是否可以兼容Open API,可以使用中转平台的key呢。 HOT 11
- [Feature Request]: 能不能加一个”继续生成“的选项。接着前一条没有输出完整的对话继续生成。 HOT 1
- [Bug] Docker 版无法使用 DEFAULT_INPUT_TEMPLATE 参数 HOT 1
- [Bug] PR #4902 locked, unable to fix issues suggested by CodeRabbit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatgpt-next-web.