mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
style(tokenizer.js): comment out console.log statement
fix(Settings.jsx): handle null or empty context in useEffect to avoid errors
This commit is contained in:
parent
1a196580b2
commit
6e233accf5
2 changed files with 3 additions and 5 deletions
|
|
@ -7,7 +7,7 @@ const models = require('@dqbd/tiktoken/model_to_encoding.json');
|
|||
|
||||
router.post('/', async (req, res) => {
|
||||
const { arg } = req.body;
|
||||
console.log(typeof req.body === 'object' ? { ...req.body, ...req.query } : req.query);
|
||||
// console.log(typeof req.body === 'object' ? { ...req.body, ...req.query } : req.query);
|
||||
const model = await load(registry[models['gpt-3.5-turbo']]);
|
||||
const encoder = new Tiktoken(model.bpe_ranks, model.special_tokens, model.pat_str);
|
||||
const tokens = encoder.encode(arg.text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue