Repository navigation
Commit 8f08fd6
committed
docs(inference): fix unstable internal import in reranking how-to
## Purpose
The "Using the RerankModel enum" code snippet imported `Inference` from
`pinecone.client.inference`, an internal module path not in the public
API. Teaching users to import from internal paths violates the
api-stability contract and will break if the module is reorganized.
## Solution
Replaced `from pinecone.client.inference import Inference` +
`Inference.RerankModel.Bge_Reranker_V2_M3` with the stable top-level
import `from pinecone import Pinecone, RerankModel` and the direct
`RerankModel.Bge_Reranker_V2_M3` reference. `RerankModel` is exported
from `pinecone.__all__` and `_LAZY_IMPORTS`, making it part of the
stable public API.1 parent 4ccead0 commit 8f08fd6
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
97 | | - | |
| 96 | + | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
0 commit comments