flock-core 0.4.0b50__py3-none-any.whl → 0.4.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of flock-core might be problematic. Click here for more details.

Files changed (34) hide show
  1. flock/adapter/__init__.py +14 -0
  2. flock/adapter/azure_adapter.py +68 -0
  3. flock/adapter/chroma_adapter.py +73 -0
  4. flock/adapter/faiss_adapter.py +97 -0
  5. flock/adapter/pinecone_adapter.py +51 -0
  6. flock/adapter/vector_base.py +47 -0
  7. flock/config.py +1 -1
  8. flock/core/context/context.py +20 -0
  9. flock/core/flock.py +71 -91
  10. flock/core/flock_agent.py +58 -3
  11. flock/core/flock_module.py +5 -0
  12. flock/di.py +41 -0
  13. flock/modules/enterprise_memory/README.md +99 -0
  14. flock/modules/enterprise_memory/enterprise_memory_module.py +526 -0
  15. flock/modules/mem0/mem0_module.py +79 -16
  16. flock/modules/mem0_async/async_mem0_module.py +126 -0
  17. flock/modules/memory/memory_module.py +28 -8
  18. flock/modules/performance/metrics_module.py +24 -1
  19. flock/modules/zep/__init__.py +1 -0
  20. flock/modules/zep/zep_module.py +192 -0
  21. flock/webapp/app/api/execution.py +79 -2
  22. flock/webapp/app/chat.py +83 -3
  23. flock/webapp/app/services/sharing_models.py +38 -0
  24. flock/webapp/app/services/sharing_store.py +60 -1
  25. flock/webapp/static/css/chat.css +2 -0
  26. flock/webapp/templates/partials/_chat_messages.html +50 -4
  27. flock/webapp/templates/partials/_results_display.html +39 -0
  28. {flock_core-0.4.0b50.dist-info → flock_core-0.4.1.dist-info}/METADATA +6 -4
  29. {flock_core-0.4.0b50.dist-info → flock_core-0.4.1.dist-info}/RECORD +33 -22
  30. flock/modules/mem0graph/mem0_graph_module.py +0 -63
  31. /flock/modules/{mem0graph → mem0_async}/__init__.py +0 -0
  32. {flock_core-0.4.0b50.dist-info → flock_core-0.4.1.dist-info}/WHEEL +0 -0
  33. {flock_core-0.4.0b50.dist-info → flock_core-0.4.1.dist-info}/entry_points.txt +0 -0
  34. {flock_core-0.4.0b50.dist-info → flock_core-0.4.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,63 +0,0 @@
1
- from typing import Any
2
-
3
- from pydantic import Field
4
-
5
- from flock.core.context.context import FlockContext
6
- from flock.core.flock_agent import FlockAgent
7
- from flock.core.flock_module import FlockModule, FlockModuleConfig
8
- from flock.core.flock_registry import flock_component
9
- from flock.core.logging.logging import get_logger
10
-
11
- logger = get_logger("module.mem0")
12
-
13
-
14
- class Mem0GraphModuleConfig(FlockModuleConfig):
15
- qdrant_host: str = Field(default="localhost", description="Qdrant hostname")
16
- qdrant_port: int = Field(default=6333, description="Qdrant port")
17
- collection: str = Field(default="flock_memories", description="Vector collection")
18
- embedder_provider: str = Field(default="openai", description="'openai' or 'local'")
19
- embedder_model: str = Field(default="text-embedding-ada-002",
20
- description="Model name for embeddings")
21
- # Optional: allow separate LLM for reflection/summarisation
22
- llm_provider: str | None = Field(default=None)
23
- llm_model: str | None = Field(default=None)
24
- top_k: int = Field(default=5, description="Number of memories to retrieve")
25
-
26
-
27
-
28
- @flock_component(config_class=Mem0GraphModuleConfig)
29
- class Mem0GraphModule(FlockModule):
30
-
31
-
32
- name: str = "mem0"
33
- config: Mem0GraphModuleConfig = Mem0GraphModuleConfig()
34
- session_id: str | None = None
35
- user_id: str | None = None
36
-
37
- def __init__(self, name, config: Mem0GraphModuleConfig) -> None:
38
- """Initialize Mem0 module."""
39
- super().__init__(name=name, config=config)
40
- logger.debug("Initializing Mem0 module")
41
-
42
-
43
- async def on_post_evaluate(
44
- self,
45
- agent: FlockAgent,
46
- inputs: dict[str, Any],
47
- context: FlockContext | None = None,
48
- result: dict[str, Any] | None = None,
49
- ) -> dict[str, Any]:
50
-
51
- return result
52
-
53
- async def on_pre_evaluate(
54
- self,
55
- agent: FlockAgent,
56
- inputs: dict[str, Any],
57
- context: FlockContext | None = None,
58
- ) -> dict[str, Any]:
59
-
60
-
61
-
62
-
63
- return inputs
File without changes