go-openai
go-openai copied to clipboard
feat: support topk
Describe the change
TopK is well-used paramater for provider which uses OpenAI-compatible API format. This commit add the top_k parameter.
Provide OpenAI documentation link Provide a relevant API doc from https://platform.openai.com/docs/api-reference
Describe your solution
Add top_k as new parameter
Tests
Additional context
Some evidence that top_k is well used
- https://openrouter.ai/docs/api-reference/parameters
- https://docs.vllm.ai/en/v0.6.4/dev/sampling_params.html
Issue: #641