Skip to content

Commit

Permalink
fix: add max_tokens to default payload (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
nidstigator authored Aug 12, 2024
1 parent e6a01e9 commit 861ed52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/gp/dispatcher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ D.prepare_payload = function(messages, model, provider)
model = model.model,
stream = true,
messages = messages,
max_tokens = model.max_tokens or 4096,
temperature = math.max(0, math.min(2, model.temperature or 1)),
top_p = math.max(0, math.min(1, model.top_p or 1)),
}
Expand Down

0 comments on commit 861ed52

Please sign in to comment.