返回顶部
c

chatgpt-import导入ChatGPT历史

Import ChatGPT conversation history into OpenClaw's memory search. Use when migrating from ChatGPT, giving OpenClaw access to old conversations, or building a searchable archive of past chats.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
786
下载量
免费
免费
2
收藏
概述
安装方式
版本历史

chatgpt-import

ChatGPT 历史记录导入

将您的ChatGPT对话导入OpenClaw,以便通过记忆搜索功能进行检索。

工作流程

1. 从ChatGPT导出

按照references/export-guide.md指南下载您的conversations.json文件。

2. 转换为Markdown格式

bash
python3 scripts/convert_chatgpt.py \
--input /path/to/conversations.json \
--output /path/to/chatgpt-history

选项:--min-messages N 可跳过琐碎对话(默认值:2)。

3. 嵌入到SQLite数据库

bash
export OPENAIAPIKEY=sk-...
python3 scripts/bulk_embed.py \
--history-dir /path/to/chatgpt-history \
--db /path/to/chatgpt-memory.sqlite

选项:--model、--batch-size、--max-workers、--chunk-size、--api-key。

4. 配置OpenClaw

在OpenClaw配置中添加额外搜索路径:

yaml
memorySearch:
extraPaths:
- /path/to/chatgpt-memory.sqlite

然后重启网关:

bash
openclaw gateway restart

重要说明

  • - 需要OpenAI API密钥。 嵌入脚本会将对话文本发送至api.openai.com进行嵌入处理。如果您的对话包含敏感信息,建议先进行过滤或使用作用域受限的API密钥。
  • 不存储密钥材料。 生成的数据库不会保存您的API密钥。
  • 请先备份。 嵌入脚本会拒绝覆盖已有的输出数据库。
  • 嵌入需要付费——但费用低廉。使用text-embedding-3-small模型处理约2,400条对话仅需约0.15美元。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 chatgpt-import-1776419964 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 chatgpt-import-1776419964 技能

通过命令行安装

skillhub install chatgpt-import-1776419964

下载

⬇ 下载 chatgpt-import v1.0.2(免费)

文件大小: 6.77 KB | 发布时间: 2026-4-17 20:09

v1.0.2 最新 2026-4-17 20:09
- Added "Important Notes" section detailing security and cost considerations for embedding conversations.
- Clarified that an OpenAI API key is required and shared advice on handling secrets and API key usage.
- Noted that the output database does not store your API key.
- Reminded users to back up prior to embedding; script refuses to overwrite existing databases.
- Provided an example cost for embeddings to help users estimate expenses.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部