Create a NeuralDBRetriever from scratch.
To use, set the THIRDAI_KEY environment variable with your ThirdAI
API key, or pass thirdai_key as a named parameter.
from_scratch(
cls,
thirdai_key: Optional[str] = None,
**model_kwargs: dict = {}
) -> NeuralDBRetrieverExample:
.. code-block:: python
from langchain_community.retrievers import NeuralDBRetriever
retriever = NeuralDBRetriever.from_scratch( thirdai_key="your-thirdai-key", )
retriever.insert([ "/path/to/doc.pdf", "/path/to/doc.docx", "/path/to/doc.csv", ])
documents = retriever.invoke("AI-driven music therapy")