Skip to content

Commit f6e48f6

Browse files
tptppclaudejikong.tp
authored
Feat/channel cron integration v2 (#165)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: jikong.tp <jikong.tp@antgroup.com>
1 parent dd5c8b8 commit f6e48f6

25 files changed

Lines changed: 344 additions & 69 deletions

File tree

README.ja.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,12 @@ uv sync --all-packages --frozen \
109109
--extra "derisks" \
110110
--extra "storage_oss2" \
111111
--extra "client" \
112-
--extra "ext_base"
112+
--extra "ext_base" \
113+
--extra "channel_dingtalk"
113114
```
114115

116+
> 注意:`channel_dingtalk` はオプションです。DingTalk チャネルのサポートが不要な場合は削除してください。
117+
115118
#### サーバーの起動
116119

117120
`derisk-proxy-aliyun.toml` で API_KEY を設定し、実行:

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,12 @@ uv sync --all-packages --frozen \
107107
--extra "derisks" \
108108
--extra "storage_oss2" \
109109
--extra "client" \
110-
--extra "ext_base"
110+
--extra "ext_base" \
111+
--extra "channel_dingtalk"
111112
```
112113

114+
> Note: `channel_dingtalk` is optional. Skip it if you don't need DingTalk channel support.
115+
113116
#### Start Server
114117

115118
Configure the API_KEY in `derisk-proxy-aliyun.toml`, then run:

README.zh.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,12 @@ uv sync --all-packages --frozen \
107107
--extra "derisks" \
108108
--extra "storage_oss2" \
109109
--extra "client" \
110-
--extra "ext_base"
110+
--extra "ext_base" \
111+
--extra "channel_dingtalk"
111112
```
112113

114+
> 注意:`channel_dingtalk` 为可选依赖,若不需要钉钉渠道支持可移除此行。
115+
113116
#### 启动服务
114117

115118
`derisk-proxy-aliyun.toml` 中配置 API_KEY,然后运行:

packages/derisk-app/src/derisk_app/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class RagParameters(BaseParameters):
147147
class ServiceWebParameters(BaseParameters):
148148
host: str = field(default="0.0.0.0", metadata={"help": _("Webserver deploy host")})
149149
port: int = field(
150-
default=5670, metadata={"help": _("Webserver deploy port, default is 5670")}
150+
default=7777, metadata={"help": _("Webserver deploy port, default is 7777")}
151151
)
152152
light: Optional[bool] = field(
153153
default=False, metadata={"help": _("Run Webserver in light mode")}

packages/derisk-app/src/derisk_app/initialization/db_model_initialization.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
ServeEntity as AppConfigServeEntity,
2929
)
3030
from derisk_serve.mcp.models.models import ServeEntity as MCPServeEntity
31+
from derisk_serve.channel.models.models import ChannelEntity
3132

3233
_MODELS = [
3334
FileServeEntity,

packages/derisk-app/src/derisk_app/initialization/serve_initialization.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def scan_serve_configs():
3838
"derisk_serve.asset",
3939
"derisk_serve.config",
4040
"derisk_serve.version",
41+
"derisk_serve.channel",
4142
]
4243

4344
scanner = ModelScanner[BaseServeConfig]()

packages/derisk-app/src/derisk_app/knowledge/_cli/knowledge_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from derisk.configs.model_config import DATASETS_DIR
88

9-
_DEFAULT_API_ADDRESS: str = "http://127.0.0.1:5670"
9+
_DEFAULT_API_ADDRESS: str = "http://127.0.0.1:7777"
1010
API_ADDRESS: str = _DEFAULT_API_ADDRESS
1111

1212
logger = logging.getLogger("derisk_cli")

packages/derisk-client/src/derisk_client/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(
6363
6464
Args:
6565
api_base: Optional[str], a full URL for the DERISK API.
66-
Defaults to the `http://localhost:5670/api/v2`.
66+
Defaults to the `http://localhost:7777/api/v2`.
6767
api_key: Optional[str], The derisk api key to use for authentication.
6868
Defaults to None.
6969
timeout: Optional[httpx._types.TimeoutTypes]: The timeout to use.
@@ -79,14 +79,14 @@ def __init__(
7979
8080
from derisk_client import Client
8181
82-
DERISK_API_BASE = "http://localhost:5670/api/v2"
82+
DERISK_API_BASE = "http://localhost:7777/api/v2"
8383
DERISK_API_KEY = "derisk"
8484
client = Client(api_base=DERISK_API_BASE, api_key=DERISK_API_KEY)
8585
client.chat(model="chatgpt_proxyllm", messages="Hello?")
8686
"""
8787
if not api_base:
8888
api_base = os.getenv(
89-
"DERISK_API_BASE", f"http://localhost:5670/{CLIENT_API_PATH}/{version}"
89+
"DERISK_API_BASE", f"http://localhost:7777/{CLIENT_API_PATH}/{version}"
9090
)
9191
if not api_key:
9292
api_key = os.getenv("DERISK_API_KEY")
@@ -157,7 +157,7 @@ async def chat(
157157
158158
from derisk_client import Client
159159
160-
DERISK_API_BASE = "http://localhost:5670/api/v2"
160+
DERISK_API_BASE = "http://localhost:7777/api/v2"
161161
DERISK_API_KEY = "derisk"
162162
client = Client(api_base=DERISK_API_BASE, api_key=DERISK_API_KEY)
163163
res = await client.chat(model="chatgpt_proxyllm", messages="Hello?")
@@ -233,7 +233,7 @@ async def chat_stream(
233233
234234
from derisk_client import Client
235235
236-
DERISK_API_BASE = "http://localhost:5670/api/v2"
236+
DERISK_API_BASE = "http://localhost:7777/api/v2"
237237
DERISK_API_KEY = "derisk"
238238
client = Client(api_base=DERISK_API_BASE, api_key=DERISK_API_KEY)
239239
res = await client.chat_stream(model="chatgpt_proxyllm", messages="Hello?")

packages/derisk-core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ license = "MIT"
1414
readme = "README.md"
1515
requires-python = ">= 3.10"
1616
dependencies = [
17-
"aiohttp==3.8.4",
17+
"aiohttp>=3.10.0",
1818
"chardet==5.1.0",
1919
"importlib-resources==5.12.0",
2020
"python-dotenv==1.0.0",

packages/derisk-core/src/derisk/agent/expand/pdca_agent/PDCA_FILE_SYSTEM_INTEGRATION_SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ derisk:
176176
177177
**URL 格式:**
178178
- OSS: `https://bucket.oss-region.aliyuncs.com/object?signature=xxx`
179-
- 本地: `http://localhost:5670/api/v2/serve/file/files/{bucket}/{file_id}`
179+
- 本地: `http://localhost:7777/api/v2/serve/file/files/{bucket}/{file_id}`
180180

181181
### 2. OSS 客户端(兼容模式)
182182

0 commit comments

Comments
 (0)