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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,10 @@ VikingBot is an AI agent framework built on top of OpenViking. Here's how to get

```bash
# Option 1: Install VikingBot from PyPI (recommended for most users)
pip install openviking[bot]
pip install "openviking[bot]"

# Option 2: Install VikingBot from source (for development)
uv pip install -e bot/
uv pip install -e ".[bot]"

# Start OpenViking server with Bot enabled
openviking-server --with-bot
Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,10 @@ VikingBot 是构建在 OpenViking 之上的 AI 智能体框架。以下是快速

```bash
# 选项 1:从 PyPI 安装 VikingBot(推荐大多数用户使用)
pip install openviking[bot]
pip install "openviking[bot]"

# 选项 2:从源码安装 VikingBot(用于开发)
uv pip install -e bot/
uv pip install -e ".[bot]"

# 启动 OpenViking 服务器(同时启动 Bot)
openviking-server --with-bot
Expand Down
32 changes: 16 additions & 16 deletions bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Vikingbot is deeply integrated with OpenViking, providing powerful knowledge man

**Option 1: Install from PyPI (Simplest)**
```bash
pip install vikingbot
pip install "openviking[bot]"
```

**Option 2: Install from source (for development)**
Expand All @@ -37,7 +37,7 @@ powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

```bash
git clone https://github.com/volcengine/OpenViking
cd OpenViking/bot
cd OpenViking

# Create a virtual environment using Python 3.11 or higher
uv venv --python 3.11
Expand All @@ -47,10 +47,10 @@ source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows

# Install dependencies (minimal)
uv pip install -e .
uv pip install -e ".[bot]"

# Or install with optional features
uv pip install -e ".[langfuse,telegram,console]"
uv pip install -e ".[bot,bot-langfuse,bot-telegram]"
```

### Optional Dependencies
Expand All @@ -59,25 +59,25 @@ Install only the features you need:

| Feature Group | Install Command | Description |
|---------------|-----------------|-------------|
| **Full** | `uv pip install -e ".[full]"` | All features included |
| **Langfuse** | `uv pip install -e ".[langfuse]"` | LLM observability and tracing |
| **FUSE** | `uv pip install -e ".[fuse]"` | OpenViking filesystem mount |
| **Sandbox** | `uv pip install -e ".[sandbox]"` | Code execution sandbox |
| **OpenCode** | `uv pip install -e ".[opencode]"` | OpenCode AI integration |
| **Full** | `uv pip install -e ".[bot-full]"` | All features included |
| **Langfuse** | `uv pip install -e ".[bot-langfuse]"` | LLM observability and tracing |
| **FUSE** | `uv pip install -e ".[bot-fuse]"` | OpenViking filesystem mount |
| **Sandbox** | `uv pip install -e ".[bot-sandbox]"` | Code execution sandbox |
| **OpenCode** | `uv pip install -e ".[bot-opencode]"` | OpenCode AI integration |

#### Channels (chat apps)

| Channel | Install Command |
|---------|-----------------|
| **Telegram** | `uv pip install -e ".[telegram]"` |
| **Feishu/Lark** | `uv pip install -e ".[feishu]"` |
| **DingTalk** | `uv pip install -e ".[dingtalk]"` |
| **Slack** | `uv pip install -e ".[slack]"` |
| **QQ** | `uv pip install -e ".[qq]"` |
| **Telegram** | `uv pip install -e ".[bot-telegram]"` |
| **Feishu/Lark** | `uv pip install -e ".[bot-feishu]"` |
| **DingTalk** | `uv pip install -e ".[bot-dingtalk]"` |
| **Slack** | `uv pip install -e ".[bot-slack]"` |
| **QQ** | `uv pip install -e ".[bot-qq]"` |

Multiple features can be combined:
```bash
uv pip install -e ".[langfuse,telegram,console]"
uv pip install -e ".[bot,bot-langfuse,bot-telegram]"
```

## 🚀 Quick Start
Expand Down Expand Up @@ -434,7 +434,7 @@ For Langfuse Cloud, use `https://cloud.langfuse.com` as the `base_url`.

**Install Langfuse support:**
```bash
uv pip install -e ".[langfuse]"
uv pip install -e ".[bot-langfuse]"
```

**Restart vikingbot:**
Expand Down
32 changes: 16 additions & 16 deletions bot/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Vikingbot 深度集成 OpenViking,提供强大的知识管理和记忆检索

**选项 1:从 PyPI 安装(最简单)**
```bash
pip install vikingbot
pip install "openviking[bot]"
```

**选项 2:从源码安装(用于开发)**
Expand All @@ -38,7 +38,7 @@ powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

```bash
git clone https://github.com/volcengine/OpenViking
cd OpenViking/bot
cd OpenViking

# 创建 Python 3.11 或更高版本 虚拟环境
uv venv --python 3.11
Expand All @@ -48,10 +48,10 @@ source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows

# 安装依赖(最小化)
uv pip install -e .
uv pip install -e ".[bot]"

# 或安装包含可选功能
uv pip install -e ".[langfuse,telegram,console]"
uv pip install -e ".[bot,bot-langfuse,bot-telegram]"
```

