Skip to content
Closed
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 @@ -60,7 +60,7 @@ Beyond the three modes:
- **Memory and curation**: cross-session long-term memory keeps the profile, preferences and facts a user has confirmed. Folder uploads keep their directory tree, and retrieval chunks can be edited, diffed and rolled back.
- **Data sources and formats**: auto-sync from Feishu wiki / Feishu Drive / Confluence / GitLab / Tencent IMA / Notion / Yuque / DingTalk Docs / RSS, with more on the way. 10+ document formats including PDF, Word, images, Excel and XMind; Office files are parsed in-process by anydoc.
- **Channels and integrations**: Q&A in WeCom, Feishu, Slack, Telegram and other IM apps; an embed widget for external websites; a built-in MCP Server for Cursor, Claude and other AI tools; scoped API keys with a principal model for programmatic access.
- **Models**: 27 built-in vendors with a generated model catalog, including OpenAI, DeepSeek, Qwen (Alibaba Cloud), Zhipu, Hunyuan, Gemini, MiniMax, NVIDIA, LiteLLM and Ollama.
- **Models**: 28 built-in vendors with a generated model catalog, including OpenAI, DeepSeek, Qwen (Alibaba Cloud), Zhipu, Hunyuan, Gemini, MiniMax, NVIDIA, LiteLLM and Ollama.
- **Permissions and operations**: multi-workspace RBAC (four roles, per-resource ownership, per-workspace audit log), several storage instances per workspace, a runtime task-queue dashboard with worker-pool governance, and Langfuse tracing for agent steps, token usage and pipelines.
- **Deployment**: LLMs, vector databases and storage backends are all swappable. Deploy locally or on a private cloud and keep the data in your own environment.

Expand Down Expand Up @@ -313,7 +313,7 @@ A modular pipeline from document parsing, vectorization and retrieval to LLM inf

