Skip to content

Commit

Permalink
Update for vdb readme (#205)
Browse files Browse the repository at this point in the history
* update for vdb readme

* update check
  • Loading branch information
MrChengmo authored Mar 20, 2024
1 parent 495bba4 commit 5ad6fb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion appbuilder/core/components/retriever/baidu_vdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ os.environ["APPBUILDER_TOKEN"] = "bce-YOURTOKEN"

| 参数名称 | 参数类型 |是否必须 | 描述 | 示例值 |
|---------|--------|--------|------------------|---------------|
| message | String || 需要检索的内容, 类型为Message,content类型为str, 长度要求(0,1000) | "中国2023人均GDP" |
| message | String || 需要检索的内容, 类型为Message,content类型为str, 长度要求(0,512) | "中国2023人均GDP" |
| top_k | int || 返回相似度最高的top_k个内容,top_k的数值范围(1,embedding索引数量] | 1 |


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ def run(self, query: Message, top_k: int = 1):
.format(type(content)))
if len(content) == 0:
raise ValueError("Parameter `query` content is empty")
if len(content) > 1000:
raise ValueError("Parameter `query` content is too long, max length per batch size is 1000")
if len(content) > 512:
raise ValueError("Parameter `query` content is too long, max length per batch size is 512")

query_embedding = self.embedding(query)
anns = AnnSearch(
Expand Down

0 comments on commit 5ad6fb0

Please sign in to comment.