### 可选依赖
Expand All @@ -60,25 +60,25 @@ uv pip install -e ".[langfuse,telegram,console]"

| 功能组 | 安装命令 | 描述 |
|---------------|-----------------|-------------|
| **完整版** | `uv pip install -e ".[full]"` | 包含所有功能 |
| **Langfuse** | `uv pip install -e ".[langfuse]"` | LLM 可观测性和追踪 |
| **FUSE** | `uv pip install -e ".[fuse]"` | OpenViking 文件系统挂载 |
| **沙箱** | `uv pip install -e ".[sandbox]"` | 代码执行沙箱 |
| **OpenCode** | `uv pip install -e ".[opencode]"` | OpenCode AI 集成 |
| **完整版** | `uv pip install -e ".[bot-full]"` | 包含所有功能 |
| **Langfuse** | `uv pip install -e ".[bot-langfuse]"` | LLM 可观测性和追踪 |
| **FUSE** | `uv pip install -e ".[bot-fuse]"` | OpenViking 文件系统挂载 |
| **沙箱** | `uv pip install -e ".[bot-sandbox]"` | 代码执行沙箱 |
| **OpenCode** | `uv pip install -e ".[bot-opencode]"` | OpenCode AI 集成 |

#### 聊天渠道

| 渠道 | 安装命令 |
|---------|-----------------|
| **Telegram** | `uv pip install -e ".[telegram]"` |
| **飞书/Lark** | `uv pip install -e ".[feishu]"` |
| **钉钉** | `uv pip install -e ".[dingtalk]"` |
| **Slack** | `uv pip install -e ".[slack]"` |
| **QQ** | `uv pip install -e ".[qq]"` |
| **Telegram** | `uv pip install -e ".[bot-telegram]"` |
| **飞书/Lark** | `uv pip install -e ".[bot-feishu]"` |
| **钉钉** | `uv pip install -e ".[bot-dingtalk]"` |
| **Slack** | `uv pip install -e ".[bot-slack]"` |
| **QQ** | `uv pip install -e ".[bot-qq]"` |

可以组合多个功能:
```bash
uv pip install -e ".[langfuse,telegram,console]"
uv pip install -e ".[bot,bot-langfuse,bot-telegram]"
```

## 🚀 快速开始
Expand Down Expand Up @@ -430,7 +430,7 @@ cd deploy/docker

**安装 Langfuse 支持:**
```bash
uv pip install -e ".[langfuse]"
uv pip install -e ".[bot-langfuse]"
```

**重启 vikingbot:**
Expand Down
146 changes: 0 additions & 146 deletions bot/pyproject.toml

This file was deleted.

4 changes: 2 additions & 2 deletions bot/scripts/restart_openviking_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e

# Default values
PORT="1933"
BOT_URL="http://localhost:18791"
BOT_URL="http://localhost:18790"

# Parse arguments
while [[ $# -gt 0 ]]; do
Expand All @@ -31,7 +31,7 @@ done
# Parse Bot URL to extract port
BOT_PORT=$(echo "$BOT_URL" | sed -n 's/.*:\([0-9]*\).*/\1/p')
if [ -z "$BOT_PORT" ]; then
BOT_PORT="18791"
BOT_PORT="18790"
fi

echo "=========================================="
Expand Down
47 changes: 47 additions & 0 deletions bot/tests/example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import openviking as ov

# Initialize OpenViking client with data directory
client = ov.SyncOpenViking(path="./data")

try:
# Initialize the client
client.initialize()

# Add resource (supports URL, file, or directory)
add_result = client.add_resource(
path="/Users/bytedance/Downloads/exp/experience_data_mini.json",
resource_type="json", # 明确指定类型
tags=["large_data", "agent_context", "structured"],
)
root_uri = add_result["root_uri"]

# Explore the resource tree structure
ls_result = client.ls(root_uri)
print(f"Directory structure:\n{ls_result}\n")

# Use glob to find markdown files
glob_result = client.glob(pattern="**/*.md", uri=root_uri)
if glob_result["matches"]:
content = client.read(glob_result["matches"][0])
print(f"Content preview: {content[:200]}...\n")

# Wait for semantic processing to complete
print("Wait for semantic processing...")
client.wait_processed()

# Get abstract and overview of the resource
abstract = client.abstract(root_uri)
overview = client.overview(root_uri)
print(f"Abstract:\n{abstract}\n\nOverview:\n{overview}\n")

# Perform semantic search
results = client.find("what is openviking", target_uri=root_uri)
print("Search results:")
for r in results.resources:
print(f" {r.uri} (score: {r.score:.4f})")

# Close the client
client.close()

except Exception as e:
print(f"Error: {e}")
Loading
Loading