Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autocomplete: Remove top_k when using temperature (#2178)
According to the Fireworks API docs: > “We generally recommend altering this or `temperature` but not both.” We previously even had an issue that was not passing `top_p` forward properly: https://github.com/sourcegraph/sourcegraph/pull/58820 This PR removes top_p from the client. I ran a bunch of direct API requests to Fireworks and its seems like the `top_p` value makes no difference when a temperature is set anyways. ## Test plan Tested via CURL commands: ``` curl 'https://api.fireworks.ai/inference/v1/completions' \ -H 'authority: api.fireworks.ai' \ -H 'accept: text/event-stream' \ -H 'authorization: Bearer TOKEN HERE' \ -H 'content-type: application/json' \ --data-raw '{"model":"accounts/fireworks/models/starcoder-16b-w8a16","prompt":"<filename>write.ts<fim_prefix>// \nfunction writeCurrentDateToFile() {\n <fim_suffix>\n}<fim_middle>","n":1,"max_tokens":500,"temperature":0.1,"top_p":1}' \ ``` <!-- Required. See https://docs.sourcegraph.com/dev/background-information/testing_principles. -->
- Loading branch information