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
2 changes: 1 addition & 1 deletion packages/derisk-client/src/derisk_client/tool_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def from_dict(cls, d: Dict[str, Any]):

class ToolClient:
"""
A client for interacting with the Alipay Tool Base API.
A client for interacting with the Tool Base API.
"""

def __init__(self,
Expand Down
3 changes: 1 addition & 2 deletions packages/derisk-core/src/derisk/util/tracer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,5 @@ def _parse_span_id(body: Any) -> Optional[str]:


def new_trace_id() -> str:
# todo: 按照站内规则重新生产traceId
# https://yuque.antfin.com/middleware/tracer/id_generate
# todo: 按照链路追踪规范重新生成 traceId
return uuid.uuid4().hex
4 changes: 2 additions & 2 deletions packages/derisk-ext/src/derisk_ext/rag/knowledge/yuque_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def _load(self) -> List[Document]:
if self._path is not None:
if self._path.count("/") < 5:
raise ValueError(f"yuque url: {self._path} format is incorrect!")
_, _, _, group, book_slug, doc_id = self._path.split("/", 5)
scheme, _, host, group, book_slug, doc_id = self._path.split("/", 5)
web_reader = AntYuqueLoader(access_token=self._doc_token)
book = web_reader.single_doc(
group=group, book_slug=book_slug, doc_id=doc_id
)
Comment on lines +60 to 64
yuque_url = f"https://yuque.antfin.com/{group}/{book_slug}/{doc_id}"
yuque_url = f"{scheme}//{host}/{group}/{book_slug}/{doc_id}"

if book['type'] == 'Sheet':
logger.info(f"yuque url {yuque_url} type is sheet, need sheet split method")
Expand Down
6 changes: 3 additions & 3 deletions tests/test_agent_refactor_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def create_llm_client():

provider = ProviderConfig(
provider="openai",
api_base="https://antchat.alipay.com/v1",
api_key="fbCTZnIbReh1vVW8oySViGHhrQ8fK2mS",
api_base="https://xx/v1",
api_key="YOUR_API_KEY",
Comment on lines +104 to +105
)

model = ModelConfig(name="DeepSeek-V3", temperature=0.7, max_new_tokens=40960)
Expand Down Expand Up @@ -558,7 +558,7 @@ async def main():
"""主测试入口"""
logger.info("\n" + "=" * 70)
logger.info("开始 Agent 重构验证测试")
logger.info("模型配置: DeepSeek-V3 @ https://antchat.alipay.com/v1")
logger.info("模型配置: DeepSeek-V3")
logger.info("=" * 70)

# 测试基础设施模块
Expand Down
4 changes: 2 additions & 2 deletions tests/test_agent_refactor_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def create_llm_client():

provider_config = {
"provider": "openai",
"api_base": "https://antchat.alipay.com/v1",
"api_key": "fbCTZnIbReh1vVW8oySViGHhrQ8fK2mS",
"api_base": "https://xxx/v1",
"api_key": "YOUR_API_KEY",
Comment on lines +94 to +95
}

model_config = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useEffect, useRef, useState } from 'react';
// import { Highlight } from '@alipay/tech-ui';
import { Rect } from '@codemirror/view';
import { Empty, Flex, Popover, Typography } from 'antd';
import React from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ code something...
js
```js
import React from 'react';
// import { CodePreview } from '@alipay/uni-chat';

// import Title from 'antd/es/skeleton/Title';
import { isEqual } from 'lodash';
Expand All @@ -106,14 +105,10 @@ export default React.memo(VisCodeIde, isEqual);
json
```json
{
"name": "@alipay/uni-chat",
"name": "@derisk/vis",
"version": "1.1.92",
"description": "A library project powered by bigfish-library",
"repository": {
"type": "git",
"url": "https://code.alipay.com/tr-web/UniChat"
},
"author": "will.jc",
"description": "A vis component library project",
"author": "OpenDerisk",
"module": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
Expand All @@ -123,19 +118,14 @@ json
"assets.json"
],
"scripts": {
"build": "bigfish-lib build",
"build:watch": "bigfish-lib build -w",
"ci": "tnpm run lint && jest --coverage --passWithNoTests tnpm run lint && jest --coverage --passWithNoTests tnpm run lint && jest --coverage --passWithNoTests tnpm run lint && jest --coverage --passWithNoTests tnpm run lint && jest --coverage --passWithNoTests tnpm run lint && jest --coverage --passWithNoTests",
"build": "father build",
"build:watch": "father build -w",
"ci": "npm run lint && jest --coverage --passWithNoTests",
"cov": "jest --coverage",
"create": "bigfish-lib create",
"deploy": "bigfish-lib deploy",
"dev": "bigfish-lib doc dev",
"doctor": "bigfish-lib doctor",
"lint": "bigfish-lib lint",
"prepare": "bigfish-lib setup && husky install",
"prepublishOnly": "bigfish-lib prepublish",
"pull": "bigfish-lib pull",
"start": "sudo PORT=443 HTTPS=true tnpm run dev",
"dev": "dumi dev",
"lint": "eslint --fix .",
"prepare": "husky install",
"start": "npm run dev",
"test": "jest"
},
"commitlint": {
Expand All @@ -148,22 +138,19 @@ json
"prettier --cache --write --no-error-on-unmatched-pattern"
],
"*.{js,jsx}": [
"bigfish-lib lint --fix --eslint-only",
"eslint --fix",
"prettier --cache --write"
],
"*.{css,less}": [
"bigfish-lib lint --fix --stylelint-only",
"stylelint --fix",
"prettier --cache --write"
],
"*.{ts,tsx}": [
"bigfish-lib lint --fix --eslint-only",
"eslint --fix",
"prettier --cache --parser=typescript --write"
]
},
"dependencies": {
"@alipay/sregpt-ui": "^1.0.16",
"@alipay/tech-ui": "^3.14.5",
"@alipay/vis-datafun": "^1.0.0",
"@ant-design/cssinjs": "^1.24.0",
"@ant-design/icons": "^5.5.1",
"@ant-design/x": "^1.0.0-alpha.5",
Expand Down Expand Up @@ -207,8 +194,6 @@ json
"vfile": "^5.3.7"
},
"devDependencies": {
"@ali/ci": "^4.26.0",
"@alipay/bigfish-library": "^4.0.0",
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@testing-library/jest-dom": "^5.1.1",
Expand Down Expand Up @@ -242,16 +227,9 @@ json
"install-node": "16"
},
"publishConfig": {
"registry": "https://registry.antgroup-inc.cn"
},
"ci": {
"type": "aci"
},
"dumiAssets": "assets.json",
"tnpm": {
"mode": "npm"
"registry": "https://registry.npmjs.org"
},
"yuyanId": "180020010101325639"
"dumiAssets": "assets.json"
}

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group:
````jsx
import React from 'react';
import { Space } from 'antd';
import { VisCodeIde } from '@alipay/uni-chat';
import { VisCodeIde } from '@derisk/vis';

export default () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group:
```jsx
import React from 'react';
import { Space } from 'antd';
import { VisLLM } from '@alipay/uni-chat';
import { VisLLM } from '@derisk/vis';

export default () => {
return (
Expand All @@ -34,7 +34,7 @@ export default () => {
"token_use": 256,
"token_speed": 45.8,
"llm_model": "gpt-4-turbo",
"llm_avatar": "https://local.alipay/avatars/ai-assistant.png",
"llm_avatar": "https://example.com/avatars/ai-assistant.png",
"start_time": "2024-01-15T14:30:00Z",
"firt_out_time": "2024-01-15T14:30:02.345Z",
"cost": 2345,
Expand All @@ -60,7 +60,7 @@ export default () => {
"token_use": 256,
"token_speed": 45.8,
"llm_model": "gpt-4-turbo",
"llm_avatar": "https://local.alipay/avatars/ai-assistant.png",
"llm_avatar": "https://example.com/avatars/ai-assistant.png",
"start_time": "2024-01-15T14:30:00Z",
"firt_out_time": "2024-01-15T14:30:02.345Z",
"cost": 2345,
Expand Down
Loading