Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 699 Bytes

File metadata and controls

25 lines (16 loc) · 699 Bytes

@fluidframework/tree-agent-langchain

Utilities for connecting LangChain chat models to the Fluid Framework @fluidframework/tree-agent package.

Installation

npm install @fluidframework/tree-agent-langchain

Usage

import { createLangchainChatModel } from "@fluidframework/tree-agent-langchain";
import { ChatOpenAI } from "@langchain/openai";

const chatModel = new ChatOpenAI({ model: "gpt-4.1" });
const sharedTreeChatModel = createLangchainChatModel(chatModel);

The returned SharedTreeChatModel can be provided to SharedTreeSemanticAgent from @fluidframework/tree-agent.

Licensing

This project is licensed under the MIT License.