chore: Update eslint and prettier configurations
This commit is contained in:
parent
c63c9b5c8a
commit
5b1aaee605
24 changed files with 826 additions and 38 deletions
|
|
@ -9,9 +9,10 @@ const router = express.Router();
|
|||
|
||||
router.post('/', async (req, res) => {
|
||||
try {
|
||||
let { chat_history, chat_model, chat_model_provider } = req.body;
|
||||
const { chat_history: raw_chat_history, chat_model, chat_model_provider } = req.body;
|
||||
|
||||
chat_history = chat_history.map((msg: any) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const chat_history = raw_chat_history.map((msg: any) => {
|
||||
if (msg.role === 'user') {
|
||||
return new HumanMessage(msg.content);
|
||||
} else if (msg.role === 'assistant') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue