Skip to content

Commit 35fabe9

Browse files
committed
remove code related to vector dimensions
1 parent 76b288f commit 35fabe9

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export const DEFAUL_CONTEXT_LIMIT = Number(process.env.DEFAUL_CONTEXT_LIMIT) ||
1919
export const DEFAULT_RESET_CRON = process.env.DEFAULT_RESET_CRON || '0 0 1 */3 *'
2020

2121
export const EMBED_MODEL = process.env.EMBED_MODEL ?? 'text-embedding-small'
22-
export const EMBED_DIM = process.env.EMBED_DIM ? Number(process.env.EMBED_DIM) : 1024
2322

2423
export const validModels = [
2524
{

src/server/routes/rag/rag.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Router } from 'express'
22
import z from 'zod/v4'
3-
import { EMBED_DIM } from '../../../config'
43
import { ChatInstance, ChatInstanceRagIndex, Enrolment, RagFile, RagIndex, Responsibility } from '../../db/models'
54
import type { RequestWithUser } from '../../types'
65
import { ApplicationError } from '../../util/ApplicationError'
@@ -14,12 +13,11 @@ const IndexCreationSchema = z.object({
1413
name: z.string().min(1).max(100),
1514
language: z.enum(['Finnish', 'English']).optional(),
1615
chatInstanceId: z.string().min(1).max(100),
17-
dim: z.number().min(EMBED_DIM).max(EMBED_DIM).default(EMBED_DIM),
1816
})
1917

2018
router.post('/indices', async (req, res) => {
2119
const { user } = req as RequestWithUser
22-
const { name, dim, chatInstanceId, language } = IndexCreationSchema.parse(req.body)
20+
const { name, chatInstanceId, language } = IndexCreationSchema.parse(req.body)
2321

2422
const chatInstance = await ChatInstance.findByPk(chatInstanceId, {
2523
include: [

0 commit comments

Comments
 (0)