GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing docs.langchain.com — DatabricksEmbeddings integration - Docs by LangChain Databricks Lakehouse Platform unifies data, analytics, and AI on one platform.This guide provides a quick overview for getting started with DatabricksEmbeddings embedding models. For detailed documentation of all DatabricksEmbeddings features and configurations head to the API reference.
OverviewIntegration details
Supported methodsDatabricksEmbeddings supports all methods of Embeddings class including async APIs.
Endpoint requirementThe serving endpointDatabricksEmbeddings wraps must have OpenAI-compatible embedding input/output format (reference). As long as the input format is compatible, DatabricksEmbeddings can be used for any endpoint type hosted on Databricks Model Serving:
SetupTo access Databricks models you’ll need to create a Databricks account, set up credentials (only if you are outside Databricks workspace), and install required packages.Credentials (only if you are outside databricks)If you are running LangChain app inside Databricks, you can skip this step. Otherwise, you need manually set the Databricks workspace hostname and personal access token toDATABRICKS_HOST and DATABRICKS_TOKEN environment variables, respectively. See Authentication Documentation for how to get an access token.
InstallationThe LangChain Databricks integration lives in thedatabricks-langchain package:
InstantiationIndexing and retrievalEmbedding models are often used in retrieval-augmented generation (RAG) flows, both as part of indexing data as well as later retrieving it. For more detailed instructions, please see our RAG tutorials. Below, see how to index and retrieve data using theembeddings object we initialized above. In this example, we will index and retrieve a sample document in the InMemoryVectorStore.
Direct usageUnder the hood, the vectorstore and retriever implementations are callingembeddings.embed_documents(...) and embeddings.embed_query(...) to create embeddings for the text(s) used in from_texts and retrieval invoke operations, respectively.
You can directly call these methods to get embeddings for your own use cases.
Embed single textsYou can embed single texts or documents withembed_query:
Embed multiple textsYou can embed multiple texts withembed_documents:
Async usageYou can also useaembed_query and aembed_documents for producing embeddings asynchronously:
API referenceFor detailed documentation onDatabricksEmbeddings features and configuration options, please refer to the API reference.
Connect these docs to your agent of choice via MCP for real-time answers. Was this page helpful? | ||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |