initial commit: slides + practica_resueltos + README

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 11:50:55 +02:00
commit 0aff31e2d3
203 changed files with 23207 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
---
layout: default
---
# Long-term Memory con Semantic Search
<v-clicks>
### InMemoryStore con embeddings
```typescript
import { InMemoryStore } from "@langchain/langgraph";
import { OpenAIEmbeddings } from "@langchain/openai";
const embeddings = new OpenAIEmbeddings({ model: "text-embedding-3-small" });
const store = new InMemoryStore({
index: { embeddings, dims: 1536 }
});
// Guardar memorias
await store.put(["user_123", "memories"], "1", { text: "I love pizza" });
// Buscar por similitud semántica
const items = await store.search(
["user_123", "memories"],
{ query: "I'm hungry", limit: 2 }
);
```
</v-clicks>