Search

136 results found for embeddings (1329ms)

Code
127

try {
// Get embedding
const embResponse = await fetch("https://api.openai.com/v1/embeddings", {
method: "POST",
headers: {
async getEmbedding(text: string, apiKey: string) {
const response = await fetch("https://api.openai.com/v1/embeddings", {
method: "POST",
headers: {
},
body: JSON.stringify({
model: "text-embedding-3-small", // IMPORTANT: Match your Pinecone embeddings
input: text,
}),
try {
// Get embedding
const embResponse = await fetch("https://api.openai.com/v1/embeddings", {
method: "POST",
headers: {
import { Pinecone } from "https://esm.sh/@pinecone-database/pinecone@2.0.0";
// Use OpenAI client only for embeddings
const openai = new OpenAI({
apiKey: Deno.env.get("OPENAI_API_KEY"),
// Get embedding for query
const embeddingResponse = await openai.embeddings.create({
model: "text-embedding-3-small",
input: query,
"slug": "val-vibes",
"link": "/blog/val-vibes",
"description": "How to build semantic search with embeddings for Val Town within Val Town it
"pubDate": "Tue, 18 Jun 2024 00:00:00 GMT",
"author": "JP Posma",
"slug": "val-vibes",
"link": "/blog/val-vibes",
"description": "How to build semantic search with embeddings for Val Town within Val Town it
"pubDate": "Tue, 18 Jun 2024 00:00:00 GMT",
"author": "JP Posma",
// Get embedding for query
const embeddingResponse = await openai.embeddings.create({
model: "text-embedding-3-small",
input: query,
"slug": "val-vibes",
"link": "/blog/val-vibes",
"description": "How to build semantic search with embeddings for Val Town within Val Town it
"pubDate": "Tue, 18 Jun 2024 00:00:00 GMT",
"author": "JP Posma",
"slug": "val-vibes",
"link": "/blog/val-vibes",
"description": "How to build semantic search with embeddings for Val Town within Val Town it
"pubDate": "Tue, 18 Jun 2024 00:00:00 GMT",
"author": "JP Posma",
contents: [query],
});
const values = result.embeddings[0].values;
const queryResult = (await qdrant.search("lyrics", {
vector: values,
tmcw
surprisingEmbeddings
Visualizing embedding distances
maxm
emojiVectorEmbeddings
 
janpaul123
blogPostEmbeddingsDimensionalityReduction
 
janpaul123
compareEmbeddings
 
yawnxyz
embeddingsSearchExample
 

Users

No users found
No docs found