Rodrigo-R
CCConvex Community
•Created by Rodrigo-R on 7/30/2024 in #support-community
Error on deploy: Cannot read properties of undefined (reading 'addHttpRoutes')
Hi,
for a couple of hours (?) i'm unable to deploy due to this error:
Could it be something on Convex side?
5 replies
CCConvex Community
•Created by Rodrigo-R on 7/23/2024 in #support-community
Convex Auth... Authenticated works but auth.getUserId(ctx) returns null
Hi!
Quick question (hopefully) my auth cycle is working, i can use
And it's working as expected, but on the convex side i get null when i ask to the auth user.
any tips on where to start looking?
Thank you for your help!
11 replies
CCConvex Community
•Created by Rodrigo-R on 7/11/2024 in #support-community
convexAuth id of the current user on the client?
Hi, i know how to do it on the backend functions (const userId = await auth.getUserId(ctx); )
But how to get currently loged user in the client side?
I want to display email an image in the avatar..
Regards (sorry if it too obvious, but i jhave read the docs several times and i didn't found it)
10 replies
CCConvex Community
•Created by Rodrigo-R on 7/2/2024 in #support-community
subscribe to query changes on the client
hi!
I need to watch for changes on a query on the front. The code for the watcher is also on the front.
I'm using this code on the watcher:
const client = new ConvexReactClient('my instanmce url on convex', {}); const watch = client.watchQuery(api.myquery, {id: my id string as id<"mytable">}); watch.onUpdate(() => { setOptimistic([]) });I need to watch the query because i need to simulate optimistic mutations ( i can't use optimistic updates directly because those updates are made by scheduled mutations), so i add those updates in an array and render them, i empty the array once i know the changes are performed (hence the query being watched). Anyways... the code is working, a bit ugly, but working, but it also triggers infinite errors in the console:
Attempting reconnect in 17192.633050199267ms web_socket_manager.js:64 WebSocket error: undefined web_socket_manager.js:86 WebSocket closed with code 1006 web_socket_manager.js:134 Attempting reconnect in 9087.685573583634msand it degrades the performance and makes me nervous... Any tip/recommendation? (best way to simulate optimistic updates, or get the ugly errors go away?) Much appreciated!
3 replies
CCConvex Community
•Created by Rodrigo-R on 6/24/2024 in #support-community
Custom domains for file serving?
Hi!
I would like to give my users with a custom domain url instead of a random convex one.
Is it possible?
Cheers!
4 replies
CCConvex Community
•Created by Rodrigo-R on 6/17/2024 in #support-community
Embeddings text-embedding-3-small vs text-embedding-ada-002
Hi, i just deleted all my embeddings and re parse everything using the cheaper text-embedding-3-small, but after the change my match rate went from 0.7 - 0.8 to 0.2 using vectorSearch with the same docuyments and same queries. The only thing i changed was the model.
I'm using the same model to get embeddings for the documents and the query!
What am i missing ? 🙂
Regards!
5 replies
CCConvex Community
•Created by Rodrigo-R on 6/17/2024 in #support-community
PDF Parsing - actions and mutations
Hi!
I have this dilemma:
I need to parse a PDF using pdf2json (or any other library) to store its contents ,and the only way i got it semi working is using an action marked with "use node".
But when using this configuration i can't call mutations, since the compiler refuses to accept it.
This effectively defeats the purpose of parsing a pdf in an action in the first place, forcing me to upload the file to store it, download it to parse it and re upload the contents again, very inefficiently.
Is there a better way?
11 replies
CCConvex Community
•Created by Rodrigo-R on 6/13/2024 in #support-community
vectorSearch, filtering 2 fields using and
Hi!
In my schema i have a table with content, embedings, spaceId and partnerId, i want to search records only belonging to a spaceId AND partnerId, but the filter for vectorSearch only acceprs eq.or, i can't do an AND.
My vectorIndex is this:
.vectorIndex("by_embedding",{
vectorField: "embedding",
dimensions:1536,
filterFields:['spaceId', 'partnerId']
})
and in my action i want to filter out non related records like this:
const results = await ctx.vectorSearch("documents", "by_embedding", {
vector: embedding,
limit: 16,
filter: q => q.eq("spaceId", args.spaceId)
})
i want something like
q => q.and( q.eq("spaceId", 1), ( q.eq("partnerId", 1))
Is this possible?
4 replies
CCConvex Community
•Created by Rodrigo-R on 5/28/2024 in #support-community
User independent environments
Currently our the environments are tied to users, even our production.
This is not good for a company, thinking that people come and go, and you cannot rely on their accounts stuck forever.
Furthermore, (apparently) there is no way to transfer account ownership, making the issue more serious.
3 replies
CCConvex Community
•Created by Rodrigo-R on 5/28/2024 in #support-community
Entering coupon codes after enrolling in pro plan
Hi!
Is there any guide on how to do this?
In the billing sections there is no way to enter it.
Thanks!
3 replies