Skip to content

Commit

Permalink
Change to window memory.
Browse files Browse the repository at this point in the history
  • Loading branch information
ellisonbg authored and 3coins committed Apr 17, 2023
1 parent 763e132 commit e70fd6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai/jupyter_ai/extension.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import asyncio
import queue
from langchain.memory import ConversationBufferMemory
from langchain.memory import ConversationBufferWindowMemory
from jupyter_ai.actors.default import DefaultActor
from jupyter_ai.actors.filesystem import FileSystemActor
from jupyter_ai.actors.index import DocumentIndexActor
Expand Down Expand Up @@ -125,7 +125,7 @@ def initialize_settings(self):
log=self.log
)
memory_actor = MemoryActor.options(name=ACTOR_TYPE.MEMORY.value).remote(
memory=ConversationBufferMemory(return_messages=True),
memory=ConversationBufferWindowMemory(return_messages=True, k=2),
log=self.log
)
self.settings['router'] = router
Expand Down

0 comments on commit e70fd6a

Please sign in to comment.