go-openai icon indicating copy to clipboard operation
go-openai copied to clipboard

feat: support topk

Open KevinZonda opened this issue 6 months ago • 3 comments

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

KevinZonda avatar May 05 '25 04:05 KevinZonda