Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/openclaw-memory-plugin/INSTALL-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ openclaw status
"storage": {
"workspace": "/home/yourname/.openviking/data",
"vectordb": { "backend": "local" },
"agfs": { "backend": "local" }
"agfs": { "backend": "local", "port": 1833 }
},
"embedding": {
"dense": {
Expand Down
2 changes: 1 addition & 1 deletion examples/openclaw-memory-plugin/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ The plugin automatically starts and stops the OpenViking server.
"storage": {
"workspace": "/home/yourname/.openviking/data",
"vectordb": { "backend": "local" },
"agfs": { "backend": "local" }
"agfs": { "backend": "local", "port": 1833 }
},
"embedding": {
"dense": {
Expand Down
4 changes: 3 additions & 1 deletion examples/openclaw-memory-plugin/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ function Configure-OvConf {

$workspace = Join-Path $OpenVikingDir "data"
$serverPort = "$DefaultServerPort"
$agfsPort = "$DefaultAgfsPort"
$vlmModel = $DefaultVlmModel
$embeddingModel = $DefaultEmbeddingModel

Expand All @@ -262,6 +263,7 @@ function Configure-OvConf {
Write-Host ""
$workspace = Prompt-OrDefault (T "OpenViking workspace path" "OpenViking 数据目录") $workspace
$serverPort = Prompt-OrDefault (T "OpenViking HTTP port" "OpenViking HTTP 端口") $serverPort
$agfsPort = Prompt-OrDefault (T "AGFS port" "AGFS 端口") $agfsPort
$vlmModel = Prompt-OrDefault (T "VLM model" "VLM 模型") $vlmModel
$embeddingModel = Prompt-OrDefault (T "Embedding model" "Embedding 模型") $embeddingModel
Write-Host (T "VLM and Embedding API keys can differ. You can leave either empty and edit ov.conf later." "说明:VLM 与 Embedding 的 API Key 可能不同,可分别填写;留空后续可在 ov.conf 修改。")
Expand All @@ -283,7 +285,7 @@ function Configure-OvConf {
storage = @{
workspace = $workspace
vectordb = @{ name = "context"; backend = "local"; project = "default" }
agfs = @{ log_level = "warn"; backend = "local"; timeout = 10; retry_times = 3 }
agfs = @{ port = [int]$agfsPort; log_level = "warn"; backend = "local"; timeout = 10; retry_times = 3 }
}
embedding = @{
dense = @{
Expand Down
5 changes: 4 additions & 1 deletion examples/openclaw-memory-plugin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ configure_openviking_conf() {

local workspace="${OPENVIKING_DIR}/data"
local server_port="${DEFAULT_SERVER_PORT}"
local agfs_port="${DEFAULT_AGFS_PORT}"
local vlm_model="${DEFAULT_VLM_MODEL}"
local embedding_model="${DEFAULT_EMBED_MODEL}"
local vlm_api_key="${OPENVIKING_VLM_API_KEY:-${OPENVIKING_ARK_API_KEY:-}}"
Expand All @@ -487,6 +488,7 @@ configure_openviking_conf() {
echo ""
read -r -p "$(tr "OpenViking workspace path [${workspace}]: " "OpenViking 数据目录 [${workspace}]: ")" _workspace < /dev/tty || true
read -r -p "$(tr "OpenViking HTTP port [${server_port}]: " "OpenViking HTTP 端口 [${server_port}]: ")" _server_port < /dev/tty || true
read -r -p "$(tr "AGFS port [${agfs_port}]: " "AGFS 端口 [${agfs_port}]: ")" _agfs_port < /dev/tty || true
read -r -p "$(tr "VLM model [${vlm_model}]: " "VLM 模型 [${vlm_model}]: ")" _vlm_model < /dev/tty || true
read -r -p "$(tr "Embedding model [${embedding_model}]: " "Embedding 模型 [${embedding_model}]: ")" _embedding_model < /dev/tty || true
echo "$(tr "VLM and Embedding API keys can differ. You can leave either empty and edit ov.conf later." "说明:VLM 与 Embedding 的 API Key 可能不同,可分别填写;留空后续可在 ov.conf 修改。")"
Expand All @@ -495,6 +497,7 @@ configure_openviking_conf() {

workspace="${_workspace:-$workspace}"
server_port="${_server_port:-$server_port}"
agfs_port="${_agfs_port:-$agfs_port}"
vlm_model="${_vlm_model:-$vlm_model}"
embedding_model="${_embedding_model:-$embedding_model}"
vlm_api_key="${_vlm_api_key:-$vlm_api_key}"
Expand All @@ -520,7 +523,7 @@ configure_openviking_conf() {
"storage": {
"workspace": "${workspace}",
"vectordb": { "name": "context", "backend": "local", "project": "default" },
"agfs": { "log_level": "warn", "backend": "local", "timeout": 10, "retry_times": 3 }
"agfs": { "port": ${agfs_port}, "log_level": "warn", "backend": "local", "timeout": 10, "retry_times": 3 }
},
"embedding": {
"dense": {
Expand Down
10 changes: 8 additions & 2 deletions examples/openclaw-memory-plugin/setup-helper/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ function buildOvvConfJson(opts = {}) {
const {
apiKey = "",
serverPort = DEFAULT_SERVER_PORT,
agfsPort = DEFAULT_AGFS_PORT,
vlmModel = DEFAULT_VLM_MODEL,
embeddingModel = DEFAULT_EMBEDDING_MODEL,
workspace = DEFAULT_WORKSPACE,
Expand All @@ -262,7 +263,7 @@ function buildOvvConfJson(opts = {}) {
storage: {
workspace,
vectordb: { name: "context", backend: "local", project: "default" },
agfs: { log_level: "warn", backend: "local", timeout: 10, retry_times: 3 },
agfs: { port: agfsPort, log_level: "warn", backend: "local", timeout: 10, retry_times: 3 },
},
embedding: {
dense: {
Expand Down Expand Up @@ -317,9 +318,10 @@ async function getOvvConfPorts(cfgPath) {
const cfg = JSON.parse(raw);
return {
serverPort: cfg?.server?.port ?? DEFAULT_SERVER_PORT,
agfsPort: cfg?.storage?.agfs?.port ?? DEFAULT_AGFS_PORT,
};
} catch {
return { serverPort: DEFAULT_SERVER_PORT };
return { serverPort: DEFAULT_SERVER_PORT, agfsPort: DEFAULT_AGFS_PORT };
}
}

Expand Down Expand Up @@ -360,6 +362,7 @@ async function updateOvvConf(cfgPath, opts = {}) {
cfg.embedding.dense.model = opts.embeddingModel;
}
if (opts.serverPort !== undefined && cfg.server) cfg.server.port = opts.serverPort;
if (opts.agfsPort !== undefined && cfg.storage?.agfs) cfg.storage.agfs.port = opts.agfsPort;
await writeFile(cfgPath, JSON.stringify(cfg, null, 2));
}

Expand All @@ -369,6 +372,7 @@ async function collectOvvConfInteractive(nonInteractive) {
const opts = {
apiKey: process.env.OPENVIKING_ARK_API_KEY || "",
serverPort: DEFAULT_SERVER_PORT,
agfsPort: DEFAULT_AGFS_PORT,
vlmModel: DEFAULT_VLM_MODEL,
embeddingModel: DEFAULT_EMBEDDING_MODEL,
workspace: DEFAULT_WORKSPACE,
Expand Down Expand Up @@ -400,6 +404,8 @@ async function collectOvvConfInteractive(nonInteractive) {
console.log("\n--- Server Ports ---");
const serverPortStr = await question(`OpenViking HTTP port`, String(DEFAULT_SERVER_PORT));
opts.serverPort = parsePort(serverPortStr, DEFAULT_SERVER_PORT);
const agfsPortStr = await question(`AGFS port`, String(DEFAULT_AGFS_PORT));
opts.agfsPort = parsePort(agfsPortStr, DEFAULT_AGFS_PORT);

return opts;
}
Expand Down
Loading