mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-30 16:38:31 +02:00
chore: Added TS install commands
Signed-off-by: Anush008 <anushshetty90@gmail.com>
This commit is contained in:
@@ -16,7 +16,11 @@ LangGraph works seamlessly with all the components of LangChain. This means we c
|
|||||||
- Install the required dependencies
|
- Install the required dependencies
|
||||||
|
|
||||||
```python
|
```python
|
||||||
$ pip install langgraph langchain_community langchain_qdrant
|
$ pip install langgraph langchain_community langchain_qdrant fastembed
|
||||||
|
```
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
$ npm install @langchain/langgraph langchain @langchain/qdrant @langchain/openai
|
||||||
```
|
```
|
||||||
|
|
||||||
- Create a retriever tool to add to the LangGraph workflow.
|
- Create a retriever tool to add to the LangGraph workflow.
|
||||||
@@ -53,6 +57,7 @@ import { createRetrieverTool } from "langchain/tools/retriever";
|
|||||||
|
|
||||||
const vectorStore = await QdrantVectorStore.fromTexts(
|
const vectorStore = await QdrantVectorStore.fromTexts(
|
||||||
["<SOME_KNOWLEDGE_TEXT>", "<SOME_OTHER_TEXT>"],
|
["<SOME_KNOWLEDGE_TEXT>", "<SOME_OTHER_TEXT>"],
|
||||||
|
[{ id: 2 }, { id: 1 }],
|
||||||
new OpenAIEmbeddings(),
|
new OpenAIEmbeddings(),
|
||||||
{
|
{
|
||||||
url: "http://localhost:6333/",
|
url: "http://localhost:6333/",
|
||||||
@@ -91,7 +96,7 @@ import { StateGraph } from "@langchain/langgraph";
|
|||||||
import { ToolNode } from "@langchain/langgraph/prebuilt";
|
import { ToolNode } from "@langchain/langgraph/prebuilt";
|
||||||
|
|
||||||
// Define the graph
|
// Define the graph
|
||||||
const workflow = new StateGraph(GraphState)
|
const workflow = new StateGraph(SomeGraphState)
|
||||||
// Define the nodes which we'll cycle between.
|
// Define the nodes which we'll cycle between.
|
||||||
.addNode("retrieve", new ToolNode([tool]));
|
.addNode("retrieve", new ToolNode([tool]));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user