-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathrouter.ts
More file actions
27 lines (22 loc) · 871 Bytes
/
router.ts
File metadata and controls
27 lines (22 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Router } from 'express';
import { inboundHandler } from './handlers/inbound';
import { outboundHandler } from './handlers/outbound';
import { webhookHandler } from './handlers/webhook';
import { customLLMHandler } from './handlers/custom-llm';
import { functionsCallHandler } from './handlers/functions';
const router = Router();
router.post('/inbound', inboundHandler);
router.post('/outbound', outboundHandler);
router.post('/webhook', webhookHandler);
router.post('/custom-llm/basic/chat/completions', customLLMHandler.basic);
router.post(
'/custom-llm/openai-sse/chat/completions',
customLLMHandler.openaiSSE
);
router.post(
'/custom-llm/openai-advanced/chat/completions',
customLLMHandler.openaiAdvanced
);
router.post('/functions/basic', functionsCallHandler.basic);
router.post('/functions/rag', functionsCallHandler.rag);
export { router };