mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 00:17:31 +00:00
Python Sandbox (#4380)
* Python3 Sandbox (#3944) * update python box (#4251) * update python box * Adjust the height of the NodeCode border. * update python sandbox and add test systemcall bash * update sandbox * add VERSION_RELEASE (#4376) * save empty docx * fix pythonbox log error * fix: js template --------- Co-authored-by: dogfar <37035781+dogfar@users.noreply.github.com> Co-authored-by: gggaaallleee <91131304+gggaaallleee@users.noreply.github.com> Co-authored-by: gggaaallleee <1293587368@qq.com>
This commit is contained in:
@@ -436,6 +436,28 @@ FastGPT是一款基于大语言模型(LLM)的智能问答系统,专为提
|
||||
expect(chunks).toEqual(mock.result);
|
||||
});
|
||||
|
||||
// 自定义分隔符测试:换行符号
|
||||
it(`Test splitText2Chunks 1`, () => {
|
||||
const mock = {
|
||||
text: `111
|
||||
222
|
||||
|
||||
333`,
|
||||
result: [
|
||||
`111
|
||||
222`,
|
||||
'333'
|
||||
]
|
||||
};
|
||||
|
||||
const { chunks } = splitText2Chunks({ customReg: ['\\n\\n'], text: mock.text, chunkSize: 2000 });
|
||||
fs.writeFileSync(
|
||||
'/Users/yjl/fastgpt-pro/FastGPT/test/cases/function/packages/global/common/string/test.md',
|
||||
chunks.join('------')
|
||||
);
|
||||
expect(chunks).toEqual(mock.result);
|
||||
});
|
||||
|
||||
// 长代码块分割
|
||||
it(`Test splitText2Chunks 7`, () => {
|
||||
const mock = {
|
||||
|
Reference in New Issue
Block a user