You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromllama_index.coreimportSettingsfromllama_index.memory.mem0importMem0Memoryfromllama_index.embeddings.ollamaimportOllamaEmbeddingfromllama_index.llms.openai_likeimportOpenAILikefromllama_index.agent.openaiimportOpenAIAgentSettings.llm=OpenAILike(
model="llama3.1",
api_base="http://localhost:11434/v1",
api_key="ollama",
is_function_calling_model=True,
is_chat_model=True,
)
Settings.embed_model=OllamaEmbedding(
model_name="nomic-embed-text:latest",
)
memory_from_config=Mem0Memory.from_config(
config={
"vector_store": {
"provider": "qdrant",
"config": {
"collection_name": "temp",
"embedding_model_dims": 768, # Change this according to your local model's dimensions
},
},
"llm": {
"provider": "ollama",
"config": {
"model": "llama3.1",
"temperature": 0,
"max_tokens": 8000,
"ollama_base_url": "http://localhost:11434",
},
},
"embedder": {
"provider": "ollama",
"config": {
"model": "nomic-embed-text:latest",
"ollama_base_url": "http://localhost:11434",
"embedding_dims": 768, # Change this according to your local model's dimensions
},
},
},
context={"user_id": "test"},
)
agent_runner=OpenAIAgent.from_tools(
memory=memory_from_config,
)
if__name__=="__main__":
agent_runner.chat("Hi!")
Observed:
File ".../.venv/lib/python3.12/site-packages/qdrant_client/local/distances.py", line 94, in cosine_similarity
return np.dot(vectors, query)
^^^^^^^^^^^^^^^^^^^^^^
ValueError: shapes (0,768) and (0,) not aligned: 768 (dim 1) != 0 (dim 0)
Expected: No exceptions.
Versions:
requires-python = ">=3.12,<3.13"
name = "llama-index-memory-mem0"
version = "0.2.0"
name = "llama-index"
version = "0.12.1"
name = "mem0ai"
version = "0.1.32"
The text was updated successfully, but these errors were encountered:
🐛 Describe the bug
Observed:
Expected: No exceptions.
Versions:
The text was updated successfully, but these errors were encountered: