feat: +pic2txt

This commit is contained in:
莘权 马 2024-06-27 14:35:05 +08:00
parent 9dc8d7307b
commit 742ff0e80a
11 changed files with 137 additions and 1 deletions

View file

@ -0,0 +1,30 @@
3.1.功能总述
国际小超人钉钉小程序一期支持法务文档一键查看、各国法律意见检索、申请合同模板三个功能。
1、法务文档提供入口用户点击后一键进入语雀查看后续法务在语雀中进行维护。——pc和手机
2、各国法律意见在钉钉端可进行多维度检索和查看。——pc和手机【待定】
3、bd可以在钉钉端申请合同模板提交申请后即可以下载模板。——可以pc和手机申请但是下载只能通过pc
小程度底部有3个tab首页、模板、我的
3.2.首页
首页有两个分区,上面部分是法律意见检索栏。
用户第一次进入小程序展示引导页,以后进入不再展示,点击「我知道了」引导页消失。
【首页】
![](1.png)
【按国家名维度搜索】
用户在搜索框中进行检索时采用typeahead只能下拉选择数据库中有的国家名称。
![](2.png)
【检索结果】
可根据滚筒切换业务线
![](3.png)
![](4.png)
![](5.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View file

@ -0,0 +1,28 @@
import pytest
from metagpt.actions.requirement_analysis.requirement.pic2txt import Pic2Txt
from metagpt.const import TEST_DATA_PATH
from metagpt.utils.common import aread
@pytest.mark.asyncio
async def test_pic2txt(context):
images = [
TEST_DATA_PATH / "requirements/pic/1.png",
TEST_DATA_PATH / "requirements/pic/2.png",
TEST_DATA_PATH / "requirements/pic/3.png",
TEST_DATA_PATH / "requirements/pic/4.png",
TEST_DATA_PATH / "requirements/pic/5.png",
]
textual_user_requirements = await aread(filename=TEST_DATA_PATH / "requirements/1.original_requirement.txt")
acknowledge = await aread(filename=TEST_DATA_PATH / "requirements/1.acknowledge.md")
action = Pic2Txt(context=context)
rsp = await action.run(
image_paths=images, textual_user_requirement=textual_user_requirements, acknowledge=acknowledge
)
assert rsp
if __name__ == "__main__":
pytest.main([__file__, "-s"])