whoami
whoami
CCConvex Community
Created by whoami on 6/12/2023 in #support-community
Can I do langchain streaming in convex?
ok thanks that makes sense
3 replies
CCConvex Community
Created by khromov on 5/26/2023 in #support-community
GDPR compliance?
When will SOC2 be completed?
17 replies
CCConvex Community
Created by Francismiko on 5/23/2023 in #support-community
Better implementation of automated optimistic updates
I understand your concern now, maybe we can figure out a way to get away from these corner cases? Or maybe in the parameters of withOptimisticUpdates , we can select which queries can be synced in a local first manner automatically and warn users what might be the consequences of it (if I used a secret in an query most likely that involves some external fetch which makes it impossible to mock in the frontend anyways)
11 replies
CCConvex Community
Created by whoami on 5/17/2023 in #support-community
Convex Compatibility Issue with Certain Browser Plugins
wow an acient issue got discovered
10 replies
CCConvex Community
Created by Francismiko on 5/23/2023 in #support-community
Better implementation of automated optimistic updates
I am not sure, I imagine the atomic mutation can be propagated to whatever queries that was using them (just like how the reactivity is implemented in convex, but in a local copy of it), if you have all the mutation, queries and db connected as a graph the propagation logic will be clearer (mutation -> db -> query), and such helper function can be built in compile time, and it will be used when I call useMutation('...').withOptimisticUpdate(), this would cover most optimistic update cases unless it requires CRDT like conflict resolution
11 replies
CCConvex Community
Created by Francismiko on 5/23/2023 in #support-community
Better implementation of automated optimistic updates
is this something that is possible to be implemented?
11 replies
CCConvex Community
Created by Francismiko on 5/23/2023 in #support-community
Better implementation of automated optimistic updates
I was thinking if we can design the optimistic update such that we can just enable / disable it with a boolean variable as most of the time there is no conflict resolution, for example we can just automatically find all the queries that may be impacted by the mutation and inject the local storage piece of the code for it?
11 replies
CCConvex Community
Created by whoami on 5/17/2023 in #support-community
Convex Compatibility Issue with Certain Browser Plugins
Let me ask my colleague!
10 replies
CCConvex Community
Created by whoami on 5/20/2023 in #support-community
Does convex work with collaborative editing?
this is awesome! thanks for sharing it!
14 replies
CCConvex Community
Created by whoami on 5/20/2023 in #support-community
Does convex work with collaborative editing?
Hey RJ, yea I am working with tiptap, I am reading your code https://github.com/rjdellecese/prosemirror-collab-convex to get some inspirations, do you get it working eventually as expected?
14 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
thanks!
34 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
While it works for pdf-loader with use node, the following code doesn't work in both js and node env
import { v } from "convex/values"
import { ChatOpenAI } from "langchain/chat_models/openai"
import { HumanChatMessage } from "langchain/dist/schema"

import { action } from "./_generated/server"

export const extract = action({
args: {
report: v.id("reports"),
},
handler: async ({ runMutation, runQuery }, { report }) => {
const docs = "..."
const chat = new ChatOpenAI({ temperature: 0 })

const response = await chat.call([
new HumanChatMessage(`Translate the doc: ${docs}`),
])

runMutation("reports:patch", { id: report, insights: [response.text] })
},
})
import { v } from "convex/values"
import { ChatOpenAI } from "langchain/chat_models/openai"
import { HumanChatMessage } from "langchain/dist/schema"

import { action } from "./_generated/server"

export const extract = action({
args: {
report: v.id("reports"),
},
handler: async ({ runMutation, runQuery }, { report }) => {
const docs = "..."
const chat = new ChatOpenAI({ temperature: 0 })

const response = await chat.call([
new HumanChatMessage(`Translate the doc: ${docs}`),
])

runMutation("reports:patch", { id: report, insights: [response.text] })
},
})
and the error is
✖ Error: Unable to bundle Convex modules
esbuild failed: Error: Build failed with 1 error:
convex/insights.ts:3:33: ERROR: Could not resolve "langchain/dist/schema"
✘ [ERROR] Could not resolve "langchain/dist/schema"

