diff --git a/src/memos/api/handlers/chat_handler.py b/src/memos/api/handlers/chat_handler.py index 44ecbe531..06deb8024 100644 --- a/src/memos/api/handlers/chat_handler.py +++ b/src/memos/api/handlers/chat_handler.py @@ -541,16 +541,7 @@ def generate_chat_response() -> Generator[str, None, None]: ) # Step 3: Generate streaming response from LLM - if ( - chat_req.model_name_or_path - and chat_req.model_name_or_path not in self.chat_llms - ): - raise HTTPException( - status_code=400, - detail=f"Model {chat_req.model_name_or_path} not suport, choose from {list(self.chat_llms.keys())}", - ) - - model = chat_req.model_name_or_path or next(iter(self.chat_llms.keys())) + model = next(iter(self.chat_llms.keys())) response_stream = self.chat_llms[model].generate_stream( current_messages, model_name_or_path=model ) diff --git a/src/memos/vec_dbs/milvus.py b/src/memos/vec_dbs/milvus.py index 42aeec29b..ecbca5815 100644 --- a/src/memos/vec_dbs/milvus.py +++ b/src/memos/vec_dbs/milvus.py @@ -588,9 +588,9 @@ def add(self, collection_name: str, data: list[MilvusVecDBItem | dict[str, Any]] # Prepare entity data entity = { - "id": item.id, - "memory": item.memory, - "original_text": item.original_text, + "id": item.id[:65000], + "memory": item.memory[:65000], + "original_text": item.original_text[:65000], "vector": item.vector, "payload": item.payload if item.payload else {}, }