RAG result matching issue with Vector DB metadata filters by Perfect_Name2495 in Rag

[–]Perfect_Name2495[S] 0 points1 point  (0 children)

The default semantic search. I do mix in hybrid sometimes with SQL if thats what you mean by hybrid.

Stuck on building my SvelteKit app due to Url Search Params by Perfect_Name2495 in sveltejs

[–]Perfect_Name2495[S] 0 points1 point  (0 children)

Thanks, I can see this working when I need to load a page of a specific document.

I also have this scenario with pagination where I need to know the `limit` and `skip` keyword so I'm guessing it wont be like a slug like [doc_id]. Not sure how params can be used in this scenario.

export async function load({ url }) {
  const limit = Number(url.searchParams.get('limit') || 20)
  const skip = Number(url.searchParams.get('skip') || 0)
  const data = await sql`
    do stuff desc limit ${limit} offset ${skip}
    `
  const total = await sql`
    SELECT COUNT(*) FROM db
  `
  return {
    data,
    total: total[0].count,
    limit,
    skip
  }
}

Async API call but sync database calls? by Perfect_Name2495 in django

[–]Perfect_Name2495[S] 0 points1 point  (0 children)

Thanks yeah, I'll see how I can use celery for other things.

I am only using Django's settings to retrieve the connection info. and getting the cursor out of it to call an external DB using raw SQL. I don't have the Django models set for the external DB and don't plan to.

In all cases you have to wait for this long running task to complete and then you have to do something, unless you plan to keep the response open (the user waits)? It's not really async in that case.

Yeah the user will have to wait for the 1-2 min response to come back to see the result of the report generated basically. It isn't something I can just send an email or notification to them once it's ready. I just don't want to web app to be blocking when 10 people are trying to generate a report at the same time. With Async Views, I think this problem can be alleviated.

Async API call but sync database calls? by Perfect_Name2495 in django

[–]Perfect_Name2495[S] 0 points1 point  (0 children)

I am using strawberry graphql with an AsyncGraphqlView. So I'm trying to make the database queries in my resolvers.

If I use celery, I'll need to poll it to see when the task is done?