langchain-llamastack

This package contains the LangChain integration with Llama Stack.

Installation

pip install -U langchain-llamastack

If your Llama Stack distribution requires credentials, use the LLAMA_STACK_API_KEY environment variable.

If your Llama Stack distribution server is not running on http://localhost:8321, use the LLAMA_STACK_BASE_URL environment variable or base_url param.

Chat Models

ChatLlamaStack class exposes chat models hosted on your Llama Stack distribution server.

from langchain_llamastack import ChatLlamaStack

llm = ChatLlamaStack(model="meta/llama-3.1-8b-instruct")
llm.invoke("Sing a ballad of LangChain.")
S
Description
LangChain x Llama Stack
Readme MIT 1.7 MiB
Latest
2025-08-25 17:49:31 -04:00
Languages
Python 95.7%
Makefile 3.6%
Shell 0.7%