Skip to content

Commit

Permalink
refactor(core): allow prompt execution in plugin mode
Browse files Browse the repository at this point in the history
- Remove the condition that skips prompt execution in plugin mode
- This change enables the use of chat history and Long-Term Memory (LTM) features when using ChatLuna as a plugin
  • Loading branch information
dingyi222666 committed Dec 17, 2024
1 parent 82ce929 commit b89bdf6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/core/src/llm-core/memory/history/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ export function apply(ctx: Context, config: Config): void {
ctx.on(
'chatluna/before-chat',
async (conversationId, message, promptVariables, chatInterface) => {
const chatMode = chatInterface.chatMode

if (chatMode === 'plugin') {
return
}

const longMemoryId = resolveLongMemoryId(message, conversationId)

let retriever = longMemoryCache[longMemoryId]
Expand Down

0 comments on commit b89bdf6

Please sign in to comment.