Galaxia
GalaxiaRetriever #
继承自: BaseRetriever
Galaxia 知识检索器。
在使用 API 之前,请在此创建您的知识库:beta.cloud.smabbler.com/
在此处了解更多信息:https://smabbler.gitbook.io/smabbler/api-rag/smabblers-api-rag
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
api_url
|
Galaxia API 的 URL,例如 "https://beta.api.smabbler.com" |
必需 | |
api_key
|
API 密钥 |
必需 | |
knowledge_base_id
|
知识库 ID (Galaxia 模型) |
必需 |
示例
.. code-block:: python
from llama_index.retrievers.galaxia import GalaxiaRetriever
from llama_index.core.schema import QueryBundle
retriever = GalaxiaRetriever(
api_url="beta.api.smabbler.com",
api_key="<key>",
knowledge_base_id="<knowledge_base_id>",
)
result = retriever._retrieve(QueryBundle(
"<test question>"
))
print(result)
源代码位于 llama-index-integrations/retrievers/llama-index-retrievers-galaxia/llama_index/retrievers/galaxia/base.py
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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|