convex/insights.ts:3:33:
3 │ ... from "langchain/dist/schema"
╵ ~~~~~~~~~~~~~~~~~~~~~~~

The path "./dist/schema" is not exported
by package "langchain":

node_modules/langchain/package.json:598:13:
598 │ "exports": {
╵ ^

You can mark the path
"langchain/dist/schema" as external to
exclude it from the bundle, which will
remove this error.

✖ Error: Unable to bundle Convex modules
esbuild failed: Error: Build failed with 1 error:
convex/insights.ts:3:33: ERROR: Could not resolve "langchain/dist/schema"
✖ Error: Unable to bundle Convex modules
esbuild failed: Error: Build failed with 1 error:
convex/insights.ts:3:33: ERROR: Could not resolve "langchain/dist/schema"
✘ [ERROR] Could not resolve "langchain/dist/schema"

convex/insights.ts:3:33:
3 │ ... from "langchain/dist/schema"
╵ ~~~~~~~~~~~~~~~~~~~~~~~

The path "./dist/schema" is not exported
by package "langchain":

node_modules/langchain/package.json:598:13:
598 │ "exports": {
╵ ^

You can mark the path
"langchain/dist/schema" as external to
exclude it from the bundle, which will
remove this error.

✖ Error: Unable to bundle Convex modules
esbuild failed: Error: Build failed with 1 error:
convex/insights.ts:3:33: ERROR: Could not resolve "langchain/dist/schema"
any insights?
34 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
yea it works with node env!
34 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
✘ [ERROR] Could not resolve "langchain/document_loaders"

convex/action.ts:2:26:
2 │ ...Loader } from "langchain/document_loaders"
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The path "./document_loaders" is not currently
exported by package "langchain":

node_modules/langchain/package.json:598:13:
598 │ "exports": {
╵ ^

None of the conditions provided ("node") match any of
the currently active conditions ("browser",
"default", "import"):

node_modules/langchain/package.json:845:26:
845 │ "./document_loaders": {
╵ ^

Consider enabling the "node" condition if this
package expects it to be enabled. You can use
"conditions: ['node']" to do that:

node_modules/langchain/package.json:846:6:
846 │ "node": {
╵ ~~~~~~

You can mark the path "langchain/document_loaders" as
external to exclude it from the bundle, which will
remove this error.
✘ [ERROR] Could not resolve "langchain/document_loaders"

convex/action.ts:2:26:
2 │ ...Loader } from "langchain/document_loaders"
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The path "./document_loaders" is not currently
exported by package "langchain":

node_modules/langchain/package.json:598:13:
598 │ "exports": {
╵ ^

None of the conditions provided ("node") match any of
the currently active conditions ("browser",
"default", "import"):

node_modules/langchain/package.json:845:26:
845 │ "./document_loaders": {
╵ ^

Consider enabling the "node" condition if this
package expects it to be enabled. You can use
"conditions: ['node']" to do that:

node_modules/langchain/package.json:846:6:
846 │ "node": {
╵ ~~~~~~

You can mark the path "langchain/document_loaders" as
external to exclude it from the bundle, which will
remove this error.
This is the error I got when using pdf-loader from langchain, seems like it is not supported by js runtime yet
34 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
ok I figured the storageId part
34 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
after switching to node runtime, got a even weirder error associated with storage, const blob = await storage.get(storageId) is this supported by node runtime now?
34 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
hmmm I got the error message suggesting me to try node runtime
34 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
Is pdf-parse supported in the js runtime? I know langchain has a pdf loader but it also has pdf-parse as an additional dep
34 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
What are the differences between js runtime and node runtime from a tech perspective? Just curious
34 replies
CCConvex Community
Created by Chad Maycumber on 4/21/2023 in #support-community
Trying to run Langchain inside convex action
Thanks this makes sense, very good to know this feature and super excited to try out!
34 replies