rasa-pro 3.11.3a1.dev6__py3-none-any.whl → 3.11.3a1.dev7__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 rasa-pro might be problematic. Click here for more details.
- rasa/core/actions/action.py +1 -3
- rasa/core/actions/constants.py +0 -8
- rasa/core/channels/__init__.py +2 -0
- rasa/core/channels/development_inspector.py +0 -3
- rasa/core/channels/socketio.py +1 -62
- rasa/core/channels/studio_chat.py +192 -0
- rasa/core/nlg/contextual_response_rephraser.py +9 -16
- rasa/core/policies/enterprise_search_policy.py +10 -15
- rasa/core/processor.py +11 -8
- rasa/dialogue_understanding/generator/command_generator.py +34 -50
- rasa/hooks.py +14 -9
- rasa/model_manager/runner_service.py +0 -1
- rasa/model_manager/socket_bridge.py +0 -1
- rasa/plugin.py +11 -0
- rasa/shared/constants.py +9 -0
- rasa/shared/nlu/constants.py +2 -0
- rasa/version.py +1 -1
- {rasa_pro-3.11.3a1.dev6.dist-info → rasa_pro-3.11.3a1.dev7.dist-info}/METADATA +1 -1
- {rasa_pro-3.11.3a1.dev6.dist-info → rasa_pro-3.11.3a1.dev7.dist-info}/RECORD +22 -21
- {rasa_pro-3.11.3a1.dev6.dist-info → rasa_pro-3.11.3a1.dev7.dist-info}/NOTICE +0 -0
- {rasa_pro-3.11.3a1.dev6.dist-info → rasa_pro-3.11.3a1.dev7.dist-info}/WHEEL +0 -0
- {rasa_pro-3.11.3a1.dev6.dist-info → rasa_pro-3.11.3a1.dev7.dist-info}/entry_points.txt +0 -0
rasa/core/actions/action.py
CHANGED
|
@@ -17,7 +17,7 @@ from jsonschema import Draft202012Validator
|
|
|
17
17
|
|
|
18
18
|
import rasa.core
|
|
19
19
|
import rasa.shared.utils.io
|
|
20
|
-
from rasa.
|
|
20
|
+
from rasa.shared.constants import (
|
|
21
21
|
TEXT,
|
|
22
22
|
ELEMENTS,
|
|
23
23
|
QUICK_REPLIES,
|
|
@@ -102,7 +102,6 @@ from rasa.shared.nlu.constants import (
|
|
|
102
102
|
INTENT_NAME_KEY,
|
|
103
103
|
INTENT_RANKING_KEY,
|
|
104
104
|
)
|
|
105
|
-
from rasa.shared.nlu.constants import PROMPTS
|
|
106
105
|
from rasa.shared.utils.io import raise_warning
|
|
107
106
|
from rasa.shared.utils.schemas.events import EVENTS_SCHEMA
|
|
108
107
|
from rasa.utils.endpoints import ClientResponseError, EndpointConfig
|
|
@@ -277,7 +276,6 @@ def create_bot_utterance(message: Dict[Text, Any]) -> BotUttered:
|
|
|
277
276
|
ATTACHMENT: message.pop(ATTACHMENT, None) or message.get(IMAGE, None),
|
|
278
277
|
IMAGE: message.pop(IMAGE, None),
|
|
279
278
|
CUSTOM: message.pop(CUSTOM, None),
|
|
280
|
-
PROMPTS: message.pop(PROMPTS, None),
|
|
281
279
|
},
|
|
282
280
|
metadata=message,
|
|
283
281
|
)
|
rasa/core/actions/constants.py
CHANGED
|
@@ -3,11 +3,3 @@ SELECTIVE_DOMAIN = "enable_selective_domain"
|
|
|
3
3
|
|
|
4
4
|
SSL_CLIENT_CERT_FIELD = "ssl_client_cert"
|
|
5
5
|
SSL_CLIENT_KEY_FIELD = "ssl_client_key"
|
|
6
|
-
|
|
7
|
-
TEXT = "text"
|
|
8
|
-
ELEMENTS = "elements"
|
|
9
|
-
QUICK_REPLIES = "quick_replies"
|
|
10
|
-
BUTTONS = "buttons"
|
|
11
|
-
ATTACHMENT = "attachment"
|
|
12
|
-
IMAGE = "image"
|
|
13
|
-
CUSTOM = "custom"
|
rasa/core/channels/__init__.py
CHANGED
|
@@ -31,6 +31,7 @@ from rasa.core.channels.vier_cvg import CVGInput
|
|
|
31
31
|
from rasa.core.channels.voice_stream.twilio_media_streams import (
|
|
32
32
|
TwilioMediaStreamsInputChannel,
|
|
33
33
|
)
|
|
34
|
+
from rasa.core.channels.studio_chat import StudioChatInput
|
|
34
35
|
|
|
35
36
|
input_channel_classes: List[Type[InputChannel]] = [
|
|
36
37
|
CmdlineInput,
|
|
@@ -53,6 +54,7 @@ input_channel_classes: List[Type[InputChannel]] = [
|
|
|
53
54
|
JambonzVoiceReadyInput,
|
|
54
55
|
TwilioMediaStreamsInputChannel,
|
|
55
56
|
BrowserAudioInputChannel,
|
|
57
|
+
StudioChatInput,
|
|
56
58
|
]
|
|
57
59
|
|
|
58
60
|
# Mapping from an input channel name to its class to allow name based lookup.
|
|
@@ -88,9 +88,6 @@ class DevelopmentInspectProxy(InputChannel):
|
|
|
88
88
|
"""Called when a tracker has been updated."""
|
|
89
89
|
if self.tracker_stream:
|
|
90
90
|
tracker_dump = await self.get_tracker_state(sender_id)
|
|
91
|
-
# check if the underlying channel has an on_new_tracker_dump hook
|
|
92
|
-
if hasattr(self.underlying, "on_new_tracker_dump"):
|
|
93
|
-
await self.underlying.on_new_tracker_dump(sender_id, tracker_dump)
|
|
94
91
|
await self.tracker_stream.broadcast(tracker_dump)
|
|
95
92
|
|
|
96
93
|
async def on_message_proxy(
|
rasa/core/channels/socketio.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import asyncio
|
|
2
1
|
import inspect
|
|
3
2
|
import logging
|
|
4
3
|
import uuid
|
|
@@ -7,7 +6,6 @@ from typing import Any, Awaitable, Callable, Dict, Iterable, List, Optional, Tex
|
|
|
7
6
|
|
|
8
7
|
import rasa.core.channels.channel
|
|
9
8
|
from rasa.core.channels.channel import InputChannel, OutputChannel, UserMessage
|
|
10
|
-
from rasa.shared.core.trackers import EventVerbosity
|
|
11
9
|
import rasa.shared.utils.io
|
|
12
10
|
from sanic import Blueprint, response, Sanic
|
|
13
11
|
from sanic.request import Request
|
|
@@ -56,31 +54,9 @@ class SocketIOOutput(OutputChannel):
|
|
|
56
54
|
super().__init__()
|
|
57
55
|
self.sio = sio
|
|
58
56
|
self.bot_message_evt = bot_message_evt
|
|
59
|
-
self.last_event_timestamp = (
|
|
60
|
-
-1
|
|
61
|
-
) # Initialize with -1 to send all events on first message
|
|
62
|
-
|
|
63
|
-
def _get_new_events(self) -> List[Dict[Text, Any]]:
|
|
64
|
-
"""Get events that are newer than the last sent event."""
|
|
65
|
-
events = self.tracker_state.get("events", []) if self.tracker_state else []
|
|
66
|
-
new_events = [
|
|
67
|
-
event for event in events if event["timestamp"] > self.last_event_timestamp
|
|
68
|
-
]
|
|
69
|
-
if new_events:
|
|
70
|
-
self.last_event_timestamp = new_events[-1]["timestamp"]
|
|
71
|
-
return new_events
|
|
72
57
|
|
|
73
58
|
async def _send_message(self, socket_id: Text, response: Any) -> None:
|
|
74
59
|
"""Sends a message to the recipient using the bot event."""
|
|
75
|
-
# send tracker state (contains stack, slots and more)
|
|
76
|
-
await self.sio.emit("tracker_state", self.tracker_state, room=socket_id)
|
|
77
|
-
|
|
78
|
-
# send new events
|
|
79
|
-
new_events = self._get_new_events()
|
|
80
|
-
if new_events:
|
|
81
|
-
await self.sio.emit("rasa_events", new_events, room=socket_id)
|
|
82
|
-
|
|
83
|
-
# send bot response
|
|
84
60
|
await self.sio.emit(self.bot_message_evt, response, room=socket_id)
|
|
85
61
|
|
|
86
62
|
async def send_text_message(
|
|
@@ -190,8 +166,6 @@ class SocketIOInput(InputChannel):
|
|
|
190
166
|
metadata_key: Optional[Text] = "metadata",
|
|
191
167
|
):
|
|
192
168
|
"""Creates a ``SocketIOInput`` object."""
|
|
193
|
-
from rasa.core.agent import Agent
|
|
194
|
-
|
|
195
169
|
self.bot_message_evt = bot_message_evt
|
|
196
170
|
self.session_persistence = session_persistence
|
|
197
171
|
self.user_message_evt = user_message_evt
|
|
@@ -203,8 +177,6 @@ class SocketIOInput(InputChannel):
|
|
|
203
177
|
self.jwt_key = jwt_key
|
|
204
178
|
self.jwt_algorithm = jwt_method
|
|
205
179
|
|
|
206
|
-
self.agent: Optional[Agent] = None
|
|
207
|
-
|
|
208
180
|
def get_output_channel(self) -> Optional["OutputChannel"]:
|
|
209
181
|
"""Creates socket.io output channel object."""
|
|
210
182
|
if self.sio is None:
|
|
@@ -218,13 +190,9 @@ class SocketIOInput(InputChannel):
|
|
|
218
190
|
return None
|
|
219
191
|
return SocketIOOutput(self.sio, self.bot_message_evt)
|
|
220
192
|
|
|
221
|
-
async def on_new_tracker_dump(self, sender_id: str, tracker_dump: str) -> None:
|
|
222
|
-
if self.sio:
|
|
223
|
-
await self.sio.emit("tracker", tracker_dump, room=sender_id)
|
|
224
|
-
|
|
225
193
|
def blueprint(
|
|
226
194
|
self, on_new_message: Callable[[UserMessage], Awaitable[Any]]
|
|
227
|
-
) ->
|
|
195
|
+
) -> SocketBlueprint:
|
|
228
196
|
"""Defines a Sanic blueprint."""
|
|
229
197
|
# Workaround so that socketio works with requests from other origins.
|
|
230
198
|
# https://github.com/miguelgrinberg/python-socketio/issues/205#issuecomment-493769183
|
|
@@ -233,11 +201,6 @@ class SocketIOInput(InputChannel):
|
|
|
233
201
|
sio, self.socketio_path, "socketio_webhook", __name__
|
|
234
202
|
)
|
|
235
203
|
|
|
236
|
-
@socketio_webhook.listener("after_server_start") # type: ignore[misc]
|
|
237
|
-
async def after_server_start(app: Sanic, _: asyncio.AbstractEventLoop) -> None:
|
|
238
|
-
"""Prints a message after the server has started with inspect URL."""
|
|
239
|
-
self.agent = app.ctx.agent
|
|
240
|
-
|
|
241
204
|
# make sio object static to use in get_output_channel
|
|
242
205
|
self.sio = sio
|
|
243
206
|
|
|
@@ -283,30 +246,6 @@ class SocketIOInput(InputChannel):
|
|
|
283
246
|
await sio.emit("session_confirm", data["session_id"], room=sid)
|
|
284
247
|
logger.debug(f"User {sid} connected to socketIO endpoint.")
|
|
285
248
|
|
|
286
|
-
@sio.on("tracker", namespace=self.namespace)
|
|
287
|
-
async def handle_tracker(sid: Text, data: Dict) -> None:
|
|
288
|
-
from rasa.shared.core.trackers import DialogueStateTracker
|
|
289
|
-
|
|
290
|
-
if self.agent is None:
|
|
291
|
-
raise ValueError("Agent is not initialized")
|
|
292
|
-
|
|
293
|
-
async with self.agent.lock_store.lock(data["sender_id"]):
|
|
294
|
-
tracker = DialogueStateTracker.from_dict(
|
|
295
|
-
data["sender_id"], data["events"], self.agent.domain.slots
|
|
296
|
-
)
|
|
297
|
-
|
|
298
|
-
# will override an existing tracker with the same id!
|
|
299
|
-
await self.agent.tracker_store.save(tracker)
|
|
300
|
-
|
|
301
|
-
# TODO: rather figure out how to trigger the on_tracker_updated
|
|
302
|
-
# of the development inspector channel
|
|
303
|
-
state = tracker.current_state(EventVerbosity.AFTER_RESTART)
|
|
304
|
-
await sio.emit(
|
|
305
|
-
"tracker",
|
|
306
|
-
json.dumps(state),
|
|
307
|
-
room=sid,
|
|
308
|
-
)
|
|
309
|
-
|
|
310
249
|
@sio.on(self.user_message_evt, namespace=self.namespace)
|
|
311
250
|
async def handle_message(sid: Text, data: Dict) -> None:
|
|
312
251
|
output_channel = SocketIOOutput(sio, self.bot_message_evt)
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from functools import partial
|
|
3
|
+
import json
|
|
4
|
+
from typing import (
|
|
5
|
+
TYPE_CHECKING,
|
|
6
|
+
Any,
|
|
7
|
+
Awaitable,
|
|
8
|
+
Callable,
|
|
9
|
+
Dict,
|
|
10
|
+
List,
|
|
11
|
+
Optional,
|
|
12
|
+
Text,
|
|
13
|
+
)
|
|
14
|
+
import structlog
|
|
15
|
+
|
|
16
|
+
from rasa.core.channels.socketio import SocketBlueprint, SocketIOInput
|
|
17
|
+
from rasa.shared.core.trackers import EventVerbosity
|
|
18
|
+
from sanic import Sanic
|
|
19
|
+
from rasa.plugin import plugin_manager
|
|
20
|
+
from rasa.hooks import hookimpl
|
|
21
|
+
|
|
22
|
+
if TYPE_CHECKING:
|
|
23
|
+
from rasa.core.channels.channel import UserMessage
|
|
24
|
+
from rasa.shared.core.trackers import DialogueStateTracker
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
structlogger = structlog.get_logger()
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def tracker_as_dump(tracker: "DialogueStateTracker") -> str:
|
|
31
|
+
"""Create a dump of the tracker state."""
|
|
32
|
+
from rasa.shared.core.trackers import get_trackers_for_conversation_sessions
|
|
33
|
+
|
|
34
|
+
multiple_tracker_sessions = get_trackers_for_conversation_sessions(tracker)
|
|
35
|
+
|
|
36
|
+
if 0 <= len(multiple_tracker_sessions) <= 1:
|
|
37
|
+
last_tracker = tracker
|
|
38
|
+
else:
|
|
39
|
+
last_tracker = multiple_tracker_sessions[-1]
|
|
40
|
+
|
|
41
|
+
state = last_tracker.current_state(EventVerbosity.AFTER_RESTART)
|
|
42
|
+
return json.dumps(state)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class StudioTrackerUpdatePlugin:
|
|
46
|
+
"""Plugin for publishing tracker updates a socketio channel."""
|
|
47
|
+
|
|
48
|
+
def __init__(self, socket_channel: "StudioChatInput") -> None:
|
|
49
|
+
self.socket_channel = socket_channel
|
|
50
|
+
self.tasks: List[asyncio.Task] = []
|
|
51
|
+
|
|
52
|
+
def _cancel_tasks(self) -> None:
|
|
53
|
+
"""Cancel all remaining tasks."""
|
|
54
|
+
for task in self.tasks:
|
|
55
|
+
task.cancel()
|
|
56
|
+
self.tasks = []
|
|
57
|
+
|
|
58
|
+
def _cleanup_tasks(self) -> None:
|
|
59
|
+
"""Remove tasks that have already completed."""
|
|
60
|
+
self.tasks = [task for task in self.tasks if not task.done()]
|
|
61
|
+
|
|
62
|
+
@hookimpl # type: ignore[misc]
|
|
63
|
+
def after_new_user_message(self, tracker: "DialogueStateTracker") -> None:
|
|
64
|
+
"""Triggers a tracker update notification after a new user message."""
|
|
65
|
+
self.handle_tracker_update(tracker)
|
|
66
|
+
|
|
67
|
+
@hookimpl # type: ignore[misc]
|
|
68
|
+
def after_action_executed(self, tracker: "DialogueStateTracker") -> None:
|
|
69
|
+
"""Triggers a tracker update notification after an action is executed."""
|
|
70
|
+
self.handle_tracker_update(tracker)
|
|
71
|
+
|
|
72
|
+
def handle_tracker_update(self, tracker: "DialogueStateTracker") -> None:
|
|
73
|
+
"""Handles a tracker update when triggered by a hook."""
|
|
74
|
+
structlogger.info("studio_chat.after_tracker_update", tracker=tracker)
|
|
75
|
+
# directly create a dump to avoid the tracker getting modified by another
|
|
76
|
+
# function before it gets published (since the publishing is scheduled
|
|
77
|
+
# as an async task)
|
|
78
|
+
tracker_dump = tracker_as_dump(tracker)
|
|
79
|
+
task = asyncio.create_task(
|
|
80
|
+
self.socket_channel.publish_tracker_update(tracker.sender_id, tracker_dump)
|
|
81
|
+
)
|
|
82
|
+
self.tasks.append(task)
|
|
83
|
+
self._cleanup_tasks()
|
|
84
|
+
|
|
85
|
+
@hookimpl # type: ignore[misc]
|
|
86
|
+
def after_server_stop(self) -> None:
|
|
87
|
+
"""Cancels all remaining tasks when the server stops."""
|
|
88
|
+
self._cancel_tasks()
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class StudioChatInput(SocketIOInput):
|
|
92
|
+
"""Input channel for the communication between Rasa Studio and Rasa Pro."""
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def name(cls) -> Text:
|
|
96
|
+
return "studio_chat"
|
|
97
|
+
|
|
98
|
+
def __init__(
|
|
99
|
+
self,
|
|
100
|
+
*args: Any,
|
|
101
|
+
**kwargs: Any,
|
|
102
|
+
) -> None:
|
|
103
|
+
"""Creates a ``SocketIOInput`` object."""
|
|
104
|
+
from rasa.core.agent import Agent
|
|
105
|
+
|
|
106
|
+
super().__init__(*args, **kwargs)
|
|
107
|
+
self.agent: Optional[Agent] = None
|
|
108
|
+
|
|
109
|
+
self._register_tracker_update_hook()
|
|
110
|
+
|
|
111
|
+
def _register_tracker_update_hook(self) -> None:
|
|
112
|
+
plugin_manager().register(StudioTrackerUpdatePlugin(self))
|
|
113
|
+
|
|
114
|
+
async def on_tracker_updated(self, tracker: "DialogueStateTracker") -> None:
|
|
115
|
+
"""Triggers a tracker update notification after a change to the tracker."""
|
|
116
|
+
await self.publish_tracker_update(tracker.sender_id, tracker_as_dump(tracker))
|
|
117
|
+
|
|
118
|
+
async def publish_tracker_update(self, sender_id: str, tracker_dump: Dict) -> None:
|
|
119
|
+
"""Publishes a tracker update notification to the websocket."""
|
|
120
|
+
if not self.sio:
|
|
121
|
+
structlogger.error("studio_chat.on_tracker_updated.sio_not_initialized")
|
|
122
|
+
return
|
|
123
|
+
await self.sio.emit("tracker", tracker_dump, room=sender_id)
|
|
124
|
+
|
|
125
|
+
async def on_message_proxy(
|
|
126
|
+
self,
|
|
127
|
+
on_new_message: Callable[["UserMessage"], Awaitable[Any]],
|
|
128
|
+
message: "UserMessage",
|
|
129
|
+
) -> None:
|
|
130
|
+
"""Proxies the on_new_message call to the underlying channel.
|
|
131
|
+
|
|
132
|
+
Triggers a tracker update notification after processing the message.
|
|
133
|
+
"""
|
|
134
|
+
await on_new_message(message)
|
|
135
|
+
|
|
136
|
+
if not self.agent:
|
|
137
|
+
structlogger.error("studio_chat.on_message_proxy.agent_not_initialized")
|
|
138
|
+
return
|
|
139
|
+
|
|
140
|
+
tracker = await self.agent.tracker_store.retrieve(message.sender_id)
|
|
141
|
+
if tracker is None:
|
|
142
|
+
structlogger.error("studio_chat.on_message_proxy.tracker_not_found")
|
|
143
|
+
return
|
|
144
|
+
|
|
145
|
+
await self.on_tracker_updated(tracker)
|
|
146
|
+
|
|
147
|
+
async def handle_tracker_update(self, sid: str, data: Dict) -> None:
|
|
148
|
+
from rasa.shared.core.trackers import DialogueStateTracker
|
|
149
|
+
|
|
150
|
+
structlogger.debug(
|
|
151
|
+
"studio_chat.sio.handle_tracker_update",
|
|
152
|
+
sid=sid,
|
|
153
|
+
sender_id=data["sender_id"],
|
|
154
|
+
)
|
|
155
|
+
if self.agent is None:
|
|
156
|
+
structlogger.error("studio_chat.sio.agent_not_initialized")
|
|
157
|
+
return None
|
|
158
|
+
|
|
159
|
+
if not (domain := self.agent.domain):
|
|
160
|
+
structlogger.error("studio_chat.sio.domain_not_initialized")
|
|
161
|
+
return None
|
|
162
|
+
|
|
163
|
+
async with self.agent.lock_store.lock(data["sender_id"]):
|
|
164
|
+
tracker = DialogueStateTracker.from_dict(
|
|
165
|
+
data["sender_id"], data["events"], domain.slots
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
# will override an existing tracker with the same id!
|
|
169
|
+
await self.agent.tracker_store.save(tracker)
|
|
170
|
+
|
|
171
|
+
await self.on_tracker_updated(tracker)
|
|
172
|
+
|
|
173
|
+
def blueprint(
|
|
174
|
+
self, on_new_message: Callable[["UserMessage"], Awaitable[Any]]
|
|
175
|
+
) -> SocketBlueprint:
|
|
176
|
+
socket_blueprint = super().blueprint(
|
|
177
|
+
partial(self.on_message_proxy, on_new_message)
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
if not self.sio:
|
|
181
|
+
structlogger.error("studio_chat.blueprint.sio_not_initialized")
|
|
182
|
+
return socket_blueprint
|
|
183
|
+
|
|
184
|
+
@socket_blueprint.listener("after_server_start") # type: ignore[misc]
|
|
185
|
+
async def after_server_start(app: Sanic, _: asyncio.AbstractEventLoop) -> None:
|
|
186
|
+
self.agent = app.ctx.agent
|
|
187
|
+
|
|
188
|
+
@self.sio.on("update_tracker", namespace=self.namespace)
|
|
189
|
+
async def on_update_tracker(sid: Text, data: Dict) -> None:
|
|
190
|
+
await self.handle_tracker_update(sid, data)
|
|
191
|
+
|
|
192
|
+
return socket_blueprint
|
|
@@ -23,6 +23,8 @@ from rasa.shared.nlu.constants import (
|
|
|
23
23
|
PROMPTS,
|
|
24
24
|
KEY_USER_PROMPT,
|
|
25
25
|
KEY_LLM_RESPONSE_METADATA,
|
|
26
|
+
KEY_PROMPT_NAME,
|
|
27
|
+
KEY_COMPONENT_NAME,
|
|
26
28
|
)
|
|
27
29
|
from rasa.shared.providers.llm.llm_response import LLMResponse
|
|
28
30
|
from rasa.shared.utils.health_check.llm_health_check_mixin import LLMHealthCheckMixin
|
|
@@ -153,24 +155,15 @@ class ContextualResponseRephraser(
|
|
|
153
155
|
return response
|
|
154
156
|
|
|
155
157
|
prompt_data: Dict[Text, Any] = {
|
|
158
|
+
KEY_COMPONENT_NAME: cls.__name__,
|
|
159
|
+
KEY_PROMPT_NAME: prompt_name,
|
|
156
160
|
KEY_USER_PROMPT: user_prompt,
|
|
161
|
+
KEY_LLM_RESPONSE_METADATA: llm_response.to_dict() if llm_response else None,
|
|
157
162
|
}
|
|
158
163
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
prompt_data[KEY_LLM_RESPONSE_METADATA] = None
|
|
163
|
-
|
|
164
|
-
prompt_tuple = (prompt_name, prompt_data)
|
|
165
|
-
|
|
166
|
-
component_name = cls.__name__
|
|
167
|
-
component_prompts = response.get(PROMPTS, {})
|
|
168
|
-
if component_name in component_prompts:
|
|
169
|
-
component_prompts[component_name].append(prompt_tuple)
|
|
170
|
-
else:
|
|
171
|
-
component_prompts[component_name] = [prompt_tuple]
|
|
172
|
-
|
|
173
|
-
response[PROMPTS] = component_prompts
|
|
164
|
+
prompts = response.get(PROMPTS, [])
|
|
165
|
+
prompts.append(prompt_data)
|
|
166
|
+
response[PROMPTS] = prompts
|
|
174
167
|
return response
|
|
175
168
|
|
|
176
169
|
def _last_message_if_human(self, tracker: DialogueStateTracker) -> Optional[str]:
|
|
@@ -315,7 +308,7 @@ class ContextualResponseRephraser(
|
|
|
315
308
|
llm_response=llm_response,
|
|
316
309
|
)
|
|
317
310
|
|
|
318
|
-
if llm_response
|
|
311
|
+
if not (llm_response and llm_response.choices and llm_response.choices[0]):
|
|
319
312
|
# If the LLM fails to generate a response, return the original response.
|
|
320
313
|
return response
|
|
321
314
|
|
|
@@ -68,6 +68,8 @@ from rasa.shared.nlu.constants import (
|
|
|
68
68
|
PROMPTS,
|
|
69
69
|
KEY_USER_PROMPT,
|
|
70
70
|
KEY_LLM_RESPONSE_METADATA,
|
|
71
|
+
KEY_PROMPT_NAME,
|
|
72
|
+
KEY_COMPONENT_NAME,
|
|
71
73
|
)
|
|
72
74
|
from rasa.shared.nlu.training_data.training_data import TrainingData
|
|
73
75
|
from rasa.shared.providers.embedding._langchain_embedding_client_adapter import (
|
|
@@ -304,24 +306,17 @@ class EnterpriseSearchPolicy(LLMHealthCheckMixin, EmbeddingsHealthCheckMixin, Po
|
|
|
304
306
|
return
|
|
305
307
|
|
|
306
308
|
parse_data = tracker.latest_message.parse_data
|
|
307
|
-
if
|
|
308
|
-
parse_data[PROMPTS] =
|
|
309
|
-
|
|
310
|
-
component_name = cls.__name__
|
|
311
|
-
component_prompts = parse_data[PROMPTS].get(component_name, []) # type: ignore[literal-required]
|
|
309
|
+
if PROMPTS not in parse_data:
|
|
310
|
+
parse_data[PROMPTS] = [] # type: ignore[literal-required]
|
|
312
311
|
|
|
313
312
|
prompt_data: Dict[Text, Any] = {
|
|
313
|
+
KEY_COMPONENT_NAME: cls.__name__,
|
|
314
|
+
KEY_PROMPT_NAME: prompt_name,
|
|
314
315
|
KEY_USER_PROMPT: user_prompt,
|
|
316
|
+
KEY_LLM_RESPONSE_METADATA: llm_response.to_dict() if llm_response else None,
|
|
315
317
|
}
|
|
316
318
|
|
|
317
|
-
|
|
318
|
-
prompt_data[KEY_LLM_RESPONSE_METADATA] = llm_response.to_dict()
|
|
319
|
-
else:
|
|
320
|
-
prompt_data[KEY_LLM_RESPONSE_METADATA] = None
|
|
321
|
-
|
|
322
|
-
prompt_tuple = (prompt_name, prompt_data)
|
|
323
|
-
component_prompts.append(prompt_tuple)
|
|
324
|
-
parse_data[PROMPTS][component_name] = component_prompts # type: ignore[literal-required]
|
|
319
|
+
parse_data[PROMPTS].append(prompt_data) # type: ignore[literal-required]
|
|
325
320
|
|
|
326
321
|
def train( # type: ignore[override]
|
|
327
322
|
self,
|
|
@@ -549,8 +544,8 @@ class EnterpriseSearchPolicy(LLMHealthCheckMixin, EmbeddingsHealthCheckMixin, Po
|
|
|
549
544
|
|
|
550
545
|
if self.use_llm:
|
|
551
546
|
prompt = self._render_prompt(tracker, documents.results)
|
|
552
|
-
|
|
553
|
-
llm_response = LLMResponse.ensure_llm_response(
|
|
547
|
+
llm_response = await self._generate_llm_answer(llm, prompt)
|
|
548
|
+
llm_response = LLMResponse.ensure_llm_response(llm_response)
|
|
554
549
|
|
|
555
550
|
self._add_prompt_and_llm_response_to_latest_message(
|
|
556
551
|
tracker=tracker,
|
rasa/core/processor.py
CHANGED
|
@@ -818,8 +818,9 @@ class MessageProcessor:
|
|
|
818
818
|
return parse_data
|
|
819
819
|
|
|
820
820
|
def _sanitize_message(self, message: UserMessage) -> UserMessage:
|
|
821
|
-
"""Sanitize user
|
|
822
|
-
|
|
821
|
+
"""Sanitize user messages.
|
|
822
|
+
|
|
823
|
+
Removes prepended slashes before the actual content.
|
|
823
824
|
"""
|
|
824
825
|
# Regex pattern to match leading slashes and any whitespace before
|
|
825
826
|
# actual content
|
|
@@ -921,9 +922,7 @@ class MessageProcessor:
|
|
|
921
922
|
return [command.as_dict() for command in commands]
|
|
922
923
|
|
|
923
924
|
def _contains_undefined_intent(self, message: Message) -> bool:
|
|
924
|
-
"""Checks if the message contains an intent
|
|
925
|
-
in the domain.
|
|
926
|
-
"""
|
|
925
|
+
"""Checks if the message contains an undefined intent."""
|
|
927
926
|
intent_name = message.get(INTENT, {}).get("name")
|
|
928
927
|
return intent_name is not None and intent_name not in self.domain.intents
|
|
929
928
|
|
|
@@ -987,6 +986,8 @@ class MessageProcessor:
|
|
|
987
986
|
if parse_data["entities"]:
|
|
988
987
|
self._log_slots(tracker)
|
|
989
988
|
|
|
989
|
+
plugin_manager().hook.after_new_user_message(tracker=tracker)
|
|
990
|
+
|
|
990
991
|
logger.debug(
|
|
991
992
|
f"Logged UserUtterance - tracker now has {len(tracker.events)} events."
|
|
992
993
|
)
|
|
@@ -1305,7 +1306,7 @@ class MessageProcessor:
|
|
|
1305
1306
|
self._log_slots(tracker)
|
|
1306
1307
|
|
|
1307
1308
|
await self.execute_side_effects(events, tracker, output_channel)
|
|
1308
|
-
|
|
1309
|
+
plugin_manager().hook.after_action_executed(tracker=tracker)
|
|
1309
1310
|
return self.should_predict_another_action(action.name())
|
|
1310
1311
|
|
|
1311
1312
|
def _log_action_on_tracker(
|
|
@@ -1441,8 +1442,10 @@ class MessageProcessor:
|
|
|
1441
1442
|
return len(filtered_commands) > 0
|
|
1442
1443
|
|
|
1443
1444
|
def _is_calm_assistant(self) -> bool:
|
|
1444
|
-
"""Inspects the nodes of the graph schema to
|
|
1445
|
-
|
|
1445
|
+
"""Inspects the nodes of the graph schema to decide if we are in CALM.
|
|
1446
|
+
|
|
1447
|
+
To determine whether we are in CALM mode, we check if any node is
|
|
1448
|
+
associated with the `FlowPolicy`, which is indicative of a
|
|
1446
1449
|
CALM assistant setup.
|
|
1447
1450
|
|
|
1448
1451
|
Returns:
|
|
@@ -27,6 +27,8 @@ from rasa.shared.nlu.constants import (
|
|
|
27
27
|
KEY_USER_PROMPT,
|
|
28
28
|
KEY_SYSTEM_PROMPT,
|
|
29
29
|
KEY_LLM_RESPONSE_METADATA,
|
|
30
|
+
KEY_PROMPT_NAME,
|
|
31
|
+
KEY_COMPONENT_NAME,
|
|
30
32
|
)
|
|
31
33
|
from rasa.shared.nlu.training_data.message import Message
|
|
32
34
|
from rasa.shared.providers.llm.llm_response import LLMResponse
|
|
@@ -408,67 +410,49 @@ class CommandGenerator:
|
|
|
408
410
|
Prompt is only added in case the flag 'record_commands_and_prompts' is set.
|
|
409
411
|
Example of prompts in the message parse data:
|
|
410
412
|
Message(data={
|
|
411
|
-
PROMPTS:
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
{
|
|
434
|
-
"user_prompt": <prompt content>",
|
|
435
|
-
"system_prompt": <prompt content>",
|
|
436
|
-
"llm_response_metadata": <metadata dict from LLMResponse>
|
|
437
|
-
}
|
|
438
|
-
),
|
|
413
|
+
PROMPTS: [
|
|
414
|
+
{
|
|
415
|
+
"component_name": "MultiStepLLMCommandGenerator",
|
|
416
|
+
"prompt_name": "fill_slots_prompt",
|
|
417
|
+
"user_prompt": "...",
|
|
418
|
+
"system_prompt": "...",
|
|
419
|
+
"llm_response_metadata": { ... }
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"component_name": "MultiStepLLMCommandGenerator",
|
|
423
|
+
"prompt_name": "handle_flows_prompt",
|
|
424
|
+
"user_prompt": "...",
|
|
425
|
+
"system_prompt": "...",
|
|
426
|
+
"llm_response_metadata": { ... }
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"component_name": "SingleStepLLMCommandGenerator",
|
|
430
|
+
"prompt_name": "prompt_template",
|
|
431
|
+
"user_prompt": "...",
|
|
432
|
+
"system_prompt": "...",
|
|
433
|
+
"llm_response_metadata": { ... }
|
|
434
|
+
}
|
|
439
435
|
]
|
|
440
|
-
}
|
|
441
436
|
})
|
|
442
437
|
"""
|
|
443
438
|
from rasa.dialogue_understanding.utils import record_commands_and_prompts
|
|
444
439
|
|
|
445
|
-
#
|
|
440
|
+
# Only set prompt if the flag "record_commands_and_prompts" is set to True.
|
|
446
441
|
if not record_commands_and_prompts:
|
|
447
442
|
return
|
|
448
443
|
|
|
444
|
+
# Construct the dictionary with prompt details.
|
|
449
445
|
prompt_data: Dict[Text, Any] = {
|
|
446
|
+
KEY_COMPONENT_NAME: component_name,
|
|
447
|
+
KEY_PROMPT_NAME: prompt_name,
|
|
450
448
|
KEY_USER_PROMPT: user_prompt,
|
|
449
|
+
KEY_LLM_RESPONSE_METADATA: llm_response.to_dict() if llm_response else None,
|
|
451
450
|
**({KEY_SYSTEM_PROMPT: system_prompt} if system_prompt else {}),
|
|
452
451
|
}
|
|
453
452
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
prompt_data[KEY_LLM_RESPONSE_METADATA] = None
|
|
458
|
-
|
|
459
|
-
prompt_tuple = (prompt_name, prompt_data)
|
|
453
|
+
# Get or create a top-level "prompts" list.
|
|
454
|
+
prompts = message.get(PROMPTS) or []
|
|
455
|
+
prompts.append(prompt_data)
|
|
460
456
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
if component_name in prompts:
|
|
464
|
-
prompts[component_name].append(prompt_tuple)
|
|
465
|
-
else:
|
|
466
|
-
prompts[component_name] = [prompt_tuple]
|
|
467
|
-
else:
|
|
468
|
-
prompts = {component_name: [prompt_tuple]}
|
|
469
|
-
|
|
470
|
-
message.set(
|
|
471
|
-
PROMPTS,
|
|
472
|
-
prompts,
|
|
473
|
-
add_to_output=True,
|
|
474
|
-
)
|
|
457
|
+
# Update the message with the new prompts list.
|
|
458
|
+
message.set(PROMPTS, prompts, add_to_output=True)
|
rasa/hooks.py
CHANGED
|
@@ -3,17 +3,14 @@ import logging
|
|
|
3
3
|
from typing import Optional, TYPE_CHECKING, List, Text, Union
|
|
4
4
|
|
|
5
5
|
import pluggy
|
|
6
|
-
from rasa.cli import SubParsersAction
|
|
7
6
|
|
|
8
|
-
from rasa
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
from rasa.core.auth_retry_tracker_store import AuthRetryTrackerStore
|
|
12
|
-
from rasa.core.secrets_manager.factory import load_secret_manager
|
|
13
|
-
|
|
14
|
-
from rasa.tracing import config
|
|
7
|
+
# IMPORTANT: do not import anything from rasa here - use scoped imports
|
|
8
|
+
# this avoids circular imports, as the hooks are used in different places
|
|
9
|
+
# across the codebase.
|
|
15
10
|
|
|
16
11
|
if TYPE_CHECKING:
|
|
12
|
+
from rasa.cli import SubParsersAction
|
|
13
|
+
from rasa.utils.endpoints import EndpointConfig
|
|
17
14
|
from rasa.core.brokers.broker import EventBroker
|
|
18
15
|
from rasa.core.tracker_store import TrackerStore
|
|
19
16
|
from rasa.shared.core.domain import Domain
|
|
@@ -25,7 +22,7 @@ logger = logging.getLogger(__name__)
|
|
|
25
22
|
|
|
26
23
|
@hookimpl # type: ignore[misc]
|
|
27
24
|
def refine_cli(
|
|
28
|
-
subparsers: SubParsersAction,
|
|
25
|
+
subparsers: "SubParsersAction",
|
|
29
26
|
parent_parsers: List[argparse.ArgumentParser],
|
|
30
27
|
) -> None:
|
|
31
28
|
from rasa.cli import e2e_test, inspect, markers
|
|
@@ -43,6 +40,9 @@ def refine_cli(
|
|
|
43
40
|
|
|
44
41
|
@hookimpl # type: ignore[misc]
|
|
45
42
|
def configure_commandline(cmdline_arguments: argparse.Namespace) -> Optional[Text]:
|
|
43
|
+
from rasa.tracing import config
|
|
44
|
+
from rasa.cli import x as rasa_x
|
|
45
|
+
|
|
46
46
|
endpoints_file = None
|
|
47
47
|
|
|
48
48
|
if cmdline_arguments.func.__name__ == "rasa_x":
|
|
@@ -69,6 +69,8 @@ def init_telemetry(endpoints_file: Optional[Text]) -> None:
|
|
|
69
69
|
|
|
70
70
|
@hookimpl # type: ignore[misc]
|
|
71
71
|
def init_managers(endpoints_file: Optional[Text]) -> None:
|
|
72
|
+
from rasa.core.secrets_manager.factory import load_secret_manager
|
|
73
|
+
|
|
72
74
|
load_secret_manager(endpoints_file)
|
|
73
75
|
|
|
74
76
|
|
|
@@ -78,6 +80,9 @@ def create_tracker_store(
|
|
|
78
80
|
domain: "Domain",
|
|
79
81
|
event_broker: Optional["EventBroker"],
|
|
80
82
|
) -> "TrackerStore":
|
|
83
|
+
from rasa.utils.endpoints import EndpointConfig
|
|
84
|
+
from rasa.core.auth_retry_tracker_store import AuthRetryTrackerStore
|
|
85
|
+
|
|
81
86
|
if isinstance(endpoint_config, EndpointConfig):
|
|
82
87
|
return AuthRetryTrackerStore(
|
|
83
88
|
endpoint_config=endpoint_config, domain=domain, event_broker=event_broker
|
|
@@ -132,7 +132,6 @@ async def create_bridge_client(
|
|
|
132
132
|
|
|
133
133
|
@client.event # type: ignore[misc]
|
|
134
134
|
async def tracker(data: Dict[str, Any]) -> None:
|
|
135
|
-
structlogger.debug("model_runner.tracker_message", deployment_id=deployment_id)
|
|
136
135
|
await sio.emit("tracker", json.loads(data), room=sid)
|
|
137
136
|
|
|
138
137
|
@client.event # type: ignore[misc]
|
rasa/plugin.py
CHANGED
|
@@ -14,6 +14,7 @@ if TYPE_CHECKING:
|
|
|
14
14
|
from rasa.core.tracker_store import TrackerStore
|
|
15
15
|
from rasa.shared.core.domain import Domain
|
|
16
16
|
from rasa.utils.endpoints import EndpointConfig
|
|
17
|
+
from rasa.shared.core.trackers import DialogueStateTracker
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
hookspec = pluggy.HookspecMarker("rasa")
|
|
@@ -88,3 +89,13 @@ def after_server_stop() -> None:
|
|
|
88
89
|
Use this hook to de-initialize any resources that require explicit cleanup like,
|
|
89
90
|
thread shutdown, closing connections, etc.
|
|
90
91
|
"""
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@hookspec # type: ignore[misc]
|
|
95
|
+
def after_new_user_message(tracker: "DialogueStateTracker") -> None:
|
|
96
|
+
"""Hook specification for after a new user message is received."""
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@hookspec # type: ignore[misc]
|
|
100
|
+
def after_action_executed(tracker: "DialogueStateTracker") -> None:
|
|
101
|
+
"""Hook specification for after an action is executed."""
|
rasa/shared/constants.py
CHANGED
|
@@ -319,3 +319,12 @@ SENSITIVE_DATA = [
|
|
|
319
319
|
AWS_SECRET_ACCESS_KEY_CONFIG_KEY,
|
|
320
320
|
AWS_SESSION_TOKEN_CONFIG_KEY,
|
|
321
321
|
]
|
|
322
|
+
|
|
323
|
+
# Used for key values in BotUtterance.data
|
|
324
|
+
TEXT = "text"
|
|
325
|
+
ELEMENTS = "elements"
|
|
326
|
+
QUICK_REPLIES = "quick_replies"
|
|
327
|
+
BUTTONS = "buttons"
|
|
328
|
+
ATTACHMENT = "attachment"
|
|
329
|
+
IMAGE = "image"
|
|
330
|
+
CUSTOM = "custom"
|
rasa/shared/nlu/constants.py
CHANGED
|
@@ -7,6 +7,8 @@ PROMPTS = "prompts"
|
|
|
7
7
|
KEY_USER_PROMPT = "user_prompt"
|
|
8
8
|
KEY_SYSTEM_PROMPT = "system_prompt"
|
|
9
9
|
KEY_LLM_RESPONSE_METADATA = "llm_response_metadata"
|
|
10
|
+
KEY_PROMPT_NAME = "prompt_name"
|
|
11
|
+
KEY_COMPONENT_NAME = "component_name"
|
|
10
12
|
LLM_COMMANDS = "llm_commands" # needed for fine-tuning
|
|
11
13
|
LLM_PROMPT = "llm_prompt" # needed for fine-tuning
|
|
12
14
|
FLOWS_FROM_SEMANTIC_SEARCH = "flows_from_semantic_search"
|
rasa/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rasa-pro
|
|
3
|
-
Version: 3.11.3a1.
|
|
3
|
+
Version: 3.11.3a1.dev7
|
|
4
4
|
Summary: State-of-the-art open-core Conversational AI framework for Enterprises that natively leverages generative AI for effortless assistant development.
|
|
5
5
|
Home-page: https://rasa.com
|
|
6
6
|
Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework
|
|
@@ -92,7 +92,7 @@ rasa/cli/x.py,sha256=C7dLtYXAkD-uj7hNj7Pz5YbOupp2yRcMjQbsEVqXUJ8,6825
|
|
|
92
92
|
rasa/constants.py,sha256=YrrBiJUc0cL5Xrsap6IioNbQ6dKaqDiueqHmMIYkpF0,1348
|
|
93
93
|
rasa/core/__init__.py,sha256=DYHLve7F1yQBVOZTA63efVIwLiULMuihOfdpzw1j0os,457
|
|
94
94
|
rasa/core/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
95
|
-
rasa/core/actions/action.py,sha256=
|
|
95
|
+
rasa/core/actions/action.py,sha256=vrd-CiBDtZt9-1B6DSkCvtZVg8iBs-O94QrGW0bzpz4,45391
|
|
96
96
|
rasa/core/actions/action_clean_stack.py,sha256=xUP-2ipPsPAnAiwP17c-ezmHPSrV4JSUZr-eSgPQwIs,2279
|
|
97
97
|
rasa/core/actions/action_exceptions.py,sha256=hghzXYN6VeHC-O_O7WiPesCNV86ZTkHgG90ZnQcbai8,724
|
|
98
98
|
rasa/core/actions/action_hangup.py,sha256=wpXunkGC71krAYZD3BbqzlHLZxNg1mIviwWz0j9Go-c,994
|
|
@@ -101,7 +101,7 @@ rasa/core/actions/action_run_slot_rejections.py,sha256=F16a9aMJAw27Rh9wUJu0KYSAP
|
|
|
101
101
|
rasa/core/actions/action_trigger_chitchat.py,sha256=cJcLg_RhfZx-JyomcBOJabnliuj8Fs1nLvONwPCIbpI,1084
|
|
102
102
|
rasa/core/actions/action_trigger_flow.py,sha256=7pye_4iR_9xedyTntS9l49uEmTf5UXjE0hEFgOodfyw,3487
|
|
103
103
|
rasa/core/actions/action_trigger_search.py,sha256=xKzSHZIi1bcadgzXJwtP_ZLWKz-ehmHUNmesR1brr0s,1064
|
|
104
|
-
rasa/core/actions/constants.py,sha256=
|
|
104
|
+
rasa/core/actions/constants.py,sha256=gfgdWmj-OJ5xTcTAS1OcXQ3dgcTiHO98NC-SGyKlTjs,161
|
|
105
105
|
rasa/core/actions/custom_action_executor.py,sha256=SWsy35tsWZTSTvYyXdSqSV8efz_f3OA-dYOh_I_QXy0,6169
|
|
106
106
|
rasa/core/actions/direct_custom_actions_executor.py,sha256=IzxRnPF92zs3WX-p9DoFq51Vf0QwfE6prB_AlyEEllc,3746
|
|
107
107
|
rasa/core/actions/e2e_stub_custom_action_executor.py,sha256=D-kECC1QjVLv4owNxstW2xJPPsXTGfGepvquMeWB_ec,2282
|
|
@@ -118,12 +118,12 @@ rasa/core/brokers/file.py,sha256=GpeDEgwJYAUNZwUUqzGFzzMHiVi-N_kX185cm8RF4BM,180
|
|
|
118
118
|
rasa/core/brokers/kafka.py,sha256=sJl1g92fo__cs-y2SKs4Uof6HJRJ-1fwHkjRuMs-cF4,12216
|
|
119
119
|
rasa/core/brokers/pika.py,sha256=HPJn4Bm1KDAD9-UCK4uBTCrFWEPEkaSO9MJldO94xok,14379
|
|
120
120
|
rasa/core/brokers/sql.py,sha256=4cDqpbwXwjcq5THbrgRptfUq38-UOnckZq7S7d9wU9o,2728
|
|
121
|
-
rasa/core/channels/__init__.py,sha256=
|
|
121
|
+
rasa/core/channels/__init__.py,sha256=_BcGTWxW-R2TuD0Y0tVQDlnKW1GFbGvoob_vDviaJ78,2258
|
|
122
122
|
rasa/core/channels/botframework.py,sha256=xyc_n7DJ3uglqvkr0IrQ3xxPWgvaqSOLHWx9BUS0enE,11668
|
|
123
123
|
rasa/core/channels/callback.py,sha256=4LpjtJgQMAAXHwZrcVlVEUdpDTRqTe6n7XtwCusa75U,2750
|
|
124
124
|
rasa/core/channels/channel.py,sha256=0cicx4SZsm0icCSO-F-e-Qk5W08ef11ozZRSrLfFPto,15107
|
|
125
125
|
rasa/core/channels/console.py,sha256=fYhkSY8a_pn09ssjTczsKTALinABogpFJzzWTnL7MP8,8076
|
|
126
|
-
rasa/core/channels/development_inspector.py,sha256=
|
|
126
|
+
rasa/core/channels/development_inspector.py,sha256=RXBCQ8GchV2RJd4Y3Xe74ZLb1kSOinC_Xmc2l2Qqw5I,6964
|
|
127
127
|
rasa/core/channels/facebook.py,sha256=ub8DCnTPe3_EyYtdYE49mo2Y-UNpURj6Qx9590oadeM,15816
|
|
128
128
|
rasa/core/channels/hangouts.py,sha256=GjTmiVvE_OJ7Ig1-j2Aax95Bp1RFL-TUW80rnNcxxY0,11562
|
|
129
129
|
rasa/core/channels/inspector/.eslintrc.cjs,sha256=MXLV2wxhPZqg3wvFlyi1fM363_7XxtWsB87RqWN4gzY,580
|
|
@@ -254,7 +254,8 @@ rasa/core/channels/rasa_chat.py,sha256=XGZ7QLyQHhB-m7EjetDNEBSjAa2mEFqU-e-FuS9z3
|
|
|
254
254
|
rasa/core/channels/rest.py,sha256=YDBnbdrlvaYL7Efy3cm2LbbSm7cBAFDhmcypojHXbog,7227
|
|
255
255
|
rasa/core/channels/rocketchat.py,sha256=HWOMxXLuwadYEYIMMP-z6RqAJzMGZDLklpgqLOipXF0,5998
|
|
256
256
|
rasa/core/channels/slack.py,sha256=3b8OZQ_gih5XBwhQ1q4BbBUC1SCAPaO9AoJEn2NaoQE,24405
|
|
257
|
-
rasa/core/channels/socketio.py,sha256=
|
|
257
|
+
rasa/core/channels/socketio.py,sha256=uno9MG-sHxjZpYHrSO5VauyhAGshrwmT5FoHh99X2ws,10841
|
|
258
|
+
rasa/core/channels/studio_chat.py,sha256=V550z0ysvbv0laXxotEtowuYHe-4gMLcNWwkoz8mKwk,6729
|
|
258
259
|
rasa/core/channels/telegram.py,sha256=5BrNECFM3qe9XjNpDb8Q9fbqCT5aKr5L6IH21W8sum8,10651
|
|
259
260
|
rasa/core/channels/twilio.py,sha256=GsdjfplZdBj0fRB60bSggPF1DXFZ_x18V_dlcDy5VFs,5943
|
|
260
261
|
rasa/core/channels/vier_cvg.py,sha256=PfvSluQqgJbP0JzZPFUvum3z7H55JPPeobcD-z5zCkw,13544
|
|
@@ -307,7 +308,7 @@ rasa/core/lock_store.py,sha256=fgdufUYXHEiTcD7NCCqgDAQRRtt7jrKafENHqFKOyi0,12504
|
|
|
307
308
|
rasa/core/migrate.py,sha256=XNeYdiRytBmBNubOQ8KZOT_wR1o9aOpHHfBU9PCB2eg,14626
|
|
308
309
|
rasa/core/nlg/__init__.py,sha256=0eQOZ0fB35b18oVhRFczcH30jJHgO8WXFhnbXGOxJek,240
|
|
309
310
|
rasa/core/nlg/callback.py,sha256=rFkDe7CSAETASRefpERUT6-DHWPs0UXhx8x4tZ1QE0M,5238
|
|
310
|
-
rasa/core/nlg/contextual_response_rephraser.py,sha256=
|
|
311
|
+
rasa/core/nlg/contextual_response_rephraser.py,sha256=af2TZ5YbMMt7k74KQ_iUx3OBMKqcf2KlOoDQw_V-Q-M,12966
|
|
311
312
|
rasa/core/nlg/generator.py,sha256=YZ_rh--MeyzA6oXRqr_Ng-jcmPgbCmWMJJrquPmo__8,8436
|
|
312
313
|
rasa/core/nlg/interpolator.py,sha256=Dc-J2Vf6vPPUbwIgZQm3AJDGvMaFTsh9Citd4CYuA9U,5189
|
|
313
314
|
rasa/core/nlg/response.py,sha256=aHpy9BgjO7ub6v-sVPiQqutUA_7-UD1l3DJGVeQyp4k,5888
|
|
@@ -315,7 +316,7 @@ rasa/core/nlg/summarize.py,sha256=JO6VCfM_RnU0QX8Us42YkNOxC0ESKV1xcVH_sCW27ZU,21
|
|
|
315
316
|
rasa/core/persistor.py,sha256=0BZvrA1xObxVtADWLVapj4NOmvqIEen1LKoMOdtZ63s,20337
|
|
316
317
|
rasa/core/policies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
317
318
|
rasa/core/policies/ensemble.py,sha256=AjNOEy2Iubbe-LdKaoFUXG8ch6yPrg3bTvcTcAPmeOs,12959
|
|
318
|
-
rasa/core/policies/enterprise_search_policy.py,sha256=
|
|
319
|
+
rasa/core/policies/enterprise_search_policy.py,sha256=op1VxvxFX78DU9UUIkUWi0LhfkvfsGerpokBSkOppwg,36477
|
|
319
320
|
rasa/core/policies/enterprise_search_prompt_template.jinja2,sha256=dCS_seyBGxMQoMsOjjvPp0dd31OSzZCJSZeev1FJK5Q,1187
|
|
320
321
|
rasa/core/policies/enterprise_search_prompt_with_citation_template.jinja2,sha256=vRQBs3q13UmvRRgqA8-DmRtM7tqZP2ngwMVJ4gy7lE0,3302
|
|
321
322
|
rasa/core/policies/flow_policy.py,sha256=wGb1l_59cGM9ZaexSIK5uXFi618739oNfLOxx2FC0_Y,7490
|
|
@@ -330,7 +331,7 @@ rasa/core/policies/policy.py,sha256=HeVtIaV0dA1QcAG3vjdn-4g7-oUEJPL4u01ETJt78YA,
|
|
|
330
331
|
rasa/core/policies/rule_policy.py,sha256=YNDPZUZkpKFCvZwKe1kSfP6LQnDL9CQ6JU69JRwdmWw,50729
|
|
331
332
|
rasa/core/policies/ted_policy.py,sha256=_DHiDH5Upx1yFNzMXBA3SGdHBRfsitTLlr7howUHPoo,87750
|
|
332
333
|
rasa/core/policies/unexpected_intent_policy.py,sha256=5pGe9EMS-NLHIDDhqY6KCH_Kv7_TGMzSbe_GsjuKH1w,39649
|
|
333
|
-
rasa/core/processor.py,sha256=
|
|
334
|
+
rasa/core/processor.py,sha256=OU8VrrfQlGEbUvV8u_YKhhCV9VhVdLR03Rn2wi1g3K4,55741
|
|
334
335
|
rasa/core/run.py,sha256=8HG8GTDGO2RW5NX9Pz7UU9qBwDQE_rbStpoOwNcIUqc,11452
|
|
335
336
|
rasa/core/secrets_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
336
337
|
rasa/core/secrets_manager/constants.py,sha256=dTDHenvG1JBVi34QIR6FpdO5RDOXQwAjAxLlgJ2ZNEI,1193
|
|
@@ -380,7 +381,7 @@ rasa/dialogue_understanding/commands/user_silence_command.py,sha256=QtqsMU5mrbUp
|
|
|
380
381
|
rasa/dialogue_understanding/commands/utils.py,sha256=OiyLFGEsrfFSIJcvBY6lTIIXqDY9OxaikVGtcl4Kokk,1911
|
|
381
382
|
rasa/dialogue_understanding/constants.py,sha256=YcELaIss69Hnroclvn90Dl4Suk3S6e3t0UoIbUaXG2A,83
|
|
382
383
|
rasa/dialogue_understanding/generator/__init__.py,sha256=Ykeb2wQ1DuiUWAWO0hLIPSTK1_Ktiq9DZXF6D3ugN78,764
|
|
383
|
-
rasa/dialogue_understanding/generator/command_generator.py,sha256=
|
|
384
|
+
rasa/dialogue_understanding/generator/command_generator.py,sha256=b7jXvNn8iCAxKqTKwdY4g0K2kLWEfbkyUqJkS2UbVjQ,16143
|
|
384
385
|
rasa/dialogue_understanding/generator/constants.py,sha256=9Nwjo2Qobioetr9SyyQxsGvEPSbKCVS5ZX1GGJtbA0E,716
|
|
385
386
|
rasa/dialogue_understanding/generator/flow_document_template.jinja2,sha256=f4H6vVd-_nX_RtutMh1xD3ZQE_J2OyuPHAtiltfiAPY,253
|
|
386
387
|
rasa/dialogue_understanding/generator/flow_retrieval.py,sha256=MkwUgQA9xRlAQUdWF2cBEX2tW2PQhBsq2Jsy2vmqWY4,17891
|
|
@@ -493,7 +494,7 @@ rasa/graph_components/providers/training_tracker_provider.py,sha256=nCHyLsiC8q3B
|
|
|
493
494
|
rasa/graph_components/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
494
495
|
rasa/graph_components/validators/default_recipe_validator.py,sha256=BHrF6NTfJz42xG1LfVjkP5CdQef4NTcmiiC8xtMemaI,24457
|
|
495
496
|
rasa/graph_components/validators/finetuning_validator.py,sha256=38AcwmV8cF5TIlWhUIzh98wtZf934ix04HcczCJiWkU,12863
|
|
496
|
-
rasa/hooks.py,sha256=
|
|
497
|
+
rasa/hooks.py,sha256=T_m4uGDRCRP8FS2hnieI8uIoD7u2VW3B9oiWjRcBoOk,3959
|
|
497
498
|
rasa/jupyter.py,sha256=x_GF9PK2zMhltb48GEIV9YZ4pRhCto8nV5SioYSCljI,1782
|
|
498
499
|
rasa/llm_fine_tuning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
499
500
|
rasa/llm_fine_tuning/annotation_module.py,sha256=wFmW3d6lI5o49OWmdbYQlgr24rqHDgA0T0hLM1pSb9U,8578
|
|
@@ -516,8 +517,8 @@ rasa/model.py,sha256=GH1-N6Po3gL3nwfa9eGoN2bMRNMrn4f3mi17-osW3T0,3491
|
|
|
516
517
|
rasa/model_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
517
518
|
rasa/model_manager/config.py,sha256=OzSx8c0Su8Q8wXTuCldeI7GDmB-wh43RL56Fq1-ESUM,1159
|
|
518
519
|
rasa/model_manager/model_api.py,sha256=MUqC2Tfdu857ALxOR55sgI5Tuow8JeIufjwU5slNhiw,20274
|
|
519
|
-
rasa/model_manager/runner_service.py,sha256=
|
|
520
|
-
rasa/model_manager/socket_bridge.py,sha256=
|
|
520
|
+
rasa/model_manager/runner_service.py,sha256=JaD_xu-zDfPWI6onvMlWdB9KBtH7-91KKbTf4vsKuTg,8710
|
|
521
|
+
rasa/model_manager/socket_bridge.py,sha256=vzpO4-Oh6ZvnOOCV-z1b65q8438H1ERTvtkgTSRJ-lE,4940
|
|
521
522
|
rasa/model_manager/studio_jwt_auth.py,sha256=eZ_srnbL2sKIKgx0OZIp29NbIrH2J8PlI8Or0lLg_Xo,2644
|
|
522
523
|
rasa/model_manager/trainer_service.py,sha256=90WYl4fclgPLcLfFgDOtai9VahZx_ikn20PIMg_eSQM,10347
|
|
523
524
|
rasa/model_manager/utils.py,sha256=tgj215CsJreqc4Ym8tAvv-hBieAC94nL0c4caPWIcZM,2643
|
|
@@ -583,10 +584,10 @@ rasa/nlu/utils/hugging_face/transformers_pre_post_processors.py,sha256=U8HrRWM1p
|
|
|
583
584
|
rasa/nlu/utils/mitie_utils.py,sha256=eupFltdG1nB8NXT4sh1pGJjDp0NKvlsKfPWYid6miGM,3887
|
|
584
585
|
rasa/nlu/utils/pattern_utils.py,sha256=nSOJmvsp6bF8HCCRb2Iaty71R0GfflJiuM4X_oK5hdQ,5386
|
|
585
586
|
rasa/nlu/utils/spacy_utils.py,sha256=pBvsCVKVuZ3b2Pjn-XuOVZ6lzZu9Voc2R4N1VczwtCM,11794
|
|
586
|
-
rasa/plugin.py,sha256=
|
|
587
|
+
rasa/plugin.py,sha256=OJYvgBHnNTywFmmn-gvHkjtFUmylnWcuDny5YjmrsDc,3071
|
|
587
588
|
rasa/server.py,sha256=eLRWFPoJrdc9_eNu0pUj9p52O8MR28zIm4ZP9_MWiH0,57899
|
|
588
589
|
rasa/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
589
|
-
rasa/shared/constants.py,sha256=
|
|
590
|
+
rasa/shared/constants.py,sha256=35e_ujygM9ONU9UObmU6KvrXVdZLlpfARzVfhXdqRV0,11732
|
|
590
591
|
rasa/shared/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
591
592
|
rasa/shared/core/command_payload_reader.py,sha256=Vhiop9LWFawaEruRifBBrVmoEJ-fj1Tli1wBvsYu2_I,3563
|
|
592
593
|
rasa/shared/core/constants.py,sha256=WNFzABG-eiVREBL6aDZAmcNDiSmuSbvWuxXIMoX2Iv8,5704
|
|
@@ -644,7 +645,7 @@ rasa/shared/importers/rasa.py,sha256=877EU8qPZSMBk5VAVAAUhfsh6vatRJrYOqWz1YGR6p8
|
|
|
644
645
|
rasa/shared/importers/remote_importer.py,sha256=fKLQskaCVPpD5cCMQ9sR71cZZlSIP-SSv3J3o2kra2w,7696
|
|
645
646
|
rasa/shared/importers/utils.py,sha256=Gi3BM5RUr-9nX_Ujf-g-tt19_bKPizmQIi6eAflDAmo,1289
|
|
646
647
|
rasa/shared/nlu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
647
|
-
rasa/shared/nlu/constants.py,sha256=
|
|
648
|
+
rasa/shared/nlu/constants.py,sha256=b3S7j61yL0jrqQ8_EaQerpzIJSAAoi6OzBlYGZrIDus,1895
|
|
648
649
|
rasa/shared/nlu/interpreter.py,sha256=eCNJp61nQYTGVf4aJi8SCWb46jxZY6-C1M1LFxMyQTM,188
|
|
649
650
|
rasa/shared/nlu/training_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
650
651
|
rasa/shared/nlu/training_data/entities_parser.py,sha256=fC-VIso07so6E9b6KrQXOBC-ZUGCQGvnMvzVwiAO1GQ,6729
|
|
@@ -777,9 +778,9 @@ rasa/utils/train_utils.py,sha256=f1NWpp5y6al0dzoQyyio4hc4Nf73DRoRSHDzEK6-C4E,212
|
|
|
777
778
|
rasa/utils/url_tools.py,sha256=JQcHL2aLqLHu82k7_d9imUoETCm2bmlHaDpOJ-dKqBc,1218
|
|
778
779
|
rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
|
|
779
780
|
rasa/validator.py,sha256=wl5IKiyDmk6FlDcGO2Js-H-gHPeqVqUJ6hB4fgN0xjI,66796
|
|
780
|
-
rasa/version.py,sha256=
|
|
781
|
-
rasa_pro-3.11.3a1.
|
|
782
|
-
rasa_pro-3.11.3a1.
|
|
783
|
-
rasa_pro-3.11.3a1.
|
|
784
|
-
rasa_pro-3.11.3a1.
|
|
785
|
-
rasa_pro-3.11.3a1.
|
|
781
|
+
rasa/version.py,sha256=sC8Ac4F7SMEWBdNHVJqaHXvjVQkFIjvFzczIKz8giGI,124
|
|
782
|
+
rasa_pro-3.11.3a1.dev7.dist-info/METADATA,sha256=5N7yD6hu3L1w1ZtDJcRYm1-JSXtvbIXkDDOf0wMpGpM,10798
|
|
783
|
+
rasa_pro-3.11.3a1.dev7.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
|
|
784
|
+
rasa_pro-3.11.3a1.dev7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
785
|
+
rasa_pro-3.11.3a1.dev7.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
|
|
786
|
+
rasa_pro-3.11.3a1.dev7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|