Skip to content

Commit

Permalink
fix: bug (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
mizy authored Jan 17, 2024
1 parent afec886 commit 7a2bf18
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/pages/Import/AIImport/Create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ const Create = observer((props: { visible: boolean; onCancel: () => void }) => {
const type = types[subfix] || 1;
const size = file.size * type;
const schema = await llm.getSpaceSchema(space);
const schemaBytesLength = getByteLength(schema) + 500; //prompt length about 500
const schemaBytesLength = getByteLength(schema) + 1000; //prompt length about 500
const splitNums = Math.ceil(size / llm.config.maxContextLength);
const splitBytesLength = Math.ceil(schemaBytesLength * splitNums);
const totalBytesLength = splitBytesLength + file.size;
// full connection
const tokensNum = totalBytesLength / 4; //about 4 bytes per token
const tokensNum = totalBytesLength / 2; //about 4 bytes per token
setTokens(tokensNum);
}
})();
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@vesoft-inc/force-graph": "2.0.7",
"@vesoft-inc/i18n": "^1.0.1",
"@vesoft-inc/icons": "^1.7.0",
"@vesoft-inc/nebula-explain-graph": "^1.0.10",
"@vesoft-inc/nebula-explain-graph": "^1.0.11",
"@vesoft-inc/veditor": "^4.4.14",
"antd": "^5.8.4",
"axios": "^0.23.0",
Expand Down

0 comments on commit 7a2bf18

Please sign in to comment.