From 231f422787d4c5ab0fdf61b2b631aa72a14792dc Mon Sep 17 00:00:00 2001 From: Jeason Date: Fri, 5 Jul 2024 22:43:36 +0800 Subject: [PATCH] docs: add embedding model docs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 39fc1a2..860dd0c 100644 --- a/README.md +++ b/README.md @@ -81,14 +81,14 @@ You can use the following optional settings to customize: - **temperature** `number` (default: `0.8`) - **topK** `number` (default: `3`) -## Embedding models +## ⭐️ Embedding models ```ts import { chromeai } from 'chrome-ai'; import { embedMany, cosineSimilarity } from 'ai'; const { embeddings } = await embedMany({ - model: chromeai.embedding(), + model: chromeai('embedding'), values: ['sunny day at the beach', 'rainy afternoon in the city'], }); // [[1.9545, 0.0318...], [1.8015, 0.1504...]]