Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 463 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 463 Bytes

langchain-localai

This package contains the LangChain integration with LocalAI

Installation

pip install -U langchain-localai

Embeddings

LocalAIEmbeddings class exposes embeddings from LocalAI.

from libs.localai.langchain_localai import LocalAIEmbeddings

embeddings = LocalAIEmbeddings(
    openai_api_base="http://localhost:8080",
    model="embedding-model-name")
embeddings.embed_query("What is the meaning of life?")