Skip to content

Commit

Permalink
fix(api/models): remove useless groq call (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
ungarscool1 authored Aug 3, 2024
1 parent 2cb2c1d commit a01a9f6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions api/src/routes/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import mongoose from 'mongoose';
import * as yup from 'yup';
import file from '../../utils/file';
import compileTemplate from '../../utils/compileTemplate';
import { getGroqModel } from '../../utils/providers/groq';
import { Providers } from '../../types/Generation';

var router = Router();
Expand Down Expand Up @@ -48,7 +47,6 @@ router.get('/:id', async (req, res) => {

router.delete('/:id', async (req, res) => {
if (Object.values(Providers).includes(req.params.id.split('-')[0] as Providers)) {
const model = await getGroqModel(req.params.id.slice(5));
return res.json({ message: `Cannot delete this model.` }).status(400);
}
const model = await mongoose.model('Models').findById(req.params.id);
Expand Down

0 comments on commit a01a9f6

Please sign in to comment.