feat(search): update types
This commit is contained in:
parent
c52d6ac290
commit
ead2d98a9f
|
@ -24,7 +24,7 @@ interface embeddingModel {
|
||||||
model: string;
|
model: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface RequestBody {
|
interface ChatRequestBody {
|
||||||
focusMode: string;
|
focusMode: string;
|
||||||
chatModel?: chatModel;
|
chatModel?: chatModel;
|
||||||
embeddingModel?: embeddingModel;
|
embeddingModel?: embeddingModel;
|
||||||
|
@ -34,7 +34,7 @@ interface RequestBody {
|
||||||
|
|
||||||
router.post('/', async (req, res) => {
|
router.post('/', async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const body: RequestBody = req.body;
|
const body: ChatRequestBody = req.body;
|
||||||
|
|
||||||
if (!body.focusMode || !body.query) {
|
if (!body.focusMode || !body.query) {
|
||||||
return res.status(400).json({ message: 'Missing focus mode or query' });
|
return res.status(400).json({ message: 'Missing focus mode or query' });
|
||||||
|
|
Loading…
Reference in New Issue