Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
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
Commit
61da6c36
authored
Mar 09, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Refine embedding model detection in channel test
parent
98e24435
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
controller/channel-test.go
+3
-3
No files found.
controller/channel-test.go
View file @
61da6c36
...
@@ -175,10 +175,10 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest {
...
@@ -175,10 +175,10 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest {
}
}
// 先判断是否为 Embedding 模型
// 先判断是否为 Embedding 模型
if
strings
.
Contains
(
strings
.
ToLower
(
model
),
"embedding"
)
||
if
strings
.
Contains
(
strings
.
ToLower
(
model
),
"embedding"
)
||
// 其他 embedding 模型
strings
.
HasPrefix
(
model
,
"m3e"
)
||
// m3e 系列模型
strings
.
HasPrefix
(
model
,
"m3e"
)
||
// m3e 系列模型
strings
.
Contains
(
model
,
"bge-"
)
||
// bge 系列模型
strings
.
Contains
(
model
,
"bge-"
)
{
model
==
"text-embedding-v1"
{
// 其他 embedding 模型
testRequest
.
Model
=
model
// Embedding 请求
// Embedding 请求
testRequest
.
Input
=
[]
string
{
"hello world"
}
testRequest
.
Input
=
[]
string
{
"hello world"
}
return
testRequest
return
testRequest
...
...
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