Merge pull request #3993 from janhq/fix/openai-preview-models-transform-payload-update
fix: update the payload transform for OpenAI preview models
This commit is contained in:
commit
4e91c80bcc
@ -76,10 +76,11 @@ export default class JanInferenceOpenAIExtension extends RemoteOAIEngine {
|
||||
transformPayload = (payload: OpenAIPayloadType): OpenAIPayloadType => {
|
||||
// Transform the payload for preview models
|
||||
if (this.previewModels.includes(payload.model)) {
|
||||
const { max_tokens, ...params } = payload
|
||||
const { max_tokens, temperature, top_p, stop, ...params } = payload
|
||||
return {
|
||||
...params,
|
||||
max_completion_tokens: max_tokens,
|
||||
stream: false // o1 only support stream = false
|
||||
}
|
||||
}
|
||||
// Pass through for non-preview models
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user