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

add gbi miss ValidationError #25

Merged
merged 1 commit into from
Dec 27, 2023
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
4 changes: 2 additions & 2 deletions appbuilder/core/components/gbi/nl2sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions appbuilder/core/components/gbi/nl2sql/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,7 +27,6 @@
from appbuilder.core.components.gbi.basic import SUPPORTED_MODEL_NAME



class NL2SqlArgs(ComponentArguments):
"""
nl2sql 的参数
Expand Down
4 changes: 2 additions & 2 deletions appbuilder/core/components/gbi/select_table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion appbuilder/core/components/gbi/select_table/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
选表的参数
Expand Down
Loading