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
Unverified
Commit
b07f0b96
authored
Apr 09, 2026
by
Calcium-Ion
Committed by
GitHub
Apr 09, 2026
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4154 from seefs001/feature/vllm-extensions-params
feat: fill in some custom fields for vllm-omini
parents
53cf37a4
a19a63b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
dto/audio.go
+10
-0
relay/channel/openai/adaptor.go
+1
-1
No files found.
dto/audio.go
View file @
b07f0b96
...
@@ -18,6 +18,16 @@ type AudioRequest struct {
...
@@ -18,6 +18,16 @@ type AudioRequest struct {
Speed
*
float64
`json:"speed,omitempty"`
Speed
*
float64
`json:"speed,omitempty"`
StreamFormat
string
`json:"stream_format,omitempty"`
StreamFormat
string
`json:"stream_format,omitempty"`
Metadata
json
.
RawMessage
`json:"metadata,omitempty"`
Metadata
json
.
RawMessage
`json:"metadata,omitempty"`
// vllm-omini
TaskType
json
.
RawMessage
`json:"task_type,omitempty"`
Language
json
.
RawMessage
`json:"language,omitempty"`
RefAudio
json
.
RawMessage
`json:"ref_audio,omitempty"`
RefText
json
.
RawMessage
`json:"ref_text,omitempty"`
XVectorOnlyMode
json
.
RawMessage
`json:"x_vector_only_mode,omitempty"`
MaxNewTokens
json
.
RawMessage
`json:"max_new_tokens,omitempty"`
InitialCodecChunkFrames
json
.
RawMessage
`json:"initial_codec_chunk_frames,omitempty"`
// TODO:ensure that the logic remains correct after the stream is started.
//Stream json.RawMessage `json:"stream,omitempty"`
}
}
func
(
r
*
AudioRequest
)
GetTokenCountMeta
()
*
types
.
TokenCountMeta
{
func
(
r
*
AudioRequest
)
GetTokenCountMeta
()
*
types
.
TokenCountMeta
{
...
...
relay/channel/openai/adaptor.go
View file @
b07f0b96
...
@@ -369,7 +369,7 @@ func (a *Adaptor) ConvertEmbeddingRequest(c *gin.Context, info *relaycommon.Rela
...
@@ -369,7 +369,7 @@ func (a *Adaptor) ConvertEmbeddingRequest(c *gin.Context, info *relaycommon.Rela
func
(
a
*
Adaptor
)
ConvertAudioRequest
(
c
*
gin
.
Context
,
info
*
relaycommon
.
RelayInfo
,
request
dto
.
AudioRequest
)
(
io
.
Reader
,
error
)
{
func
(
a
*
Adaptor
)
ConvertAudioRequest
(
c
*
gin
.
Context
,
info
*
relaycommon
.
RelayInfo
,
request
dto
.
AudioRequest
)
(
io
.
Reader
,
error
)
{
a
.
ResponseFormat
=
request
.
ResponseFormat
a
.
ResponseFormat
=
request
.
ResponseFormat
if
info
.
RelayMode
==
relayconstant
.
RelayModeAudioSpeech
{
if
info
.
RelayMode
==
relayconstant
.
RelayModeAudioSpeech
{
jsonData
,
err
:=
js
on
.
Marshal
(
request
)
jsonData
,
err
:=
comm
on
.
Marshal
(
request
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"error marshalling object: %w"
,
err
)
return
nil
,
fmt
.
Errorf
(
"error marshalling object: %w"
,
err
)
}
}
...
...
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