Skip to content

Commit

Permalink
add gbi miss ValidationError
Browse files Browse the repository at this point in the history
  • Loading branch information
cjopengler committed Dec 27, 2023
1 parent 27b8e6c commit 35f7427
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
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

0 comments on commit 35f7427

Please sign in to comment.