-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Labels
module: memoryThe memory module related issues/pull requestsThe memory module related issues/pull requestsstate: in progressWorking in progressWorking in progress
Description
AgentScope is an open-source project. To involve a broader community, we recommend asking your questions in English.
Describe the bug
基于这份示例,将 DashScopeChatModel 改为 OllamaChatModel 后报错:
(z14_xiaoyun) PS C:\repos\z14_xiaoyun> python .\ltm_test.py
C:\repos\z14_xiaoyun\.venv\Lib\site-packages\mem0\client\project.py:14: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
class ProjectConfig(BaseModel):
Error in new memory actions response: Error generating response using agentscope model: Event loop is closed
Invalid JSON response: Expecting value: line 1 column 1 (char 0)
Exception ignored in: <function QdrantClient.__del__ at 0x000001EE07201080>
Traceback (most recent call last):
File "C:\repos\z14_xiaoyun\.venv\Lib\site-packages\qdrant_client\qdrant_client.py", line 163, in __del__
File "C:\repos\z14_xiaoyun\.venv\Lib\site-packages\qdrant_client\qdrant_client.py", line 172, in close
File "C:\repos\z14_xiaoyun\.venv\Lib\site-packages\qdrant_client\local\qdrant_local.py", line 88, in close
File "C:\repos\z14_xiaoyun\.venv\Lib\site-packages\portalocker\portalocker.py", line 339, in unlock
File "C:\repos\z14_xiaoyun\.venv\Lib\site-packages\portalocker\portalocker.py", line 244, in unlock
ImportError: sys.meta_path is None, Python is likely shutting down
To Reproduce
Steps to reproduce the behavior:
- Code
import asyncio
from agentscope.message import Msg
from agentscope.model import OllamaChatModel
# Create mem0 long-term memory instance
from agentscope.memory import Mem0LongTermMemory
from agentscope.embedding import OllamaTextEmbedding
long_term_memory = Mem0LongTermMemory(
agent_name="Friday",
user_name="user_123",
model=OllamaChatModel(
model_name="qwen3:14b",
stream=False,
enable_thinking=False,
),
embedding_model=OllamaTextEmbedding(
model_name="qwen3-embedding:8b",
dimensions=1536,
),
on_disk=False,
)
async def basic_usage():
"""Basic usage example"""
# Record memory
await long_term_memory.record(
[Msg("user", "I like staying in homestays", "user")],
)
asyncio.run(basic_usage())
Environment (please complete the following information):
- AgentScope Version: 当前最新版 ad70c00
- Python Version: 3.12.12
- OS: Windows 11
- Ollama: 0.13.5
- Other:
requirements.txt
Metadata
Metadata
Assignees
Labels
module: memoryThe memory module related issues/pull requestsThe memory module related issues/pull requestsstate: in progressWorking in progressWorking in progress