NEROX
WWasp
•Created by NEROX on 2/20/2025 in #🙋questions
Puppeteer Scrapping: [ Server ] CAPTCHA detected!
@kapa.ai Thanks but what's happening now with:
await prisma.$transaction(
response.organic_results.map((result: any) =>
prisma.serpResult.create({
data: {
title: String(result.title ''),
url: String(result.link ''),
snippet: String(result.snippet ''),
position: Number(result.position 0),
keywordId: keywordId
}
})
)
)
Line 3 error TS2339: Property 'create' does not exist on type 'SerpResultDelegate<DefaultArgs>'.
❌ --- [Error] Your wasp project failed to compile: -------------------------------
28 replies
WWasp
•Created by NEROX on 2/20/2025 in #🙋questions
Puppeteer Scrapping: [ Server ] CAPTCHA detected!
@kapa.ai How to create multiple schema registers at the same time? or with multiple operations? Give me example
my example doesn't work:
await prisma.serpResult.createMany({
data: response.organic_results.map((result: any) => ({
title: String(result.title ''),
url: String(result.link ''),
snippet: String(result.snippet ''),
position: Number(result.position 0),
keywordId: keywordId
}))
})
[ Wasp ] ext-src/article-generator/operations.ts(97,29): error TS2339: Property 'createMany' does not exist on type 'SerpResultDelegate<DefaultArgs>'.
28 replies
WWasp
•Created by NEROX on 2/20/2025 in #🙋questions
Puppeteer Scrapping: [ Server ] CAPTCHA detected!
@kapa.ai
[ Wasp ] ext-src/article-generator/operations.ts(99,31): error TS2339: Property 'upsert' does not exist on type 'SerpResultDelegate<DefaultArgs>'.
operations.ts
// Procesar cada resultado de manera individual
for (const result of response.organic_results) {
await prisma.serpResult.upsert({
where: {
id:
${keywordId}-${result.position}
// Crear un ID Ăşnico
},
update: {
title: String(result.title ''),
url: String(result.link ''),
snippet: String(result.snippet ''),
position: Number(result.position 0)
},
create: {
id: ${keywordId}-${result.position}
, // Mismo ID Ăşnico
title: String(result.title ''),
url: String(result.link ''),
snippet: String(result.snippet ''),
position: Number(result.position 0),
keywordId: keywordId
}
})
}28 replies
WWasp
•Created by NEROX on 2/20/2025 in #🙋questions
Puppeteer Scrapping: [ Server ] CAPTCHA detected!
âś… Moved to SerpAPI, Puppeteer with Proxies and Captcha solvers don't work
28 replies
WWasp
•Created by NEROX on 2/20/2025 in #🙋questions
Puppeteer Scrapping: [ Server ] CAPTCHA detected!
@kapa.ai
Explain how to implement captcha solving service just for localhost tests in my own computer
28 replies
WWasp
•Created by NEROX on 2/20/2025 in #🙋questions
Puppeteer Scrapping: [ Server ] CAPTCHA detected!
@kapa.ai
How to implement captcha solving service? I won't have any ethical or legal implications, don't worry.
28 replies
WWasp
•Created by Zuck on 5/14/2024 in #🙋questions
Anyone got RAG working with WASP?
I never thought I'd get to build something like this, thanks guys for so much valuable info
32 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
@kapa.ai
Type error:
Unexpected dictionary field 'middleware'
-> For dictionary field 'server'
97 |
98 | server: {
99 | middleware: import { initializeMiddleware } from "@src/server/middleware.js"
100 | },
101 | }
❌ --- [Error] Recompilation on file change failed.: ------------------------------
1 errors found
main.wasp:
server: {
middleware: import { initializeMiddleware } from "@src/server/middleware.js"
},
}
middleware.ts:
import { Application } from 'express';
export default function initializeMiddleware(app: Application) {
// Aumentar el lĂmite del payload a 50MB
app.use(express.json({ limit: '50mb' }));
app.use(express.urlencoded({ extended: true, limit: '50mb' }));
}
whats wrong?
36 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
But too many trial and error with Cursor, a lot of hours to add small features, IDK how to improve my development
36 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
Now I'm adding improvements
36 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
Yes
36 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
HAH, I did without pinecone:smugboi:
36 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
@kapa.ai
Is it possible in Wasp Apps:
- Implement Re-ranking using crossencoders after initial search
- Use Hybrid Search (combine semantic search with BM25)
- Implement MMR (Maximal Marginal Relevance) to diversify results
??
36 replies
WWasp
•Created by Zuck on 5/14/2024 in #🙋questions
Anyone got RAG working with WASP?
So, nobody has accomplished it with pure wasp and the PGVector extension?
32 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
I've made it work, thx Kapa
36 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
@kapa.ai
[ Server!] Unknown argument
embedding
. Available options are marked with ?.36 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
@kapa.ai
[ Wasp ] ext-src/server/documents/operations.ts(25,32): error TS2339: Property 'upsert' does not exist on type 'DocumentChunkDelegate<DefaultArgs>'.
[ Wasp ] ext-src/server/documents/operations.ts(27,19): error TS2339: Property 'id' does not exist on type '{ content: string; metadata: ChunkMetadata; }'.
import { Document } from 'wasp/entities'
import { createDocumentChunks, generateEmbedding } from '../utils/documentProcessing'
import type { ProcessDocument } from 'wasp/server/operations'
import { prisma } from 'wasp/server'
export const processDocument: ProcessDocument<{ documentId: number }, void> = async (args, context) => {
const { documentId } = args;
const document = await prisma.document.findUnique({ where: { id: documentId } }); if (!document !document.content) { throw new Error('Document not found or has no content'); } // Create chunks const chunks = createDocumentChunks(document.content); // Process each chunk for (const chunk of chunks) { const embedding = await generateEmbedding(chunk.content);
// Store chunk and embedding usando upsert await prisma.documentChunk.upsert({ where: { id: chunk.id 'temp-id', // necesitamos un id para upsert }, create: { content: chunk.content, embedding: embedding, metadata: chunk.metadata, documentId: document.id }, update: { content: chunk.content, embedding: embedding, metadata: chunk.metadata, } }); } // Update document status await prisma.document.update({ where: { id: document.id }, data: { status: 'completed' } }); }
const document = await prisma.document.findUnique({ where: { id: documentId } }); if (!document !document.content) { throw new Error('Document not found or has no content'); } // Create chunks const chunks = createDocumentChunks(document.content); // Process each chunk for (const chunk of chunks) { const embedding = await generateEmbedding(chunk.content);
// Store chunk and embedding usando upsert await prisma.documentChunk.upsert({ where: { id: chunk.id 'temp-id', // necesitamos un id para upsert }, create: { content: chunk.content, embedding: embedding, metadata: chunk.metadata, documentId: document.id }, update: { content: chunk.content, embedding: embedding, metadata: chunk.metadata, } }); } // Update document status await prisma.document.update({ where: { id: document.id }, data: { status: 'completed' } }); }
36 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
@kapa.ai
[ Wasp ] ext-src/server/documents/operations.ts(24,42): error TS2339: Property 'create' does not exist on type 'DocumentChunkDelegate<DefaultArgs>'.
operations.ts:
import { Document } from 'wasp/entities'
import { createDocumentChunks, generateEmbedding } from '../utils/documentProcessing'
import type { ProcessDocument } from 'wasp/server/operations'
export const processDocument: ProcessDocument<{ documentId: number }, void> = async (args, context) => {
const { documentId } = args;
const document = await context.entities.Document.findUnique({ where: { id: documentId } }); if (!document || !document.content) { throw new Error('Document not found or has no content'); } // Create chunks const chunks = createDocumentChunks(document.content); // Process each chunk for (const chunk of chunks) { const embedding = await generateEmbedding(chunk.content);
// Store chunk and embedding usando entities await context.entities.DocumentChunk.create({ data: { content: chunk.content, embedding: embedding, metadata: chunk.metadata, documentId: document.id } }); } // Update document status usando entities await context.entities.Document.update({ where: { id: document.id }, data: { status: 'completed' } }); }
const document = await context.entities.Document.findUnique({ where: { id: documentId } }); if (!document || !document.content) { throw new Error('Document not found or has no content'); } // Create chunks const chunks = createDocumentChunks(document.content); // Process each chunk for (const chunk of chunks) { const embedding = await generateEmbedding(chunk.content);
// Store chunk and embedding usando entities await context.entities.DocumentChunk.create({ data: { content: chunk.content, embedding: embedding, metadata: chunk.metadata, documentId: document.id } }); } // Update document status usando entities await context.entities.Document.update({ where: { id: document.id }, data: { status: 'completed' } }); }
36 replies
WWasp
•Created by NEROX on 2/17/2025 in #🙋questions
ERROR: extension "vector" is not available
you are on drugs Kapa
36 replies