Skip to content

Commit

Permalink
fix vector store name
Browse files Browse the repository at this point in the history
  • Loading branch information
lassejaco committed Jan 15, 2025
1 parent 95d091f commit 5a0c40e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions devcon-api/src/services/ai/open-ai/open-ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,21 +509,21 @@ export const api = (() => {
syncScheduleContent: async () => {
console.log('syncing schedule assistant')

// const vectorStore = await openai.beta.vectorStores.create({
// name: `pretalx_schedule_${scheduleVersion}`,
// })
const vectorStore = await openai.beta.vectorStores.create({
name: `devcon_sea_${process.env.GITHUB_SHA}`,
})

const vectorStoreName = `devcon_sea_${process.env.GITHUB_SHA}`
// const vectorStoreName = `devcon_sea_${process.env.GITHUB_SHA}`

const vectorStores = await openai.beta.vectorStores.list()
// const vectorStores = await openai.beta.vectorStores.list()

const vectorStore = vectorStores.data.find((store: any) => store.name === vectorStoreName)
// const vectorStore = vectorStores.data.find((store: any) => store.name === vectorStoreName)

if (!vectorStore) {
console.error(`Vector store not found ${vectorStoreName}`)
// if (!vectorStore) {
// console.error(`Vector store not found ${vectorStoreName}`)

return
}
// return
// }

const knowledgeBaseDirectory = path.resolve(__dirname, '..', 'knowledge-base')
const knowledgeBaseFiles = fs.readdirSync(knowledgeBaseDirectory)
Expand Down

0 comments on commit 5a0c40e

Please sign in to comment.