Skip to content

Commit

Permalink
Update testing framework to Mocha and refactor LLM processing in exec…
Browse files Browse the repository at this point in the history
…uteTemplateDef
  • Loading branch information
TheWhiteWord committed Dec 23, 2024
1 parent 923f3c4 commit 7709bd5
Show file tree
Hide file tree
Showing 5 changed files with 871 additions and 37 deletions.
15 changes: 1 addition & 14 deletions js/core_logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,8 @@ function executeFunctionDef(fnDef, context) {
* Execute template definition
*/
async function executeTemplateDef(templateDef, context) {
// Include the llm object in the context
context.llm = {
processUserIntent: (message) => {
// Simulate the LLM processing user intent
return `Processed intent: ${message}`;
}
};

// Call the LLM processing function
const llmResponse = await chatWithLLM(JSON.stringify({
type: 'execute_template',
template: templateDef.name,
input: context,
systemState: systemState
}));
const llmResponse = await processUserIntent(context.message, systemState);

let parsedResponse;
try {
Expand Down
82 changes: 64 additions & 18 deletions js/state.json

Large diffs are not rendered by default.

Loading

0 comments on commit 7709bd5

Please sign in to comment.