Skip to content

Commit

Permalink
fix: πŸ› check seed for NaN before deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Dec 10, 2024
1 parent 8f20f96 commit 3d467b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const OpenAIChatCompletion: ChatCompletionHandler = async (
model,
} satisfies CreateChatCompletionRequest)

if (postReq.seed && features?.seed === false) {
if (!isNaN(postReq.seed) && features?.seed === false) {
logVerbose(`seed: disabled, not supported by ${provider}`)
trace.itemValue(`seed`, `disabled`)
delete postReq.seed // some providers do not support seed
Expand Down

0 comments on commit 3d467b1

Please sign in to comment.