deen
deen
CCConvex Community
Created by ibrahimyaacob on 2/10/2025 in #support-community
best way to build ai chat with infinite memory with vector search ?
https://docs.convex.dev/search/vector-search#defining-vector-indexes Define filter fields with the index, eg. chatId, sessionId, userId etc, depending on how you organise your data. Then you can restrict the data returned based on whatever grouping your want to search for.
3 replies
CCConvex Community
Created by Rishav on 2/9/2025 in #support-community
Hey Convex team,
You've accidentally used both an index with a filter function for the indexed fields - the query builder should go inside the .withIndex call. It's an easy mistake to make, take a look at this section of the docs which explains the differences. https://docs.convex.dev/understanding/best-practices#avoid-filter-on-database-queries
3 replies
CCConvex Community
Created by deen on 1/26/2025 in #support-community
structuredClone ✨
I'm pretty sure a simple generateText call with messages was triggering the issue:
import { openai } from '@ai-sdk/openai'
import { generateText } from 'ai'

async function run() {
const { text } = await generateText({
model: openai('gpt-4o-mini'),
messages: [{ role: 'user', content: 'Beep, beep, who got the keys to the Jeep? Vroom' }],
})
console.log(text)
}
import { openai } from '@ai-sdk/openai'
import { generateText } from 'ai'

async function run() {
const { text } = await generateText({
model: openai('gpt-4o-mini'),
messages: [{ role: 'user', content: 'Beep, beep, who got the keys to the Jeep? Vroom' }],
})
console.log(text)
}
However I can't test it now because it appears to be fixed. Thanks!
6 replies