Skip to content

Commit d64cf2f

Browse files
Wang-Daojiyuan.wangfridayLCaralHsi
authored
Feat/fix palyground bug (#711)
* fix playground bug, internet search judge * fix playground internet bug * modify delete mem * modify tool resp bug in multi cube * fix bug in playground chat handle and search inter * modify prompt * fix bug in playground * fix bug playfround * fix bug * fix code * fix model bug in playground * modify plan b * llm param modify * add logger in playground * modify code * fix bug * modify code * modify code * fix bug * fix search bug in plarground * fixx bug * move schadualr to back * modify pref location * modify fast net search * add tags and new package * modify prompt fix bug * remove nltk due to image promblem * prompt modify * modify bug remove redundant field * modify bug * fix playground bug * fix bug * bust internet topk * bust to 50 * fix bug cite * modify search * remote query add in playground * modify bug * modify pref bug * move add position --------- Co-authored-by: yuan.wang <[email protected]> Co-authored-by: chunyu li <[email protected]> Co-authored-by: CaralHsi <[email protected]>
1 parent 35bc424 commit d64cf2f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/memos/api/handlers/chat_handler.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -395,16 +395,6 @@ def generate_chat_response() -> Generator[str, None, None]:
395395
[chat_req.mem_cube_id] if chat_req.mem_cube_id else [chat_req.user_id]
396396
)
397397

398-
# for playground, add the query to memory without response
399-
self._start_add_to_memory(
400-
user_id=chat_req.user_id,
401-
writable_cube_ids=writable_cube_ids,
402-
session_id=chat_req.session_id or "default_session",
403-
query=chat_req.query,
404-
full_response=None,
405-
async_mode="sync",
406-
)
407-
408398
# ====== first search text mem with parse goal ======
409399
search_req = APISearchRequest(
410400
query=chat_req.query,
@@ -506,6 +496,16 @@ def generate_chat_response() -> Generator[str, None, None]:
506496
end_time = time.time()
507497
self.logger.info(f"second search time: {end_time - start_time}")
508498

499+
# for playground, add the query to memory without response
500+
self._start_add_to_memory(
501+
user_id=chat_req.user_id,
502+
writable_cube_ids=writable_cube_ids,
503+
session_id=chat_req.session_id or "default_session",
504+
query=chat_req.query,
505+
full_response=None,
506+
async_mode="sync",
507+
)
508+
509509
# Extract memories from search results (second search)
510510
memories_list = []
511511
if search_response.data and search_response.data.get("text_mem"):

0 commit comments

Comments
 (0)