diff --git a/appbuilder/core/components/gbi/nl2sql/README.md b/appbuilder/core/components/gbi/nl2sql/README.md index 3de0f994..74532071 100644 --- a/appbuilder/core/components/gbi/nl2sql/README.md +++ b/appbuilder/core/components/gbi/nl2sql/README.md @@ -98,10 +98,10 @@ CREATE TABLE `supper_market_info` ( ### 调用参数 - message: message.content 是 字典,包含: query, session, column_constraint 三个key * query: 用户的问题 - * session: gbi session 的历史 列表, 参考 GBISessionRecord + * session: gbi session 的历史 列表, 参考 SessionRecord * column_constraint: 列选约束 参考 ColumnItem 具体定义 -#### GBISessionRecord 初始化参数 +#### SessionRecord 初始化参数 - query: 用户的问题 - answer: gbi_nl2sql 返回的结果 NL2SqlResult diff --git a/appbuilder/core/components/gbi/nl2sql/component.py b/appbuilder/core/components/gbi/nl2sql/component.py index 940119f7..b90f8066 100644 --- a/appbuilder/core/components/gbi/nl2sql/component.py +++ b/appbuilder/core/components/gbi/nl2sql/component.py @@ -17,7 +17,7 @@ import uuid import json from typing import Dict, List, Optional -from pydantic import BaseModel, Field +from pydantic import BaseModel, Field, ValidationError from appbuilder.core.component import Component, ComponentArguments from appbuilder.core.message import Message @@ -27,7 +27,6 @@ from appbuilder.core.components.gbi.basic import SUPPORTED_MODEL_NAME - class NL2SqlArgs(ComponentArguments): """ nl2sql 的参数 diff --git a/appbuilder/core/components/gbi/select_table/README.md b/appbuilder/core/components/gbi/select_table/README.md index 391fe8ee..395e6c80 100644 --- a/appbuilder/core/components/gbi/select_table/README.md +++ b/appbuilder/core/components/gbi/select_table/README.md @@ -68,9 +68,9 @@ print(f"选的表是: {select_table_result_message.content}") ### 调用参数 - message: message.content 是用户的问题,包含的key: query, session * query: 用户提出的问题 - * session: GBISessionRecord 列表 + * session: SessionRecord 列表 -#### GBISessionRecord 初始化参数 +#### SessionRecord 初始化参数 - query: 用户的问题 - answer: gbi_nl2sql 返回的结果 NL2SqlResult diff --git a/appbuilder/core/components/gbi/select_table/component.py b/appbuilder/core/components/gbi/select_table/component.py index d66546da..d2550447 100644 --- a/appbuilder/core/components/gbi/select_table/component.py +++ b/appbuilder/core/components/gbi/select_table/component.py @@ -17,13 +17,14 @@ import uuid import json from typing import Dict, List, Optional -from pydantic import BaseModel, Field +from pydantic import BaseModel, Field, ValidationError from appbuilder.core.component import Component, ComponentArguments from appbuilder.core.message import Message from appbuilder.core.components.gbi.basic import SessionRecord from appbuilder.core.components.gbi.basic import SUPPORTED_MODEL_NAME + class SelectTableArgs(ComponentArguments): """ 选表的参数