initial commit: slides + practica_resueltos + README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
# Checkpointer: PostgresSaver
|
||||
|
||||
<div class="mt-4 text-xs">
|
||||
|
||||
<v-click>
|
||||
|
||||
**PostgresSaver**: Persistencia en PostgreSQL (producción)
|
||||
|
||||
```bash
|
||||
npm install @langchain/langgraph-checkpoint-postgres
|
||||
```
|
||||
|
||||
</v-click>
|
||||
|
||||
<v-click>
|
||||
|
||||
```typescript
|
||||
import { createAgent } from "langchain";
|
||||
import { PostgresSaver } from "@langchain/langgraph-checkpoint-postgres";
|
||||
|
||||
const DB_URI = "postgresql://user:pass@localhost:5432/mydb";
|
||||
const checkpointer = PostgresSaver.fromConnString(DB_URI);
|
||||
await checkpointer.setup();
|
||||
|
||||
const agent = createAgent({
|
||||
model: "mistral:mistral-large-latest",
|
||||
tools: [weatherTool],
|
||||
checkpointer,
|
||||
});
|
||||
```
|
||||
|
||||
</v-click>
|
||||
|
||||
<v-click>
|
||||
|
||||
<div class="mt-4 text-xs opacity-80">
|
||||
También disponibles: **MongoDB** (`@langchain/langgraph-checkpoint-mongodb`),
|
||||
**Redis** (`@langchain/langgraph-checkpoint-redis`), y **Custom** (implementar `BaseCheckpointSaver`)
|
||||
</div>
|
||||
|
||||
</v-click>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user