Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions src/memos/api/handlers/chat_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
6 changes: 3 additions & 3 deletions src/memos/vec_dbs/milvus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {},
}
Expand Down
Loading