Skip to content

Commit 1f3606f

Browse files
Wang-Daojiyuan.wang
andauthored
Feat/fix palyground bug (#644)
* 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 --------- Co-authored-by: yuan.wang <[email protected]>
1 parent 3206a67 commit 1f3606f

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

src/memos/api/handlers/chat_handler.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -541,16 +541,7 @@ def generate_chat_response() -> Generator[str, None, None]:
541541
)
542542

543543
# Step 3: Generate streaming response from LLM
544-
if (
545-
chat_req.model_name_or_path
546-
and chat_req.model_name_or_path not in self.chat_llms
547-
):
548-
raise HTTPException(
549-
status_code=400,
550-
detail=f"Model {chat_req.model_name_or_path} not suport, choose from {list(self.chat_llms.keys())}",
551-
)
552-
553-
model = chat_req.model_name_or_path or next(iter(self.chat_llms.keys()))
544+
model = next(iter(self.chat_llms.keys()))
554545
response_stream = self.chat_llms[model].generate_stream(
555546
current_messages, model_name_or_path=model
556547
)

src/memos/vec_dbs/milvus.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,9 @@ def add(self, collection_name: str, data: list[MilvusVecDBItem | dict[str, Any]]
588588

589589
# Prepare entity data
590590
entity = {
591-
"id": item.id,
592-
"memory": item.memory,
593-
"original_text": item.original_text,
591+
"id": item.id[:65000],
592+
"memory": item.memory[:65000],
593+
"original_text": item.original_text[:65000],
594594
"vector": item.vector,
595595
"payload": item.payload if item.payload else {},
596596
}

0 commit comments

Comments
 (0)