Skip to content

fix: EverOS backend configuration should be checked before applied #191

Description

@forrestjgq

Summary

When EverOS is not correctly configured, sometimes one answer will fail with
error: turn_failed (code=-32099)

but when you ask Raven again, it gives expected answer.

I ask Raven to check the configuration andlog, and the following text is the answer:

Q:

我看了你的 log,everos backend 配置似乎有问题导致运行失败,请读取一下配置文件并:1. 告知我配置文件路径, 2. 告知我哪些和everos backend相关

A:

EverOS 相关配置项

一共涉及 3 处:

① 内存后端(memory 段)

─ json
"memory": {
    "backend": "everos",       ← 使用 EverOS 作为记忆/语义搜索后端
    "userId": "default",
    "agentId": "default",
    "memoryTopK": 5
}

② 插件配置(plugins.config 段)

─ json
"everos-memory": {
    "mode": "embedded",         ← 嵌入式模式(内嵌进程)
    "base_url": "http://localhost:1995",
    "user_id": "default",
    "agent_id": "default"
}

③ SkillForge 路由(skillForge.router 段)

─ json
"everos": {
    "enabled": true             ← 启用从 EverOS Skill Hub 搜索技能
}

日志中暴露的问题

从 gateway 日志看到的错误:

EverosBackend: embedded everos init failed
→ Embedding api_key is not configured
  (set EVEROS_EMBEDDING__API_KEY)

以及后续:

EverosBackend.store failed (emit: engine not started)

问题根因

嵌入式模式下,EverOS 需要 EVEROS_EMBEDDING__API_KEY 环境变量来初始化 embedding(向量化)能力,当前没设置导致引擎无法完全启动。

你有对应的 API Key 吗?如果有的话,可以通过以下方式设置:

─ bash
export EVEROS_EMBEDDING__API_KEY=你的key

然后重启网关:

─ bash
launchctl unload ~/Library/LaunchAgents/com.raven.gateway.plist
launchctl load ~/Library/LaunchAgents/com.raven.gateway.plist

Steps to reproduce

use empty EVEROS_EMBEDDING__API_KEY to config Raven, and ask him questions until it reports an error

Expected behavior

If EverOS backend is not correctly reported, it should not be used
Or it is an essential backend which Raven requires, the Raven should not be available until that configuration is validated.

Actual behavior

EverOS embedding API key is not checked

Environment

Raven: 0.1.6

Logs or screenshots


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions