Mixedbreadai 重排序
MixedbreadAIRerank #
使用 mixedbread ai 重排序 API 对节点进行重排序的类,支持的模型如 'mixedbread-ai/mxbai-rerank-large-v1'。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
top_n
|
int
|
返回前 N 个节点。默认为 10。 |
10
|
model
|
str
|
mixedbread ai 模型名称。默认为 "mixedbread-ai/mxbai-rerank-large-v1"。 |
'mixedbread-ai/mxbai-rerank-large-v1'
|
api_key
|
Optional[str]
|
mixedbread ai API 密钥。默认为 None。 |
无
|
max_retries
|
Optional[int]
|
API 调用的最大重试次数。默认为 None。 |
无
|
timeout
|
Optional[float]
|
API 调用的超时时间。 |
无
|
httpx_client
|
Optional[Client]
|
用于同步请求的自定义 HTTPX 客户端。 |
无
|
httpx_async_client
|
Optional[AsyncClient]
|
用于异步请求的自定义 HTTPX 客户端。 |
无
|
源代码位于 llama-index-integrations/postprocessor/llama-index-postprocessor-mixedbreadai-rerank/llama_index/postprocessor/mixedbreadai_rerank/base.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|