amrita_plugin_memory 0.2.6__tar.gz → 0.2.7__tar.gz
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.
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/PKG-INFO +1 -1
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/runner.py +7 -3
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory.egg-info/PKG-INFO +1 -1
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/pyproject.toml +1 -1
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/LICENSE +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/README.md +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/__init__.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/config.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/embed.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/matchers.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/__init__.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/_state.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/backend.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/consts.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/hooks.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/nodes.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/schemas.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/tools.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/workflow.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/tools.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/vector.py +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory.egg-info/SOURCES.txt +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory.egg-info/dependency_links.txt +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory.egg-info/requires.txt +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory.egg-info/top_level.txt +0 -0
- {amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/setup.cfg +0 -0
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/runner.py
RENAMED
|
@@ -12,6 +12,7 @@ from typing import Any
|
|
|
12
12
|
from amrita.plugins.chat.utils.app import CachedUserDataRepository
|
|
13
13
|
from amrita.plugins.chat.utils.libchat import add_usage
|
|
14
14
|
from amrita.plugins.chat.utils.sql import InsightsModel
|
|
15
|
+
from amrita_core import SuspendObjectStream
|
|
15
16
|
from amrita_core.base.backend import BackendSlots
|
|
16
17
|
from amrita_core.builtins.agent import ReActAgentStrategy
|
|
17
18
|
from amrita_core.chatmanager import ChatObject
|
|
@@ -20,7 +21,6 @@ from amrita_core.preset import ModelPreset
|
|
|
20
21
|
from amrita_core.types import Message, UniResponseUsage
|
|
21
22
|
from amrita_core.utils import gather_usage
|
|
22
23
|
from amrita_sense import WorkflowInterpreter
|
|
23
|
-
from amrita_sense.exceptions import InterruptKeepContext
|
|
24
24
|
from amrita_sense.runtime.types import InterpreterContext
|
|
25
25
|
from jinja2 import Template
|
|
26
26
|
from nonebot import logger
|
|
@@ -40,6 +40,9 @@ from .workflow import build_workflow
|
|
|
40
40
|
_REPO_UID = "user_00000000"
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
async def _ign_cb(*_, **__): ...
|
|
44
|
+
|
|
45
|
+
|
|
43
46
|
class SubconsciousRunner:
|
|
44
47
|
"""常驻推理循环运行器。
|
|
45
48
|
|
|
@@ -133,6 +136,8 @@ class SubconsciousRunner:
|
|
|
133
136
|
train = Message(role="system", content=prompt_text)
|
|
134
137
|
user_input = user_msg_text
|
|
135
138
|
|
|
139
|
+
io_stream = SuspendObjectStream(callback=_ign_cb)
|
|
140
|
+
|
|
136
141
|
chat_obj = ChatObject(
|
|
137
142
|
train=train,
|
|
138
143
|
user_input=user_input,
|
|
@@ -141,7 +146,7 @@ class SubconsciousRunner:
|
|
|
141
146
|
backend=BackendSlots(self._backend, self._backend),
|
|
142
147
|
config=get_config(),
|
|
143
148
|
agent_strategy=ReActAgentStrategy,
|
|
144
|
-
|
|
149
|
+
io_stream=io_stream,
|
|
145
150
|
)
|
|
146
151
|
self._chat_obj = chat_obj
|
|
147
152
|
|
|
@@ -152,7 +157,6 @@ class SubconsciousRunner:
|
|
|
152
157
|
chat_obj.io_stream,
|
|
153
158
|
extra_args=chat_obj._interpreter._ava_args[1:],
|
|
154
159
|
extra_kwargs=chat_obj._interpreter._ava_kwargs,
|
|
155
|
-
exception_ignored=chat_obj._interpreter._exc_ignored,
|
|
156
160
|
)
|
|
157
161
|
|
|
158
162
|
if self._saved_dump is not None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/_state.py
RENAMED
|
File without changes
|
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/backend.py
RENAMED
|
File without changes
|
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/consts.py
RENAMED
|
File without changes
|
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/hooks.py
RENAMED
|
File without changes
|
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/nodes.py
RENAMED
|
File without changes
|
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/schemas.py
RENAMED
|
File without changes
|
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory/rethinking/tools.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{amrita_plugin_memory-0.2.6 → amrita_plugin_memory-0.2.7}/amrita_plugin_memory.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|