Skip to content

Enhance local deployment. #751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
**/node_modules/**
.DS_Store
*.tsbuildinfo
apps/api/.env_llm_models.yaml # Added to ignore the actual LLM config file
apps/api/.env_emb_models.yaml # Added to ignore the actual Embedding config file

dist
.turbo
Expand All @@ -26,4 +28,7 @@ common/autoinstallers/*/.npmrc
*.chunks.jsonl

# mise
mise.toml
mise.toml
.vscode/
deploy/docker/datalab/
marker_output/
443 changes: 205 additions & 238 deletions README.md

Large diffs are not rendered by default.

240 changes: 0 additions & 240 deletions README_CN.md

This file was deleted.

4 changes: 2 additions & 2 deletions apps/api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SERPER_API_KEY=
NODE_ENV=development
PORT=5800
WS_PORT=5801
ORIGIN=http://localhost:5700
ORIGIN=http://localhost:5700,http://localhost:5173

# Static Endpoint Configuration
STATIC_PUBLIC_ENDPOINT=
Expand Down Expand Up @@ -125,7 +125,7 @@ RERANKER_MODEL=jina-reranker-v2-base-multilingual
RERANKER_RELEVANCE_THRESHOLD=0.5

# Skill Configuration
SKILL_IDLE_TIMEOUT=10000
SKILL_IDLE_TIMEOUT=60000
SKILL_EXECUTION_TIMEOUT=180000

# Stripe Configuration
Expand Down
14 changes: 14 additions & 0 deletions apps/api/.env_emb_models.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# apps/api/.env_emb_models.yaml.example (仅 Ollama)
# !!! 严重警告: 此文件可能直接包含敏感信息 !!!
# !!! 必须将此文件添加到 .gitignore !!!
# !!! 严格控制文件访问权限 !!!
providers:
ollama:
# Ollama 服务的基础 URL
baseUrl: http://localhost:11434
# 当 .env 中 EMBEDDINGS_MODEL_NAME 未指定时使用的默认模型名称
defaultModel: "nomic-embed-text"
# 可选: 模型特定参数 (如果 Langchain 类支持)
# models:
# nomic-embed-text:
# keepAlive: -1
38 changes: 38 additions & 0 deletions apps/api/.env_llm_models.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# .env_llm_models.yaml.example - OpenAI 兼容 LLM 模型端点配置示例
# !!! 警告: 请勿在此文件中存储真实的 API Key !!!
# !!! 真实的 API Key 应存储在 .env_llm_models.yaml 文件中,并确保该文件已添加到 .gitignore !!!

endpoints:
- name: "openrouter_example" # 端点名称,供内部识别
# !!! 使用环境变量或安全的方式管理 API Key,不要直接写在这里 !!!
api_key: "sk-or-replace-with-your-openrouter-key" # 示例 Key,请替换
base_url: "https://openrouter.ai/api/v1"
# 此端点支持的模型列表 (必须是 OpenAI 兼容的)
models:
- "openai/gpt-4-turbo"
- "anthropic/claude-3-opus-20240229" # 通过 OpenRouter 访问
- "google/gemini-pro" # 通过 OpenRouter 访问
# configuration: # 可选的额外配置, 会传递给 ChatDeepSeek (最终是 ChatOpenAI) 的 configuration
# defaultHeaders:
# 'HTTP-Referer': 'https://your-app-url.com' # 替换为你的应用 URL
# 'X-Title': 'YourAppName' # 替换为你的应用名称
# # 其他 ChatOpenAI 支持的 configuration 选项...

- name: "openai_direct_example"
api_key: "sk-replace-with-your-openai-key" # 示例 Key,请替换
# base_url: "https://api.openai.com/v1" # 可选,如果需要覆盖 ChatDeepSeek 默认或 ChatOpenAI 默认
models:
- "gpt-4-turbo"
- "gpt-3.5-turbo"
# configuration: {} # 可选

- name: "deepseek_direct_example"
api_key: "sk-replace-with-your-deepseek-key" # 示例 Key,请替换
# base_url: "https://api.deepseek.com" # 可选,ChatDeepSeek 默认会用这个
models:
- "deepseek-chat"
- "deepseek-coder"
# configuration: {} # 可选

# 可以继续添加更多 OpenAI 兼容的端点示例...
# 注意:不再需要 class_name 字段
41 changes: 41 additions & 0 deletions apps/api/.env_rerank_models.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Reranker Provider Configuration Example

# Optional: Specify the default reranker provider to use.
# If set to 'xinference', the configuration under 'rerankerProviders.xinference' will be used by default.
# If set to 'jina', or if this field is omitted or the file doesn't exist,
# the system will default to using the Jina reranker configured via .env variables.
defaultProvider: xinference # Options: 'jina', 'xinference' (add others like 'ollama' later)

rerankerProviders:
# Configuration for the Xinference reranker provider
xinference:
# Type identifier, must be 'xinference'
type: xinference

# Base URL of your running Xinference service (Required)
# Example: http://localhost:9997 or http://<your-xinference-ip>:9997
baseUrl: http://localhost:9997

# Name of the reranker model deployed in Xinference (Required)
# Example: bge-reranker-base, bge-reranker-v2-m3
modelName: bge-reranker-base

# API Key for Xinference service, if authentication is enabled (Optional)
# If your Xinference instance does not require an API key, omit this field or leave it empty.
apiKey: YOUR_XINFERENCE_API_KEY_IF_NEEDED

# Maximum number of results to return after reranking (Required for Xinference)
topN: 5

# Relevance score threshold (Required for Xinference)
# Results with a score below this threshold will be filtered out.
relevanceThreshold: 0.6

# Configuration for other providers like Ollama can be added here later
# ollama:
# type: ollama
# baseUrl: ...
# modelName: ...
# apiKey: ...
# topN: ...
# relevanceThreshold: ...
Loading