Skip to content

model_router 插件支持解析 multipart/form-data 请求体中的 model 参数 #1887

Open
@CH3CHO

Description

@CH3CHO

Why do you need it?

OpenAI 的 /v1/audio/transcriptions 请求体的 Content-Type 是 multipart/form-data,其中包含一个 model 参数。如果用户希望使用这个 model 参数进行路由的话,就需要 model_router 插件支持将其解析出来并填充到 HTTP Header 里。

https://platform.openai.com/docs/api-reference/audio/createTranscription

curl https://api.openai.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F file="@/path/to/file/audio.mp3" \
  -F model="whisper-1"

How could it be?

如题。

Other related information

Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions