Enhance terminal functionality in InkApp by implementing a new input handling system. Introduce a command history feature for improved user navigation and streamline the process for submitting commands. Update state management to ensure accurate tracking of user inputs and command history.
This commit is contained in:
21
cli2.js
Normal file
21
cli2.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import ModelDialog from './modelDialog.js';
|
||||
|
||||
const modelDialog = new ModelDialog();
|
||||
|
||||
modelDialog.on('outputUpdate', (output) => {
|
||||
console.log('output',output);
|
||||
});
|
||||
modelDialog.on('reasoningUpdate', (output) => {
|
||||
console.log('reasoning',output);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(async ()=>{
|
||||
const output = await modelDialog.interrogate('Can you remember "seven" ?');
|
||||
console.log(output.output,output.reasoning);
|
||||
const output2 = await modelDialog.interrogate('And what comes after that?');
|
||||
console.log(output2.output,output2.reasoning,output2.inputTokens,output2.cachedTokens,output2.outputTokens);
|
||||
})()
|
||||
Reference in New Issue
Block a user