Skip to content

Commit a1feb21

Browse files
committed
refactor: update references from goagent to GoAgentX in example files
1 parent 94f2d25 commit a1feb21

4 files changed

Lines changed: 24 additions & 24 deletions

File tree

examples/knowledge-base/QUICK_START.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ docker exec -it postgres-pgvector psql -U postgres -d goagent -c "SELECT version
3636
# 检查现有容器
3737
docker ps | grep postgres
3838

39-
# 创建goagent数据库(如果不存在)
39+
# 创建GoAgentX 数据库(如果不存在)
4040
docker exec <容器名> psql -U postgres -c "CREATE DATABASE goagent;"
4141

4242
# 安装pgvector扩展
4343
docker exec <容器名> psql -U postgres -d goagent -c "CREATE EXTENSION vector;"
4444

4545
# 运行数据库迁移(创建所有表)
46-
cd /Users/scc/go/src/goagent
47-
go run cmd/migrate_goagent/main.go
46+
cd /Users/scc/go/src/goagentx
47+
go run cmd/migrate_goagentx/main.go
4848
```
4949

5050
### 步骤2:启动Ollama服务
@@ -85,7 +85,7 @@ embedding_model: nomic-embed-text
8585
8686
```bash
8787
# 进入示例目录
88-
cd /Users/scc/go/src/goagent/examples/knowledge-base
88+
cd /Users/scc/go/src/goagentx/examples/knowledge-base
8989

9090
# 导入文档
9191
go run main.go --save example.md
@@ -134,7 +134,7 @@ curl http://localhost:11434/api/tags
134134

135135
```bash
136136
# 进入embedding服务目录
137-
cd /Users/scc/go/src/goagent/services/embedding
137+
cd /Users/scc/go/src/goagentx/services/embedding
138138

139139
# 复制配置文件
140140
cp .env.example .env
@@ -184,7 +184,7 @@ embedding_model: e5-large-v2
184184
185185
```bash
186186
# 进入示例目录
187-
cd /Users/scc/go/src/goagent/examples/knowledge-base
187+
cd /Users/scc/go/src/goagentx/examples/knowledge-base
188188

189189
# 导入文档
190190
go run main.go --save example.md
@@ -249,11 +249,11 @@ curl http://localhost:11434/api/tags
249249

250250
```bash
251251
# 启动
252-
cd /Users/scc/go/src/goagent/services/embedding
252+
cd /Users/scc/go/src/goagentx/services/embedding
253253
./start.sh
254254

255255
# 停止
256-
cd /Users/scc/go/src/goagent/services/embedding
256+
cd /Users/scc/go/src/goagentx/services/embedding
257257
./stop.sh
258258

259259
# 查看健康状态
@@ -330,7 +330,7 @@ killall ollama
330330
### 停止Embedding服务(如果使用了方式二)
331331

332332
```bash
333-
cd /Users/scc/go/src/goagent/services/embedding
333+
cd /Users/scc/go/src/goagentx/services/embedding
334334
./stop.sh
335335
```
336336

@@ -344,7 +344,7 @@ docker stop pgvector
344344
killall ollama 2>/dev/null || true
345345

346346
# 停止Embedding服务(如果需要)
347-
cd /Users/scc/go/src/goagent/services/embedding
347+
cd /Users/scc/go/src/goagentx/services/embedding
348348
./stop.sh 2>/dev/null || true
349349
```
350350

@@ -381,7 +381,7 @@ ollama serve
381381

382382
```bash
383383
# 检查Python环境
384-
cd /Users/scc/go/src/goagent/services/embedding
384+
cd /Users/scc/go/src/goagentx/services/embedding
385385
./start.sh
386386

387387
# 查看详细日志
@@ -469,7 +469,7 @@ ollama serve
469469
ollama pull nomic-embed-text
470470

471471
# Terminal 3: 运行示例
472-
cd /Users/scc/go/src/goagent/examples/knowledge-base
472+
cd /Users/scc/go/src/goagentx/examples/knowledge-base
473473
go run main.go --save example.md
474474
go run main.go --chat
475475
```
@@ -488,11 +488,11 @@ ollama serve
488488
ollama pull hf.co/ChristianAzinn/e5-large-v2-gguf:Q8_0
489489

490490
# Terminal 3: Embedding服务
491-
cd /Users/scc/go/src/goagent/services/embedding
491+
cd /Users/scc/go/src/goagentx/services/embedding
492492
./start.sh
493493

494494
# Terminal 4: 运行示例
495-
cd /Users/scc/go/src/goagent/examples/knowledge-base
495+
cd /Users/scc/go/src/goagentx/examples/knowledge-base
496496
# 确保config.yaml中embedding_service_url为http://localhost:8000
497497
go run main.go --save example.md
498498
go run main.go --chat

examples/knowledge-base/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Local Knowledge Base Example
22

3-
This is a local knowledge base example based on the goagent storage module. It demonstrates how to quickly build a fully functional document retrieval and Q&A system using the high-level APIs of the storage module.
3+
This is a local knowledge base example based on the GoAgentX storage module. It demonstrates how to quickly build a fully functional document retrieval and Q&A system using the high-level APIs of the storage module.
44

55
## Tech Stack and Components
66

examples/knowledge-base/cmd/check_distillation/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
func main() {
1414
// connect to PostgreSQL database
1515
connStr := "host=localhost port=5433 user=postgres password=postgres dbname=goagent sslmode=disable"
16-
db, err := sql.Open("postgres", connStr)
16+
db, err := sql.Open("pgx", connStr)
1717
if err != nil {
1818
slog.Error("Failed to connect to database:", "error", err)
1919
os.Exit(1)

examples/knowledge-base/main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ import (
2020

2121
"github.com/google/uuid"
2222

23-
"goagent/api/memory"
24-
"goagent/internal/llm"
25-
internalMemory "goagent/internal/memory"
26-
"goagent/internal/storage/postgres"
27-
"goagent/internal/storage/postgres/embedding"
28-
storage_models "goagent/internal/storage/postgres/models"
29-
"goagent/internal/storage/postgres/repositories"
30-
"goagent/internal/storage/postgres/services"
23+
"goagentx/api/memory"
24+
"goagentx/internal/llm"
25+
internalMemory "goagentx/internal/memory"
26+
"goagentx/internal/storage/postgres"
27+
"goagentx/internal/storage/postgres/embedding"
28+
storage_models "goagentx/internal/storage/postgres/models"
29+
"goagentx/internal/storage/postgres/repositories"
30+
"goagentx/internal/storage/postgres/services"
3131

3232
"gopkg.in/yaml.v3"
3333
)

0 commit comments

Comments
 (0)