CreateRerankRequest - Go SDK

CreateRerankRequest type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

Rerank request input

Fields

FieldTypeRequiredDescriptionExample
Modelstring✔️The rerank model to usecohere/rerank-v3.5
Querystring✔️The search query to rerank documents againstWhat is the capital of France?
Documents[]string✔️The list of documents to rerank[
“Paris is the capital of France.”,
“Berlin is the capital of Germany.”
]
TopN*int64Number of most relevant documents to return3
Provideroptionalnullable.OptionalNullable[components.ProviderPreferences]N/A{"allow_fallbacks": true}