| Component | Options |
|-----------|---------|
| [LLMs](https://weknora.weixin.qq.com/docs/03-features/06-models) | 27 built-in vendors, including OpenAI / Azure OpenAI / Anthropic / DeepSeek / Qwen / Zhipu / Hunyuan / Doubao / Gemini / MiniMax / NVIDIA / SiliconFlow / OpenRouter / LiteLLM / Ollama |
| [LLMs](https://weknora.weixin.qq.com/docs/03-features/06-models) | 28 built-in vendors, including OpenAI / Azure OpenAI / Anthropic / DeepSeek / Qwen / Zhipu / Hunyuan / Doubao / Gemini / MiniMax / NVIDIA / SiliconFlow / OpenRouter / LiteLLM / Ollama |
| Embeddings | Ollama / BGE / GTE / Zhipu / OpenAI-compatible APIs |
| Vector databases | PostgreSQL (pgvector) / Elasticsearch / OpenSearch / Milvus / Weaviate / Qdrant / Apache Doris / Tencent VectorDB |
| [Object storage](https://weknora.weixin.qq.com/docs/03-features/19-storage-backends) | Local / Tencent Cloud COS / MinIO / AWS S3 / Volcengine TOS / Alibaba Cloud OSS / Kingsoft Cloud KS3 / Huawei Cloud OBS |
Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ https://github.com/user-attachments/assets/5722b10d-d04d-49ed-a6cc-635a8c77d91f
- **记忆与知识整理**:跨会话长期记忆保存用户确认过的个人信息、偏好与事实;文件夹上传保留原始目录结构;检索分块可以编辑、比对与回滚。
- **数据源与格式**:飞书知识库 / 飞书云盘 / Confluence / GitLab / 腾讯 IMA / Notion / 语雀 / 钉钉文档 / RSS 自动同步,更多数据源持续接入中;覆盖 PDF、Word、图片、Excel、XMind 等十余种格式,Office 文档由 anydoc 在 Go 进程内解析。
- **渠道与集成**:企业微信、飞书、Slack、Telegram 等 IM 频道内直接问答;网站嵌入 Widget 把智能体发布到外部站点;内置 MCP Server 供 Cursor、Claude 等 AI 工具连接;权限范围 API Key 与 Principal 模型用于程序化集成。
- **模型**:内置 27 家模型厂商与自动生成的模型目录,兼容 OpenAI、DeepSeek、Qwen(阿里云)、智谱、混元、Gemini、MiniMax、NVIDIA、LiteLLM、Ollama 等。
- **模型**:内置 28 家模型厂商与自动生成的模型目录,兼容 OpenAI、DeepSeek、Qwen(阿里云)、智谱、混元、Gemini、MiniMax、NVIDIA、LiteLLM、Ollama 等。
- **权限与运维**:多空间 RBAC(四级角色、资源归属、空间审计日志)、每空间多实例存储后端、运行时任务队列面板与 Worker 池治理,并通过 Langfuse 追踪 Agent 步骤、Token 用量与任务流水线。
- **部署**:大模型、向量数据库、存储后端均可替换,支持本地与私有云部署,数据留在你自己的环境中。

Expand Down Expand Up @@ -313,7 +313,7 @@ docker compose up -d # 用新镜像重建容器

| 组件 | 可选项 |
|------|--------|
| [模型厂商](https://weknora.weixin.qq.com/docs/03-features/06-models) | 内置 27 家,包括 OpenAI / Azure OpenAI / Anthropic / DeepSeek / Qwen(阿里云)/ 智谱 / 混元 / 豆包(火山引擎)/ Gemini / MiniMax / NVIDIA / SiliconFlow / OpenRouter / LiteLLM / Ollama |
| [模型厂商](https://weknora.weixin.qq.com/docs/03-features/06-models) | 内置 28 家,包括 OpenAI / Azure OpenAI / Anthropic / DeepSeek / Qwen(阿里云)/ 智谱 / 混元 / 豆包(火山引擎)/ Gemini / MiniMax / NVIDIA / SiliconFlow / OpenRouter / LiteLLM / Ollama |
| Embedding | Ollama / BGE / GTE / 智谱 / OpenAI 兼容接口 |
| 向量数据库 | PostgreSQL (pgvector) / Elasticsearch / OpenSearch / Milvus / Weaviate / Qdrant / Apache Doris / 腾讯云 VectorDB |
| [对象存储](https://weknora.weixin.qq.com/docs/03-features/19-storage-backends) | 本地 / 腾讯云 COS / MinIO / AWS S3 / 火山引擎 TOS / 阿里云 OSS / 金山云 KS3 / 华为云 OBS |
Expand Down
4 changes: 2 additions & 2 deletions README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ https://github.com/user-attachments/assets/5722b10d-d04d-49ed-a6cc-635a8c77d91f
- **メモリとナレッジ整理**:クロスセッション長期メモリが、ユーザーが確認したプロフィール・好み・事実を保持します。フォルダーアップロードは元のディレクトリ構造を保ち、検索チャンクは編集・差分比較・ロールバックできます。
- **データソースとフォーマット**:Feishu ナレッジベース / Feishu クラウドドライブ / Confluence / GitLab / Tencent IMA / Notion / Yuque / DingTalk Docs / RSS の自動同期(順次拡充中)。PDF、Word、画像、Excel、XMind など 10 以上のフォーマットに対応し、Office 文書は anydoc でプロセス内解析します。
- **チャネルと連携**:WeChat Work、Feishu、Slack、Telegram などの IM で直接 Q&A、ウェブサイト埋め込み Widget で外部サイトにエージェントを公開、組み込み MCP Server で Cursor や Claude などの AI ツールと接続、スコープ付き API キーと Principal モデルでプログラム連携。
- **モデル**:27 の組み込みベンダーと自動生成のモデルカタログ。OpenAI、DeepSeek、Qwen(Alibaba Cloud)、Zhipu、Hunyuan、Gemini、MiniMax、NVIDIA、LiteLLM、Ollama などに対応。
- **モデル**:28 の組み込みベンダーと自動生成のモデルカタログ。OpenAI、DeepSeek、Qwen(Alibaba Cloud)、Zhipu、Hunyuan、Gemini、MiniMax、NVIDIA、LiteLLM、Ollama などに対応。
- **権限と運用**:マルチワークスペース RBAC(4 階層ロール、リソース所有権、ワークスペース監査ログ)、ワークスペースごとの複数ストレージインスタンス、ランタイムタスクキューダッシュボードと Worker プール統治、Langfuse による Agent ステップ・トークン消費・パイプラインのトレーシング。
- **デプロイ**:LLM、ベクトルデータベース、ストレージバックエンドはすべて差し替え可能。ローカルまたはプライベートクラウドにデプロイし、データを自社環境に置けます。

Expand Down Expand Up @@ -313,7 +313,7 @@ docker compose up -d # 新しいイメージでコンテナを再作成

| コンポーネント | 選択肢 |
|----------------|--------|
| [大規模モデル](https://weknora.weixin.qq.com/docs/03-features/06-models) | 27 の組み込みベンダー。OpenAI / Azure OpenAI / Anthropic / DeepSeek / Qwen(Alibaba Cloud)/ Zhipu / Hunyuan / Doubao(Volcengine)/ Gemini / MiniMax / NVIDIA / SiliconFlow / OpenRouter / LiteLLM / Ollama など |
| [大規模モデル](https://weknora.weixin.qq.com/docs/03-features/06-models) | 28 の組み込みベンダー。OpenAI / Azure OpenAI / Anthropic / DeepSeek / Qwen(Alibaba Cloud)/ Zhipu / Hunyuan / Doubao(Volcengine)/ Gemini / MiniMax / NVIDIA / SiliconFlow / OpenRouter / LiteLLM / Ollama など |
| Embedding | Ollama / BGE / GTE / Zhipu / OpenAI 互換 API |
| ベクトル DB | PostgreSQL (pgvector) / Elasticsearch / OpenSearch / Milvus / Weaviate / Qdrant / Apache Doris / Tencent VectorDB |
| [オブジェクトストレージ](https://weknora.weixin.qq.com/docs/03-features/19-storage-backends) | ローカル / Tencent Cloud COS / MinIO / AWS S3 / 火山引擎 TOS / Alibaba Cloud OSS / 金山雲 KS3 / 華為雲 OBS |
Expand Down
4 changes: 2 additions & 2 deletions README_KO.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ https://github.com/user-attachments/assets/5722b10d-d04d-49ed-a6cc-635a8c77d91f
- **메모리와 지식 정리**: 크로스 세션 장기 메모리가 사용자가 확인한 프로필, 선호, 사실을 보관합니다. 폴더 업로드는 원래 디렉터리 구조를 유지하고, 검색 청크는 편집·비교·롤백할 수 있습니다.
- **데이터 소스와 포맷**: Feishu 지식베이스 / Feishu 클라우드 드라이브 / Confluence / GitLab / Tencent IMA / Notion / Yuque / DingTalk Docs / RSS 자동 동기화(지속 확장 중). PDF, Word, 이미지, Excel, XMind 등 10가지 이상의 포맷을 지원하며, Office 문서는 anydoc으로 프로세스 내 파싱합니다.
- **채널과 연동**: WeChat Work, Feishu, Slack, Telegram 등 IM에서 바로 Q&A, 웹사이트 임베드 Widget으로 외부 사이트에 에이전트 게시, 내장 MCP Server로 Cursor·Claude 등 AI 도구와 연결, 범위 지정 API 키와 Principal 모델로 프로그램 연동.
- **모델**: 27개 내장 벤더와 자동 생성 모델 카탈로그. OpenAI, DeepSeek, Qwen(Alibaba Cloud), Zhipu, Hunyuan, Gemini, MiniMax, NVIDIA, LiteLLM, Ollama 등을 지원합니다.
- **모델**: 28개 내장 벤더와 자동 생성 모델 카탈로그. OpenAI, DeepSeek, Qwen(Alibaba Cloud), Zhipu, Hunyuan, Gemini, MiniMax, NVIDIA, LiteLLM, Ollama 등을 지원합니다.
- **권한과 운영**: 멀티 워크스페이스 RBAC(4단계 역할, 리소스 소유권, 워크스페이스 감사 로그), 워크스페이스별 다중 스토리지 인스턴스, 런타임 작업 큐 대시보드와 Worker 풀 거버넌스, Langfuse를 통한 Agent 단계·토큰 사용량·파이프라인 추적.
- **배포**: LLM, 벡터 데이터베이스, 스토리지 백엔드를 모두 교체할 수 있습니다. 로컬이나 프라이빗 클라우드에 배포해 데이터를 자체 환경에 둘 수 있습니다.

Expand Down Expand Up @@ -323,7 +323,7 @@ docker compose up -d # 새 이미지로 컨테이너 재생성

| 구성 요소 | 선택지 |
|-----------|--------|
| [LLM](https://weknora.weixin.qq.com/docs/03-features/06-models) | 27개 내장 벤더. OpenAI / Azure OpenAI / Anthropic / DeepSeek / Qwen (Alibaba Cloud) / Zhipu / Hunyuan / Doubao (Volcengine) / Gemini / MiniMax / NVIDIA / SiliconFlow / OpenRouter / LiteLLM / Ollama 등 |
| [LLM](https://weknora.weixin.qq.com/docs/03-features/06-models) | 28개 내장 벤더. OpenAI / Azure OpenAI / Anthropic / DeepSeek / Qwen (Alibaba Cloud) / Zhipu / Hunyuan / Doubao (Volcengine) / Gemini / MiniMax / NVIDIA / SiliconFlow / OpenRouter / LiteLLM / Ollama 등 |
| Embedding | Ollama / BGE / GTE / Zhipu / OpenAI 호환 API |
| 벡터 DB | PostgreSQL (pgvector) / Elasticsearch / OpenSearch / Milvus / Weaviate / Qdrant / Apache Doris / Tencent VectorDB |
| [오브젝트 스토리지](https://weknora.weixin.qq.com/docs/03-features/19-storage-backends) | 로컬 / Tencent Cloud COS / MinIO / AWS S3 / Volcengine TOS / Alibaba Cloud OSS / Kingsoft Cloud KS3 / Huawei Cloud OBS |
Expand Down
1 change: 1 addition & 0 deletions internal/models/catalog/data/models.generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -4378,6 +4378,7 @@
"source": "https://openrouter.ai/docs/api/api-reference/stt/create-transcription"
}
],
"opper": [],
"qianfan": [
{
"id": "ernie-5.0-thinking-preview",
Expand Down
1 change: 1 addition & 0 deletions internal/models/catalog/data/seed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3351,6 +3351,7 @@
"source": "https://openrouter.ai/docs/api/api-reference/stt/create-transcription"
}
],
"opper": [],
"qianfan": [
{
"id": "ernie-5.0-thinking-preview",
Expand Down
1 change: 1 addition & 0 deletions internal/models/providers/assets/opper.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions internal/models/providers/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func Builtins() []*Definition {
newNvidiaProvider(),
newOpenaiProvider(),
newOpenrouterProvider(),
newOpperProvider(),
newQianfanProvider(),
newQiniuProvider(),
newRequestyProvider(),
Expand Down
102 changes: 102 additions & 0 deletions internal/models/providers/opper.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Package providers registers the Opper gateway.
//
// Facts (https://docs.opper.ai/build/gateway/drop-in-sdks,
// https://docs.opper.ai/build/gateway/completions,
// https://docs.opper.ai/build/multimodal/vision-pdfs and the published
// schema at https://api.opper.ai/v3/openapi.yaml):
// - chat, embeddings and the model list share the OpenAI-compatible base
// https://api.opper.ai/v3/compat, and auth is `Authorization: Bearer
// <key>` ("Opper reads the key from `Authorization: Bearer`");
// - a model id is a bare pool name (`claude-sonnet-4-6`, `gpt-5.5`), which
// Opper routes across the providers that serve the model, or
// `provider/model` (`anthropic/claude-sonnet-4-6`) to pin one route;
// GET /v3/compat/models lists both;
// - output cap is `max_tokens`, the field the chat guide documents ("Cap
// the response length"); `max_completion_tokens` is in the request
// schema without a description;
// - thinking is a flat `reasoning_effort` string: "Reasoning models (the
// GPT-5 family, Claude with extended thinking) also accept
// `reasoning_effort: "low" | "medium" | "high"`". minimal is not in that
// list, so the vendor level map sends it as low; xhigh and max stay off;
// - thinking text comes back in `reasoning_content`, and usage reports
// prompt_tokens_details.cached_tokens;
// - tool calls in a response carry `extra_content` (Gemini's
// thought_signature), and the request schema accepts it back on replayed
// assistant turns, so it is round-tripped opaquely;
// - images go in the chat messages as `image_url` parts ("Vision and PDF
// are model capabilities, so you send the media to a regular chat model
// that supports them"), so the VLM type shares the chat base URL;
// - embeddings take model, input, dimensions, encoding_format and user
// (https://docs.opper.ai/v3-api-reference/compatibility/create-embeddings);
// - the catalog ships no models: the pools follow the live list at
// GET /v3/compat/models, so the operator names the model.
//
// Unverified:
// - the rungs differ per model: GET /v3/models lists
// params.reasoning.supported (none, low, medium, high and xhigh for
// gpt-5.4-mini; low, medium, high and max for claude-sonnet-4-6). The
// vendor map keeps the three rungs the chat guide documents, and "off"
// sends no field, so the routed model's own default applies;
// - the docs do not say whether `temperature` is dropped for upstreams
// that reject it while reasoning, and with no catalog entries there is
// no per-model rule that turns sampling off.
package providers

import (
_ "embed"

"github.com/Tencent/WeKnora/internal/models/api"
"github.com/Tencent/WeKnora/internal/types"
)

//go:embed assets/opper.svg
var opperIcon []byte

// OpperID is the provider identifier stored on model rows.
const OpperID = "opper"

// OpperBaseURL is the OpenAI-compatible gateway endpoint.
const OpperBaseURL = "https://api.opper.ai/v3/compat"

func newOpperProvider() *Definition {
return &Definition{
ID: OpperID,
Name: "Opper",
Names: map[string]string{"zh-CN": "Opper"},
Description: "claude-sonnet-4-6, gpt-5.5, gemini-3.8-flash, deepseek-v4-pro, etc.",
Website: "https://opper.ai",
Icon: opperIcon,
API: api.APIOpenAICompletions,
Order: 43,
RequiresAuth: true,
Auth: AuthBearer,
URLPatterns: []string{"api.opper.ai"},
DefaultBaseURLs: map[types.ModelType]string{
types.ModelTypeKnowledgeQA: OpperBaseURL,
types.ModelTypeEmbedding: OpperBaseURL,
types.ModelTypeVLLM: OpperBaseURL,
},
ModelTypes: []types.ModelType{
types.ModelTypeKnowledgeQA,
types.ModelTypeEmbedding,
types.ModelTypeVLLM,
},
Compat: VendorCompat{
Embeddings: api.EmbeddingsCompat{
SendEncodingFormat: api.Ptr(true),
DimensionsField: api.Ptr("dimensions"),
},
OpenAICompletions: api.OpenAICompletionsCompat{
MaxTokensField: api.Ptr("max_tokens"),
ThinkingFormat: api.Ptr(api.ThinkingFormatOpenAI),
SupportsReasoningEffort: api.Ptr(true),
PromptCacheAccounting: api.Ptr(true),
ToolCallExtraFields: []string{"extra_content"},
},
},
// Opper documents low | medium | high; minimal folds onto low.
ThinkingLevels: api.ThinkingLevelMap{
api.ReasoningMinimal: api.StringPtr("low"),
},
}
}
14 changes: 11 additions & 3 deletions internal/models/providers/providers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ var expectedIDs = []string{
"aliyun", "zhipu", "volcengine", "hunyuan", "siliconflow", "deepseek",
"minimax", "moonshot", "mimo", "modelscope", "qianfan", "qiniu", "longcat", "lkeap",
"openai", "azure_openai", "anthropic", "gemini",
"openrouter", "litellm", "requesty",
"openrouter", "litellm", "requesty", "opper",
"jina", "nvidia", "novita", "gpustack",
}

func TestAllVendorsRegistered(t *testing.T) {
if len(expectedIDs) != 27 {
t.Fatalf("expected 27 vendor ids in the spec, got %d", len(expectedIDs))
if len(expectedIDs) != 28 {
t.Fatalf("expected 28 vendor ids in the spec, got %d", len(expectedIDs))
}
for _, id := range expectedIDs {
v, ok := modelruntime.Get(id)
Expand Down Expand Up @@ -298,6 +298,14 @@ func TestFamilyExpectations(t *testing.T) {
"anthropic" {
t.Error("openrouter anthropic/* family should use anthropic cache_control")
}
// Opper documents max_tokens and a reasoning_effort of low, medium or
// high, so the weakest rung has to go out as low.
if r := resolve(t, "opper", "claude-sonnet-4-6"); r.OpenAICompletions.MaxTokensField != "max_tokens" ||
r.OpenAICompletions.ThinkingFormat != api.ThinkingFormatOpenAI ||
!r.OpenAICompletions.SupportsReasoningEffort ||
r.ThinkingLevels.Value(api.ReasoningMinimal) != "low" {
t.Error("opper should send max_tokens and a top-level reasoning_effort, with minimal sent as low")
}
if r := resolve(t, "siliconflow", "deepseek-ai/DeepSeek-V4-Pro"); !r.OpenAICompletions.SupportsReasoningEffort ||
r.ThinkingLevels.Value(api.ReasoningMax) != "max" {
t.Error("siliconflow DeepSeek-V4-Pro should grade effort high/max")
Expand Down
Loading