rasa-pro 3.12.0.dev8__py3-none-any.whl → 3.12.0.dev9__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/shared/providers/llm/_base_litellm_client.py +3 -3
- rasa/shared/utils/llm.py +12 -6
- rasa/version.py +1 -1
- {rasa_pro-3.12.0.dev8.dist-info → rasa_pro-3.12.0.dev9.dist-info}/METADATA +1 -1
- {rasa_pro-3.12.0.dev8.dist-info → rasa_pro-3.12.0.dev9.dist-info}/RECORD +8 -8
- {rasa_pro-3.12.0.dev8.dist-info → rasa_pro-3.12.0.dev9.dist-info}/NOTICE +0 -0
- {rasa_pro-3.12.0.dev8.dist-info → rasa_pro-3.12.0.dev9.dist-info}/WHEEL +0 -0
- {rasa_pro-3.12.0.dev8.dist-info → rasa_pro-3.12.0.dev9.dist-info}/entry_points.txt +0 -0
|
@@ -181,9 +181,10 @@ class _BaseLiteLLMClient:
|
|
|
181
181
|
)
|
|
182
182
|
raise ProviderClientAPIException(e, message)
|
|
183
183
|
|
|
184
|
-
|
|
185
184
|
@suppress_logs(log_level=logging.WARNING)
|
|
186
|
-
async def acompletion_with_system(
|
|
185
|
+
async def acompletion_with_system(
|
|
186
|
+
self, formatted_messages: Union[List[str], str]
|
|
187
|
+
) -> LLMResponse:
|
|
187
188
|
"""Asynchronously generate completions for given list of messages.
|
|
188
189
|
|
|
189
190
|
Args:
|
|
@@ -220,7 +221,6 @@ class _BaseLiteLLMClient:
|
|
|
220
221
|
)
|
|
221
222
|
raise ProviderClientAPIException(e, message)
|
|
222
223
|
|
|
223
|
-
|
|
224
224
|
def _format_messages(self, messages: Union[List[str], str]) -> List[Dict[str, str]]:
|
|
225
225
|
"""Formats messages (or a single message) to OpenAI format."""
|
|
226
226
|
if isinstance(messages, str):
|
rasa/shared/utils/llm.py
CHANGED
|
@@ -6,13 +6,13 @@ from typing import (
|
|
|
6
6
|
Any,
|
|
7
7
|
Callable,
|
|
8
8
|
Dict,
|
|
9
|
+
List,
|
|
9
10
|
Optional,
|
|
10
11
|
Text,
|
|
11
12
|
Type,
|
|
12
13
|
TypeVar,
|
|
13
14
|
Union,
|
|
14
15
|
cast,
|
|
15
|
-
List,
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
import structlog
|
|
@@ -259,6 +259,7 @@ def sanitize_command_for_prompt(cmd_dict):
|
|
|
259
259
|
|
|
260
260
|
return command
|
|
261
261
|
|
|
262
|
+
|
|
262
263
|
def tracker_as_message_list(
|
|
263
264
|
tracker: "DialogueStateTracker",
|
|
264
265
|
max_turns: Optional[int] = 20,
|
|
@@ -289,7 +290,7 @@ def tracker_as_message_list(
|
|
|
289
290
|
|
|
290
291
|
# using `applied_events` rather than `events` means that only events after the
|
|
291
292
|
# most recent `Restart` or `SessionStarted` are included in the transcript
|
|
292
|
-
last_commands = None
|
|
293
|
+
# last_commands = None
|
|
293
294
|
for event in tracker.applied_events():
|
|
294
295
|
if isinstance(event, UserUttered):
|
|
295
296
|
if event.has_triggered_error:
|
|
@@ -300,14 +301,19 @@ def tracker_as_message_list(
|
|
|
300
301
|
)
|
|
301
302
|
else:
|
|
302
303
|
message = sanitize_message_for_prompt(event.text)
|
|
303
|
-
last_commands = event.commands
|
|
304
|
+
# last_commands = event.commands
|
|
304
305
|
messages.append({"role": "user", "content": message})
|
|
305
|
-
# messages.append({"role": "system", "content": ' \n '.join([sanitize_command_for_prompt(cmd) for cmd in last_commands])})
|
|
306
|
+
# messages.append({"role": "system", "content": ' \n '.join([sanitize_command_for_prompt(cmd) for cmd in last_commands])}) # noqa: E501
|
|
306
307
|
# transcript.append(f"{human_prefix}: {message}")
|
|
307
308
|
|
|
308
309
|
elif isinstance(event, BotUttered):
|
|
309
|
-
messages.append(
|
|
310
|
-
|
|
310
|
+
messages.append(
|
|
311
|
+
{
|
|
312
|
+
"role": "assistant",
|
|
313
|
+
"content": f"{sanitize_message_for_prompt(event.text)}",
|
|
314
|
+
}
|
|
315
|
+
)
|
|
316
|
+
# transcript.append(f"{ai_prefix}: {sanitize_message_for_prompt(event.text)}") # noqa: E501
|
|
311
317
|
|
|
312
318
|
if max_turns:
|
|
313
319
|
messages = messages[-max_turns:]
|
rasa/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rasa-pro
|
|
3
|
-
Version: 3.12.0.
|
|
3
|
+
Version: 3.12.0.dev9
|
|
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
|
|
@@ -715,7 +715,7 @@ rasa/shared/providers/embedding/huggingface_local_embedding_client.py,sha256=Zo3
|
|
|
715
715
|
rasa/shared/providers/embedding/litellm_router_embedding_client.py,sha256=Y5XNwWl1kxoOLs8ZMY3nhPn__XSPOeg8ED-dQQuegF4,4517
|
|
716
716
|
rasa/shared/providers/embedding/openai_embedding_client.py,sha256=XNRGE7apo2v3kWRrtgxE-Gq4rvNko3IiXtvgC4krDYE,5429
|
|
717
717
|
rasa/shared/providers/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
718
|
-
rasa/shared/providers/llm/_base_litellm_client.py,sha256=
|
|
718
|
+
rasa/shared/providers/llm/_base_litellm_client.py,sha256=CwxV-3zAFAgxYAfHkbUhAvFWlcbd2u8aqb8X5WdT8FU,11703
|
|
719
719
|
rasa/shared/providers/llm/azure_openai_llm_client.py,sha256=HBm5f_bPwOXP2N-zEMfnhAdMQxDHGHp8JKC62gnj4mg,12976
|
|
720
720
|
rasa/shared/providers/llm/default_litellm_llm_client.py,sha256=Gu9l-RNaKXAUsEmG8DIIGSPHtW9vMEyVNWvOVADiJcU,3940
|
|
721
721
|
rasa/shared/providers/llm/litellm_router_llm_client.py,sha256=hPYGMZUUjpnRCFNvHSSuaKK_OxHV2spr9eItkwYYnBI,6816
|
|
@@ -737,7 +737,7 @@ rasa/shared/utils/health_check/embeddings_health_check_mixin.py,sha256=ASOzDtI3i
|
|
|
737
737
|
rasa/shared/utils/health_check/health_check.py,sha256=izixrbc9BxFSsjzwoIw9U0w0VKSX5gMwhey8bcwe1wc,9709
|
|
738
738
|
rasa/shared/utils/health_check/llm_health_check_mixin.py,sha256=ANP5Q68TRX8p4wWkRCAISsWBV1iYYeGnqWILnR1NawE,957
|
|
739
739
|
rasa/shared/utils/io.py,sha256=AhuECoXGO367NvWRCBu99utEtTQnyxWVJyKOOpLePpg,15917
|
|
740
|
-
rasa/shared/utils/llm.py,sha256=
|
|
740
|
+
rasa/shared/utils/llm.py,sha256=rgYEjdbMXp0nUJXrhXmvCChXZzH3QtADY9IXM4EeAPE,28455
|
|
741
741
|
rasa/shared/utils/pykwalify_extensions.py,sha256=36vfuD9gSreZvMIZ_qIPpykXhYGuZu2BpoEMVX50Is4,883
|
|
742
742
|
rasa/shared/utils/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
743
743
|
rasa/shared/utils/schemas/config.yml,sha256=czxSADw9hOIZdhvFP8pVUQo810hs9_C8ZGfCPx17taM,27
|
|
@@ -801,9 +801,9 @@ rasa/utils/train_utils.py,sha256=ClJx-6x3-h3Vt6mskacgkcCUJTMXjFPe3zAcy_DfmaU,212
|
|
|
801
801
|
rasa/utils/url_tools.py,sha256=dZ1HGkVdWTJB7zYEdwoDIrEuyX9HE5WsxKKFVsXBLE0,1218
|
|
802
802
|
rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
|
|
803
803
|
rasa/validator.py,sha256=Uh5R1JDmIRl0aNprh9FfHND8UKiNJTNYBrMdBDVxEFM,67516
|
|
804
|
-
rasa/version.py,sha256=
|
|
805
|
-
rasa_pro-3.12.0.
|
|
806
|
-
rasa_pro-3.12.0.
|
|
807
|
-
rasa_pro-3.12.0.
|
|
808
|
-
rasa_pro-3.12.0.
|
|
809
|
-
rasa_pro-3.12.0.
|
|
804
|
+
rasa/version.py,sha256=qcAHxWgFY5aqvH50NTP65caloSkSJzqEtt_Ot16T45I,122
|
|
805
|
+
rasa_pro-3.12.0.dev9.dist-info/METADATA,sha256=krUZcbUYLAse0nHTYflyjwWmCcRvkm0qHLwUNe2C9gU,10730
|
|
806
|
+
rasa_pro-3.12.0.dev9.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
|
|
807
|
+
rasa_pro-3.12.0.dev9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
808
|
+
rasa_pro-3.12.0.dev9.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
|
|
809
|
+
rasa_pro-3.12.0.dev9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|