Skip to content

Commit

Permalink
Support max_completion_tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
johnd0e committed Dec 16, 2024
1 parent b25e4d4 commit dc3d17a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion readme.MD
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Implemented via [`inlineData`](https://ai.google.dev/api/caching#Part).
- [ ] `logit_bias`
- [ ] `logprobs`
- [ ] `top_logprobs`
- [x] `max_tokens`
- [x] `max_tokens`, `max_completion_tokens`
- [x] `n` (`candidateCount` <8, not for streaming)
- [x] `presence_penalty`
- [x] `response_format`
Expand Down
1 change: 1 addition & 0 deletions src/worker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ const fieldsMap = {
stop: "stopSequences",
n: "candidateCount", // not for streaming
max_tokens: "maxOutputTokens",
max_completion_tokens: "maxOutputTokens",
temperature: "temperature",
top_p: "topP",
top_k: "topK", // non-standard
Expand Down

0 comments on commit dc3d17a

Please sign in to comment.