Skip to content

Commit

Permalink
processAtions can't be awaited in non-async function
Browse files Browse the repository at this point in the history
  • Loading branch information
odilitime committed Jan 10, 2025
1 parent 3af072d commit 1258bc1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/client-direct/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,12 +567,14 @@ export class DirectClient {
// only need to call if responseMessage.content.action is set
if (contentObj.action) {
// pass memory (query) to any actions to call
const _result = await runtime.processActions(
runtime.processActions(
memory,
[responseMessage],
state,
async (newMessages) => {
message = newMessages;
// FIXME: this is supposed override what the LLM said/decided
// but the promise doesn't make this possible
//message = newMessages;
return [memory];
}
); // 0.674s
Expand Down

0 comments on commit 1258bc1

Please sign in to comment.