Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
Documents | []operations.Document | :heavy_check_mark: | The list of documents to rerank. Documents may be plain strings, or structured objects with text and/or image for multimodal models. | [ “Paris is the capital of France.”, “Berlin is the capital of Germany.” ] |
Model | string | :heavy_check_mark: | The rerank model to use | cohere/rerank-v3.5 |
Provider | optionalnullable.OptionalNullable[components.ProviderPreferences] | :heavy_minus_sign: | N/A | { “allow_fallbacks”: true } |
Query | string | :heavy_check_mark: | The search query to rerank documents against | What is the capital of France? |
TopN | *int64 | :heavy_minus_sign: | Number of most relevant documents to return | 3 |
Trace | *components.TraceConfig | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | { “trace_id”: “trace-abc123”, “trace_name”: “my-app-trace” } |
User | *string | :heavy_minus_sign: | A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. | user-1234 |