Skip to content
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

TreeMind test case中增加sleep操作,规避QPS超限报错 #588

Merged
merged 4 commits into from
Nov 11, 2024
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
6 changes: 4 additions & 2 deletions python/core/components/tree_mind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ out = treemind.run(msg)
print(out.content)

>>>
{'result': '思维导图已经为您生成好了,您可以点击'img_link'对应的链接查看,如果您觉得这个思维导图还不够完美,或者您的想法需要更自由地表达,点击'edit_link'对应的链接,对思维导图变形、变色、变内容、甚至可以添加新的元素, 'img_link': 'https://static.shutu.cn/shutu/static/open6e/2024/05/24/dbd67eddec13f3a6a75857b9c6e06d85.jpeg', 'edit_link': 'https://gapi.shutu.cn/ai/edit-mind-url?works_guid=open5ab4af46187ff7c138fcd95de09efe92_bdappbuilder'}
{'result': '思维导图已经为您生成好了,您可以点击'img_link'对应的链接查看,如果您觉得这个思维导图还不够完美,或者您的想法需要更自由地表达,点击'edit_link'对应的链接,对思维导图变形、变色、变内容、甚至可以添加新的元素,
'img_link': 'https://static.shutu.cn/shutu/static/open6e/2024/05/24/dbd67eddec13f3a6a75857b9c6e06d85.jpeg',
'edit_link': 'https://gapi.shutu.cn/ai/edit-mind-url?works_guid=open5ab4af46187ff7c138fcd95de09efe92_bdappbuilder'}
```

生成的思维导图:<br/>![图片url](https://bj.bcebos.com/appbuilder-sdk-components/TreeMind-年终总结思维导图.jpeg)
Expand All @@ -59,6 +61,6 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"

### 响应参数

| 参数名称 |参数类型 | 描述 | 示例 |
| 参数名称 |参数类型 | 描述 | 示例值 |
|-------------|--------|------|------|
| resp | obj:`Message` | 组件返回结果 | Message(name=msg, content={'result': '生成的思维导图:xxx。思维导图已经为您生成好了,如果您觉得这个思维导图还不够完美,或者您的想法需要更自由地表达,点击编辑按钮,对思维导图变形、变色、变内容、甚至可以添加新的元素,您可以通过这个链接编辑:xxx。', 'img_link': 'xxx', 'edit_link': 'xxx'}, mtype=dict) |
2 changes: 2 additions & 0 deletions python/tests/test_treemind.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def setUp(self):
def test_treemind_component_tool_eval(self):
"""测试tool_eval方法的返回值是否正确
"""
import time
time.sleep(1)
result = self.tm.tool_eval(query=self.query)
self.assertIsNotNone(result)
for r in result:
Expand Down
Loading