Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversAmazon KendraArcee RetrieverArxivAzure Cognitive SearchBM25ChaindeskChatGPT PluginCohere RerankerDocArrayElasticSearch BM25Google Cloud Enterprise SearchGoogle DriveGoogle Vertex AI SearchKay.aikNNLOTR (Merger Retriever)MetalPinecone Hybrid SearchPubMedRePhraseQuerySEC filingSelf-querying retrieverSVMTavily Search APITF-IDFVespaWeaviate Hybrid SearchWikipediayou-retrieverZepToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsRetrieversMetalOn this pageMetalMetal is a managed service for ML Embeddings.This notebook shows how to use Metal's retriever.First, you will need to sign up for Metal and get an API key. You can do so here# !pip install metal_sdkfrom metal_sdk.metal import MetalAPI_KEY = ""CLIENT_ID = ""INDEX_ID = ""metal = Metal(API_KEY, CLIENT_ID, INDEX_ID);Ingest Documents‚ÄãYou only need to do this if you haven't already set up an indexmetal.index({"text": "foo1"})metal.index({"text": "foo"})    {'data': {'id': '642739aa7559b026b4430e42',      'text': 'foo',      'createdAt': '2023-03-31T19:51:06.748Z'}}Query‚ÄãNow that our index is set up, we can set up a retriever and start querying it.from langchain.retrievers import MetalRetrieverretriever = MetalRetriever(metal, params={"limit": 2})retriever.get_relevant_documents("foo1")    [Document(page_content='foo1', metadata={'dist': '1.19209289551e-07', 'id': '642739a17559b026b4430e40', 'createdAt': '2023-03-31T19:50:57.853Z'}),     Document(page_content='foo1', metadata={'dist': '4.05311584473e-06', 'id': '642738f67559b026b4430e3c', 'createdAt': '2023-03-31T19:48:06.769Z'})]PreviousLOTR (Merger Retriever)NextPinecone Hybrid SearchIngest DocumentsQueryCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain,
Metal is a managed service for ML Embeddings.
Metal is a managed service for ML Embeddings. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversAmazon KendraArcee RetrieverArxivAzure Cognitive SearchBM25ChaindeskChatGPT PluginCohere RerankerDocArrayElasticSearch BM25Google Cloud Enterprise SearchGoogle DriveGoogle Vertex AI SearchKay.aikNNLOTR (Merger Retriever)MetalPinecone Hybrid SearchPubMedRePhraseQuerySEC filingSelf-querying retrieverSVMTavily Search APITF-IDFVespaWeaviate Hybrid SearchWikipediayou-retrieverZepToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsRetrieversMetalOn this pageMetalMetal is a managed service for ML Embeddings.This notebook shows how to use Metal's retriever.First, you will need to sign up for Metal and get an API key. You can do so here# !pip install metal_sdkfrom metal_sdk.metal import MetalAPI_KEY = ""CLIENT_ID = ""INDEX_ID = ""metal = Metal(API_KEY, CLIENT_ID, INDEX_ID);Ingest Documents‚ÄãYou only need to do this if you haven't already set up an indexmetal.index({"text": "foo1"})metal.index({"text": "foo"})    {'data': {'id': '642739aa7559b026b4430e42',      'text': 'foo',      'createdAt': '2023-03-31T19:51:06.748Z'}}Query‚ÄãNow that our index is set up, we can set up a retriever and start querying it.from langchain.retrievers import MetalRetrieverretriever = MetalRetriever(metal, params={"limit": 2})retriever.get_relevant_documents("foo1")    [Document(page_content='foo1', metadata={'dist': '1.19209289551e-07', 'id': '642739a17559b026b4430e40', 'createdAt': '2023-03-31T19:50:57.853Z'}),     Document(page_content='foo1', metadata={'dist': '4.05311584473e-06', 'id': '642738f67559b026b4430e3c', 'createdAt': '2023-03-31T19:48:06.769Z'})]PreviousLOTR (Merger Retriever)NextPinecone Hybrid SearchIngest DocumentsQueryCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain,