neuro-simulator 0.1.3__py3-none-any.whl → 0.2.0__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.
Files changed (49) hide show
  1. neuro_simulator/__init__.py +1 -10
  2. neuro_simulator/agent/__init__.py +1 -8
  3. neuro_simulator/agent/base.py +43 -0
  4. neuro_simulator/agent/core.py +111 -397
  5. neuro_simulator/agent/factory.py +30 -0
  6. neuro_simulator/agent/llm.py +34 -31
  7. neuro_simulator/agent/memory/__init__.py +1 -4
  8. neuro_simulator/agent/memory/manager.py +61 -203
  9. neuro_simulator/agent/tools/__init__.py +1 -4
  10. neuro_simulator/agent/tools/core.py +8 -18
  11. neuro_simulator/api/__init__.py +1 -0
  12. neuro_simulator/api/agent.py +163 -0
  13. neuro_simulator/api/stream.py +55 -0
  14. neuro_simulator/api/system.py +90 -0
  15. neuro_simulator/cli.py +53 -142
  16. neuro_simulator/core/__init__.py +1 -0
  17. neuro_simulator/core/agent_factory.py +52 -0
  18. neuro_simulator/core/agent_interface.py +91 -0
  19. neuro_simulator/core/application.py +278 -0
  20. neuro_simulator/services/__init__.py +1 -0
  21. neuro_simulator/{chatbot.py → services/audience.py} +24 -24
  22. neuro_simulator/{audio_synthesis.py → services/audio.py} +18 -15
  23. neuro_simulator/services/builtin.py +87 -0
  24. neuro_simulator/services/letta.py +206 -0
  25. neuro_simulator/{stream_manager.py → services/stream.py} +39 -47
  26. neuro_simulator/utils/__init__.py +1 -0
  27. neuro_simulator/utils/logging.py +90 -0
  28. neuro_simulator/utils/process.py +67 -0
  29. neuro_simulator/{stream_chat.py → utils/queue.py} +17 -4
  30. neuro_simulator/utils/state.py +14 -0
  31. neuro_simulator/{websocket_manager.py → utils/websocket.py} +18 -14
  32. {neuro_simulator-0.1.3.dist-info → neuro_simulator-0.2.0.dist-info}/METADATA +176 -176
  33. neuro_simulator-0.2.0.dist-info/RECORD +37 -0
  34. neuro_simulator/agent/api.py +0 -737
  35. neuro_simulator/agent/memory.py +0 -137
  36. neuro_simulator/agent/tools.py +0 -69
  37. neuro_simulator/builtin_agent.py +0 -83
  38. neuro_simulator/config.yaml.example +0 -157
  39. neuro_simulator/letta.py +0 -164
  40. neuro_simulator/log_handler.py +0 -43
  41. neuro_simulator/main.py +0 -673
  42. neuro_simulator/media/neuro_start.mp4 +0 -0
  43. neuro_simulator/process_manager.py +0 -70
  44. neuro_simulator/shared_state.py +0 -11
  45. neuro_simulator-0.1.3.dist-info/RECORD +0 -31
  46. /neuro_simulator/{config.py → core/config.py} +0 -0
  47. {neuro_simulator-0.1.3.dist-info → neuro_simulator-0.2.0.dist-info}/WHEEL +0 -0
  48. {neuro_simulator-0.1.3.dist-info → neuro_simulator-0.2.0.dist-info}/entry_points.txt +0 -0
  49. {neuro_simulator-0.1.3.dist-info → neuro_simulator-0.2.0.dist-info}/top_level.txt +0 -0
@@ -1,10 +1 @@
1
- # neuro_simulator/__init__.py
2
-
3
- # 导出主要模块以便于使用
4
- from .builtin_agent import initialize_builtin_agent, get_builtin_response, reset_builtin_agent_memory
5
-
6
- __all__ = [
7
- "initialize_builtin_agent",
8
- "get_builtin_response",
9
- "reset_builtin_agent_memory"
10
- ]
1
+ # neuro_simulator package root
@@ -1,8 +1 @@
1
- # agent/__init__.py
2
- """
3
- Agent module for Neuro Simulator Server
4
- """
5
-
6
- from .core import Agent
7
-
8
- __all__ = ["Agent"]
1
+ # neuro_simulator.agent package
@@ -0,0 +1,43 @@
1
+ # agent/base.py
2
+ """Base classes for Neuro Simulator Agent"""
3
+
4
+ from abc import ABC, abstractmethod
5
+ from typing import List, Dict, Any, Optional
6
+
7
+
8
+ class BaseAgent(ABC):
9
+ """Abstract base class for all agents"""
10
+
11
+ @abstractmethod
12
+ async def initialize(self):
13
+ """Initialize the agent"""
14
+ pass
15
+
16
+ @abstractmethod
17
+ async def reset_memory(self):
18
+ """Reset agent memory"""
19
+ pass
20
+
21
+ @abstractmethod
22
+ async def get_response(self, chat_messages: List[Dict[str, str]]) -> Dict[str, Any]:
23
+ """Get response from the agent
24
+
25
+ Args:
26
+ chat_messages: List of message dictionaries with 'username' and 'text' keys
27
+
28
+ Returns:
29
+ Dictionary containing processing details including tool executions and final response
30
+ """
31
+ pass
32
+
33
+ @abstractmethod
34
+ async def process_messages(self, messages: List[Dict[str, str]]) -> Dict[str, Any]:
35
+ """Process messages and generate a response
36
+
37
+ Args:
38
+ messages: List of message dictionaries with 'username' and 'text' keys
39
+
40
+ Returns:
41
+ Dictionary containing processing details including tool executions and final response
42
+ """
43
+ pass