2424from google .cloud import firestore
2525from typing_extensions import override
2626
27- from ..events .event import Event
2827from . import _utils
28+ from ..events .event import Event
2929from .base_memory_service import BaseMemoryService
3030from .base_memory_service import SearchMemoryResponse
3131from .memory_entry import MemoryEntry
3939
4040# Standard English stop words
4141DEFAULT_STOP_WORDS = {
42- "a" , "an" , "the" , "and" , "or" , "but" , "if" , "then" , "else" , "to" , "of" ,
43- "in" , "on" , "for" , "with" , "is" , "are" , "was" , "were" , "be" , "been" ,
44- "being" , "have" , "has" , "had" , "do" , "does" , "did" , "can" , "could" ,
45- "will" , "would" , "should" , "shall" , "may" , "might" , "must" , "up" , "down" ,
46- "out" , "in" , "over" , "under" , "again" , "further" , "then" , "once" , "here" ,
47- "there" , "when" , "where" , "why" , "how" , "all" , "any" , "both" , "each" ,
48- "few" , "more" , "most" , "other" , "some" , "such" , "no" , "nor" , "not" , "only" ,
49- "own" , "same" , "so" , "than" , "too" , "very" , "i" , "me" , "my" , "myself" ,
50- "we" , "our" , "ours" , "ourselves" , "you" , "your" , "yours" , "yourself" ,
51- "yourselves" , "he" , "him" , "his" , "himself" , "she" , "her" , "hers" ,
52- "herself" , "it" , "its" , "itself" , "they" , "them" , "their" , "theirs" ,
53- "themselves" , "what" , "which" , "who" , "whom" , "this" , "that" , "these" ,
54- "those" , "am" , "is" , "are" , "was" , "were" , "be" , "been" , "being" ,
55- "have" , "has" , "had" , "having" , "do" , "does" , "did" , "doing" ,
56- "a" , "an" , "the" , "and" , "but" , "if" , "or" , "because" , "as" , "until" ,
57- "while" , "of" , "at" , "by" , "for" , "with" , "about" , "against" , "between" ,
58- "into" , "through" , "during" , "before" , "after" , "above" , "below" , "to" ,
59- "from" , "up" , "down" , "in" , "out" , "on" , "off" , "over" , "under" , "again" ,
60- "further" , "then" , "once" , "here" , "there" , "when" , "where" , "why" , "how" ,
61- "all" , "any" , "both" , "each" , "few" , "more" , "most" , "other" , "some" ,
62- "such" , "no" , "nor" , "not" , "only" , "own" , "same" , "so" , "than" , "too" ,
63- "very" , "s" , "t" , "can" , "will" , "just" , "don" , "should" , "now"
42+ "a" ,
43+ "an" ,
44+ "the" ,
45+ "and" ,
46+ "or" ,
47+ "but" ,
48+ "if" ,
49+ "then" ,
50+ "else" ,
51+ "to" ,
52+ "of" ,
53+ "in" ,
54+ "on" ,
55+ "for" ,
56+ "with" ,
57+ "is" ,
58+ "are" ,
59+ "was" ,
60+ "were" ,
61+ "be" ,
62+ "been" ,
63+ "being" ,
64+ "have" ,
65+ "has" ,
66+ "had" ,
67+ "do" ,
68+ "does" ,
69+ "did" ,
70+ "can" ,
71+ "could" ,
72+ "will" ,
73+ "would" ,
74+ "should" ,
75+ "shall" ,
76+ "may" ,
77+ "might" ,
78+ "must" ,
79+ "up" ,
80+ "down" ,
81+ "out" ,
82+ "in" ,
83+ "over" ,
84+ "under" ,
85+ "again" ,
86+ "further" ,
87+ "then" ,
88+ "once" ,
89+ "here" ,
90+ "there" ,
91+ "when" ,
92+ "where" ,
93+ "why" ,
94+ "how" ,
95+ "all" ,
96+ "any" ,
97+ "both" ,
98+ "each" ,
99+ "few" ,
100+ "more" ,
101+ "most" ,
102+ "other" ,
103+ "some" ,
104+ "such" ,
105+ "no" ,
106+ "nor" ,
107+ "not" ,
108+ "only" ,
109+ "own" ,
110+ "same" ,
111+ "so" ,
112+ "than" ,
113+ "too" ,
114+ "very" ,
115+ "i" ,
116+ "me" ,
117+ "my" ,
118+ "myself" ,
119+ "we" ,
120+ "our" ,
121+ "ours" ,
122+ "ourselves" ,
123+ "you" ,
124+ "your" ,
125+ "yours" ,
126+ "yourself" ,
127+ "yourselves" ,
128+ "he" ,
129+ "him" ,
130+ "his" ,
131+ "himself" ,
132+ "she" ,
133+ "her" ,
134+ "hers" ,
135+ "herself" ,
136+ "it" ,
137+ "its" ,
138+ "itself" ,
139+ "they" ,
140+ "them" ,
141+ "their" ,
142+ "theirs" ,
143+ "themselves" ,
144+ "what" ,
145+ "which" ,
146+ "who" ,
147+ "whom" ,
148+ "this" ,
149+ "that" ,
150+ "these" ,
151+ "those" ,
152+ "am" ,
153+ "is" ,
154+ "are" ,
155+ "was" ,
156+ "were" ,
157+ "be" ,
158+ "been" ,
159+ "being" ,
160+ "have" ,
161+ "has" ,
162+ "had" ,
163+ "having" ,
164+ "do" ,
165+ "does" ,
166+ "did" ,
167+ "doing" ,
168+ "a" ,
169+ "an" ,
170+ "the" ,
171+ "and" ,
172+ "but" ,
173+ "if" ,
174+ "or" ,
175+ "because" ,
176+ "as" ,
177+ "until" ,
178+ "while" ,
179+ "of" ,
180+ "at" ,
181+ "by" ,
182+ "for" ,
183+ "with" ,
184+ "about" ,
185+ "against" ,
186+ "between" ,
187+ "into" ,
188+ "through" ,
189+ "during" ,
190+ "before" ,
191+ "after" ,
192+ "above" ,
193+ "below" ,
194+ "to" ,
195+ "from" ,
196+ "up" ,
197+ "down" ,
198+ "in" ,
199+ "out" ,
200+ "on" ,
201+ "off" ,
202+ "over" ,
203+ "under" ,
204+ "again" ,
205+ "further" ,
206+ "then" ,
207+ "once" ,
208+ "here" ,
209+ "there" ,
210+ "when" ,
211+ "where" ,
212+ "why" ,
213+ "how" ,
214+ "all" ,
215+ "any" ,
216+ "both" ,
217+ "each" ,
218+ "few" ,
219+ "more" ,
220+ "most" ,
221+ "other" ,
222+ "some" ,
223+ "such" ,
224+ "no" ,
225+ "nor" ,
226+ "not" ,
227+ "only" ,
228+ "own" ,
229+ "same" ,
230+ "so" ,
231+ "than" ,
232+ "too" ,
233+ "very" ,
234+ "s" ,
235+ "t" ,
236+ "can" ,
237+ "will" ,
238+ "just" ,
239+ "don" ,
240+ "should" ,
241+ "now" ,
64242}
65243
66244
@@ -85,7 +263,9 @@ def __init__(
85263 """
86264 self .client = client or firestore .AsyncClient ()
87265 self .events_collection = events_collection or DEFAULT_EVENTS_COLLECTION
88- self .stop_words = stop_words if stop_words is not None else DEFAULT_STOP_WORDS
266+ self .stop_words = (
267+ stop_words if stop_words is not None else DEFAULT_STOP_WORDS
268+ )
89269
90270 @override
91271 async def add_session_to_memory (self , session : Session ) -> None :
0 commit comments