Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
0c55beb7
authored
Apr 10, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: comment
parent
9b1c0e1a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
src/service/response.ts
+1
-1
src/utils/tools.ts
+3
-0
No files found.
src/service/response.ts
View file @
0c55beb7
...
@@ -49,6 +49,6 @@ export const jsonRes = <T = any>(
...
@@ -49,6 +49,6 @@ export const jsonRes = <T = any>(
code
,
code
,
statusText
:
''
,
statusText
:
''
,
message
:
msg
,
message
:
msg
,
data
:
data
||
error
||
null
data
:
data
||
null
});
});
};
};
src/utils/tools.ts
View file @
0c55beb7
...
@@ -127,6 +127,9 @@ export const readDocContent = (file: File) =>
...
@@ -127,6 +127,9 @@ export const readDocContent = (file: File) =>
};
};
});
});
/**
* 向量转成 float32 buffer 格式
*/
export
const
vectorToBuffer
=
(
vector
:
number
[])
=>
{
export
const
vectorToBuffer
=
(
vector
:
number
[])
=>
{
const
npVector
=
new
Float32Array
(
vector
);
const
npVector
=
new
Float32Array
(
vector
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment