An integration package connecting Oracle Cloud Infrastructure (OCI) services with LangChain. It provides access to OCI's Generative AI models, OCI Doc AI for document understanding, and OCI OpenSearch as a vector store. Current version 0.2.7, updated regularly with OCI changes.
pip install langchain-ociNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize and use an OCI chat model. Requires OCI credentials configured via environment variables or OCI config file.
Change imports to `from langchain_oci.chat_models import ChatOCIModel`.
Use auth_type='RESOURCE_PRINCIPAL' and set OCI_RESOURCE_PRINCIPAL_VERSION env var.
Install the optional dependencies: `pip install langchain-oci[opensearch]`.
Ensure compartment_id is set correctly and that the OCI region matches the endpoint region.