rasa-pro 3.10.24__py3-none-any.whl → 3.10.26__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/nlg/contextual_response_rephraser.py +58 -13
- rasa/core/nlg/summarize.py +37 -5
- rasa/core/policies/enterprise_search_policy.py +8 -5
- rasa/core/policies/intentless_policy.py +13 -6
- rasa/dialogue_understanding/coexistence/llm_based_router.py +11 -6
- rasa/dialogue_understanding/generator/constants.py +6 -4
- rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +1 -1
- rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +1 -1
- rasa/dialogue_understanding/processor/command_processor_component.py +3 -2
- rasa/engine/recipes/default_recipe.py +26 -2
- rasa/llm_fine_tuning/paraphrasing/conversation_rephraser.py +6 -4
- rasa/nlu/extractors/crf_entity_extractor.py +69 -19
- rasa/shared/constants.py +6 -0
- rasa/shared/providers/_configs/azure_openai_client_config.py +14 -10
- rasa/shared/providers/_configs/openai_client_config.py +13 -9
- rasa/shared/providers/embedding/_base_litellm_embedding_client.py +3 -0
- rasa/shared/providers/llm/_base_litellm_client.py +5 -2
- rasa/shared/utils/llm.py +8 -2
- rasa/telemetry.py +1 -1
- rasa/version.py +1 -1
- {rasa_pro-3.10.24.dist-info → rasa_pro-3.10.26.dist-info}/METADATA +3 -3
- {rasa_pro-3.10.24.dist-info → rasa_pro-3.10.26.dist-info}/RECORD +25 -25
- {rasa_pro-3.10.24.dist-info → rasa_pro-3.10.26.dist-info}/NOTICE +0 -0
- {rasa_pro-3.10.24.dist-info → rasa_pro-3.10.26.dist-info}/WHEEL +0 -0
- {rasa_pro-3.10.24.dist-info → rasa_pro-3.10.26.dist-info}/entry_points.txt +0 -0
|
@@ -5,13 +5,19 @@ from jinja2 import Template
|
|
|
5
5
|
|
|
6
6
|
from rasa import telemetry
|
|
7
7
|
from rasa.core.nlg.response import TemplatedNaturalLanguageGenerator
|
|
8
|
+
from rasa.core.nlg.summarize import (
|
|
9
|
+
_count_multiple_utterances_as_single_turn,
|
|
10
|
+
summarize_conversation,
|
|
11
|
+
)
|
|
8
12
|
from rasa.shared.constants import (
|
|
9
13
|
LLM_CONFIG_KEY,
|
|
14
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
10
15
|
MODEL_CONFIG_KEY,
|
|
11
16
|
MODEL_NAME_CONFIG_KEY,
|
|
17
|
+
OPENAI_PROVIDER,
|
|
12
18
|
PROMPT_CONFIG_KEY,
|
|
13
19
|
PROVIDER_CONFIG_KEY,
|
|
14
|
-
|
|
20
|
+
TEMPERATURE_CONFIG_KEY,
|
|
15
21
|
TIMEOUT_CONFIG_KEY,
|
|
16
22
|
)
|
|
17
23
|
from rasa.shared.core.domain import KEY_RESPONSES_TEXT, Domain
|
|
@@ -24,11 +30,10 @@ from rasa.shared.utils.llm import (
|
|
|
24
30
|
combine_custom_and_default_config,
|
|
25
31
|
get_prompt_template,
|
|
26
32
|
llm_factory,
|
|
27
|
-
|
|
33
|
+
tracker_as_readable_transcript,
|
|
28
34
|
)
|
|
29
35
|
from rasa.utils.endpoints import EndpointConfig
|
|
30
36
|
|
|
31
|
-
from rasa.core.nlg.summarize import summarize_conversation
|
|
32
37
|
|
|
33
38
|
from rasa.utils.log_utils import log_llm
|
|
34
39
|
|
|
@@ -39,12 +44,15 @@ RESPONSE_REPHRASING_KEY = "rephrase"
|
|
|
39
44
|
RESPONSE_REPHRASING_TEMPLATE_KEY = "rephrase_prompt"
|
|
40
45
|
|
|
41
46
|
DEFAULT_REPHRASE_ALL = False
|
|
47
|
+
DEFAULT_SUMMARIZE_HISTORY = True
|
|
48
|
+
DEFAULT_MAX_HISTORICAL_TURNS = 5
|
|
49
|
+
DEFAULT_COUNT_MULTIPLE_UTTERANCES_AS_SINGLE_TURN = True
|
|
42
50
|
|
|
43
51
|
DEFAULT_LLM_CONFIG = {
|
|
44
52
|
PROVIDER_CONFIG_KEY: OPENAI_PROVIDER,
|
|
45
53
|
MODEL_CONFIG_KEY: DEFAULT_OPENAI_GENERATE_MODEL_NAME,
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
TEMPERATURE_CONFIG_KEY: 0.3,
|
|
55
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY: DEFAULT_OPENAI_MAX_GENERATED_TOKENS,
|
|
48
56
|
TIMEOUT_CONFIG_KEY: 5,
|
|
49
57
|
}
|
|
50
58
|
|
|
@@ -56,6 +64,7 @@ its meaning. Use simple english.
|
|
|
56
64
|
Context / previous conversation with the user:
|
|
57
65
|
{{history}}
|
|
58
66
|
|
|
67
|
+
Last user message:
|
|
59
68
|
{{current_input}}
|
|
60
69
|
|
|
61
70
|
Suggested AI Response: {{suggested_response}}
|
|
@@ -97,11 +106,21 @@ class ContextualResponseRephraser(TemplatedNaturalLanguageGenerator):
|
|
|
97
106
|
self.trace_prompt_tokens = self.nlg_endpoint.kwargs.get(
|
|
98
107
|
"trace_prompt_tokens", False
|
|
99
108
|
)
|
|
100
|
-
|
|
109
|
+
self.summarize_history = self.nlg_endpoint.kwargs.get(
|
|
110
|
+
"summarize_history", DEFAULT_SUMMARIZE_HISTORY
|
|
111
|
+
)
|
|
112
|
+
self.max_historical_turns = self.nlg_endpoint.kwargs.get(
|
|
113
|
+
"max_historical_turns", DEFAULT_MAX_HISTORICAL_TURNS
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
self.count_multiple_utterances_as_single_turn = self.nlg_endpoint.kwargs.get(
|
|
117
|
+
"count_multiple_utterances_as_single_turn",
|
|
118
|
+
DEFAULT_COUNT_MULTIPLE_UTTERANCES_AS_SINGLE_TURN,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
self.llm_config = combine_custom_and_default_config(
|
|
101
122
|
self.nlg_endpoint.kwargs.get(LLM_CONFIG_KEY),
|
|
102
123
|
DEFAULT_LLM_CONFIG,
|
|
103
|
-
"contextual_response_rephraser.init",
|
|
104
|
-
"ContextualResponseRephraser",
|
|
105
124
|
)
|
|
106
125
|
|
|
107
126
|
def _last_message_if_human(self, tracker: DialogueStateTracker) -> Optional[str]:
|
|
@@ -180,10 +199,16 @@ class ContextualResponseRephraser(TemplatedNaturalLanguageGenerator):
|
|
|
180
199
|
Returns:
|
|
181
200
|
The history for the prompt.
|
|
182
201
|
"""
|
|
183
|
-
|
|
184
|
-
|
|
202
|
+
# Count multiple utterances by bot/user as single turn in conversation history
|
|
203
|
+
turns_wrapper = (
|
|
204
|
+
_count_multiple_utterances_as_single_turn
|
|
205
|
+
if self.count_multiple_utterances_as_single_turn
|
|
206
|
+
else None
|
|
207
|
+
)
|
|
208
|
+
llm = llm_factory(self.llm_config, DEFAULT_LLM_CONFIG)
|
|
209
|
+
return await summarize_conversation(
|
|
210
|
+
tracker, llm, max_turns=5, turns_wrapper=turns_wrapper
|
|
185
211
|
)
|
|
186
|
-
return await summarize_conversation(tracker, llm, max_turns=5)
|
|
187
212
|
|
|
188
213
|
async def rephrase(
|
|
189
214
|
self,
|
|
@@ -195,7 +220,6 @@ class ContextualResponseRephraser(TemplatedNaturalLanguageGenerator):
|
|
|
195
220
|
Args:
|
|
196
221
|
response: The response to rephrase.
|
|
197
222
|
tracker: The tracker to use for the prediction.
|
|
198
|
-
model_name: The name of the model to use for the prediction.
|
|
199
223
|
|
|
200
224
|
Returns:
|
|
201
225
|
The response with the rephrased text.
|
|
@@ -208,8 +232,29 @@ class ContextualResponseRephraser(TemplatedNaturalLanguageGenerator):
|
|
|
208
232
|
|
|
209
233
|
prompt_template_text = self._template_for_response_rephrasing(response)
|
|
210
234
|
|
|
235
|
+
# Last user message (=current input) should always be in prompt if available
|
|
236
|
+
last_message_by_user = getattr(tracker.latest_message, "text", "")
|
|
237
|
+
current_input = (
|
|
238
|
+
f"{USER}: {last_message_by_user}" if last_message_by_user else ""
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
# Only summarise conversation history if flagged
|
|
242
|
+
if self.summarize_history:
|
|
243
|
+
history = await self._create_history(tracker)
|
|
244
|
+
else:
|
|
245
|
+
# Count multiple utterances by bot/user as single turn
|
|
246
|
+
turns_wrapper = (
|
|
247
|
+
_count_multiple_utterances_as_single_turn
|
|
248
|
+
if self.count_multiple_utterances_as_single_turn
|
|
249
|
+
else None
|
|
250
|
+
)
|
|
251
|
+
max_turns = max(self.max_historical_turns, 1)
|
|
252
|
+
history = tracker_as_readable_transcript(
|
|
253
|
+
tracker, max_turns=max_turns, turns_wrapper=turns_wrapper
|
|
254
|
+
)
|
|
255
|
+
|
|
211
256
|
prompt = Template(prompt_template_text).render(
|
|
212
|
-
history=
|
|
257
|
+
history=history,
|
|
213
258
|
suggested_response=response_text,
|
|
214
259
|
current_input=current_input,
|
|
215
260
|
slots=tracker.current_slot_values(),
|
rasa/core/nlg/summarize.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
from
|
|
1
|
+
from itertools import groupby
|
|
2
|
+
from typing import Callable, List, Optional
|
|
2
3
|
|
|
3
4
|
import structlog
|
|
4
5
|
from jinja2 import Template
|
|
@@ -22,20 +23,47 @@ SUMMARY_PROMPT_TEMPLATE = Template(_DEFAULT_SUMMARIZER_TEMPLATE)
|
|
|
22
23
|
MAX_TURNS_DEFAULT = 20
|
|
23
24
|
|
|
24
25
|
|
|
26
|
+
def _count_multiple_utterances_as_single_turn(transcript: List[str]) -> List[str]:
|
|
27
|
+
"""Counts multiple utterances as a single turn.
|
|
28
|
+
Args:
|
|
29
|
+
transcript: the lines of the transcript
|
|
30
|
+
Returns:
|
|
31
|
+
transcript: with multiple utterances counted as a single turn
|
|
32
|
+
"""
|
|
33
|
+
if not transcript:
|
|
34
|
+
return []
|
|
35
|
+
|
|
36
|
+
def get_speaker_label(line: str) -> str:
|
|
37
|
+
return line.partition(": ")[0] if ": " in line else ""
|
|
38
|
+
|
|
39
|
+
modified_transcript = [
|
|
40
|
+
f"{speaker}: {' '.join(line.partition(': ')[2] for line in group)}"
|
|
41
|
+
for speaker, group in groupby(transcript, key=get_speaker_label)
|
|
42
|
+
if speaker
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
return modified_transcript
|
|
46
|
+
|
|
47
|
+
|
|
25
48
|
def _create_summarization_prompt(
|
|
26
|
-
tracker: DialogueStateTracker,
|
|
49
|
+
tracker: DialogueStateTracker,
|
|
50
|
+
max_turns: Optional[int],
|
|
51
|
+
turns_wrapper: Optional[Callable[[List[str]], List[str]]],
|
|
27
52
|
) -> str:
|
|
28
53
|
"""Creates an LLM prompt to summarize the conversation in the tracker.
|
|
29
54
|
|
|
30
55
|
Args:
|
|
31
56
|
tracker: tracker of the conversation to be summarized
|
|
32
57
|
max_turns: maximum number of turns to summarize
|
|
58
|
+
turns_wrapper: optional function to wrap the turns
|
|
33
59
|
|
|
34
60
|
|
|
35
61
|
Returns:
|
|
36
62
|
The prompt to summarize the conversation.
|
|
37
63
|
"""
|
|
38
|
-
transcript = tracker_as_readable_transcript(
|
|
64
|
+
transcript = tracker_as_readable_transcript(
|
|
65
|
+
tracker, max_turns=max_turns, turns_wrapper=turns_wrapper
|
|
66
|
+
)
|
|
39
67
|
return SUMMARY_PROMPT_TEMPLATE.render(
|
|
40
68
|
conversation=transcript,
|
|
41
69
|
)
|
|
@@ -45,6 +73,7 @@ async def summarize_conversation(
|
|
|
45
73
|
tracker: DialogueStateTracker,
|
|
46
74
|
llm: LLMClient,
|
|
47
75
|
max_turns: Optional[int] = MAX_TURNS_DEFAULT,
|
|
76
|
+
turns_wrapper: Optional[Callable[[List[str]], List[str]]] = None,
|
|
48
77
|
) -> str:
|
|
49
78
|
"""Summarizes the dialogue using the LLM.
|
|
50
79
|
|
|
@@ -52,11 +81,12 @@ async def summarize_conversation(
|
|
|
52
81
|
tracker: the tracker to summarize
|
|
53
82
|
llm: the LLM to use for summarization
|
|
54
83
|
max_turns: maximum number of turns to summarize
|
|
84
|
+
turns_wrapper: optional function to wrap the turns
|
|
55
85
|
|
|
56
86
|
Returns:
|
|
57
87
|
The summary of the dialogue.
|
|
58
88
|
"""
|
|
59
|
-
prompt = _create_summarization_prompt(tracker, max_turns)
|
|
89
|
+
prompt = _create_summarization_prompt(tracker, max_turns, turns_wrapper)
|
|
60
90
|
try:
|
|
61
91
|
llm_response = await llm.acompletion(prompt)
|
|
62
92
|
summarization = llm_response.choices[0].strip()
|
|
@@ -65,6 +95,8 @@ async def summarize_conversation(
|
|
|
65
95
|
)
|
|
66
96
|
return summarization
|
|
67
97
|
except Exception as e:
|
|
68
|
-
transcript = tracker_as_readable_transcript(
|
|
98
|
+
transcript = tracker_as_readable_transcript(
|
|
99
|
+
tracker, max_turns=max_turns, turns_wrapper=turns_wrapper
|
|
100
|
+
)
|
|
69
101
|
structlogger.error("summarization.error", error=e)
|
|
70
102
|
return transcript
|
|
@@ -48,11 +48,14 @@ from rasa.graph_components.providers.responses_provider import Responses
|
|
|
48
48
|
from rasa.shared.constants import (
|
|
49
49
|
EMBEDDINGS_CONFIG_KEY,
|
|
50
50
|
LLM_CONFIG_KEY,
|
|
51
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
52
|
+
MAX_RETRIES_CONFIG_KEY,
|
|
51
53
|
MODEL_CONFIG_KEY,
|
|
52
54
|
MODEL_NAME_CONFIG_KEY,
|
|
55
|
+
OPENAI_PROVIDER,
|
|
53
56
|
PROMPT_CONFIG_KEY,
|
|
54
57
|
PROVIDER_CONFIG_KEY,
|
|
55
|
-
|
|
58
|
+
TEMPERATURE_CONFIG_KEY,
|
|
56
59
|
TIMEOUT_CONFIG_KEY,
|
|
57
60
|
)
|
|
58
61
|
from rasa.shared.core.constants import (
|
|
@@ -117,14 +120,14 @@ DEFAULT_LLM_CONFIG = {
|
|
|
117
120
|
PROVIDER_CONFIG_KEY: OPENAI_PROVIDER,
|
|
118
121
|
MODEL_CONFIG_KEY: DEFAULT_OPENAI_CHAT_MODEL_NAME,
|
|
119
122
|
TIMEOUT_CONFIG_KEY: 10,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
TEMPERATURE_CONFIG_KEY: 0.0,
|
|
124
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY: 256,
|
|
125
|
+
MAX_RETRIES_CONFIG_KEY: 1,
|
|
123
126
|
}
|
|
124
127
|
|
|
125
128
|
DEFAULT_EMBEDDINGS_CONFIG = {
|
|
126
129
|
PROVIDER_CONFIG_KEY: OPENAI_PROVIDER,
|
|
127
|
-
|
|
130
|
+
MODEL_CONFIG_KEY: DEFAULT_OPENAI_EMBEDDING_MODEL_NAME,
|
|
128
131
|
}
|
|
129
132
|
|
|
130
133
|
ENTERPRISE_SEARCH_PROMPT_FILE_NAME = "enterprise_search_policy_prompt.jinja2"
|
|
@@ -31,11 +31,13 @@ from rasa.graph_components.providers.responses_provider import Responses
|
|
|
31
31
|
from rasa.shared.constants import (
|
|
32
32
|
EMBEDDINGS_CONFIG_KEY,
|
|
33
33
|
LLM_CONFIG_KEY,
|
|
34
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
34
35
|
MODEL_CONFIG_KEY,
|
|
35
36
|
MODEL_NAME_CONFIG_KEY,
|
|
37
|
+
OPENAI_PROVIDER,
|
|
36
38
|
PROMPT_CONFIG_KEY,
|
|
37
39
|
PROVIDER_CONFIG_KEY,
|
|
38
|
-
|
|
40
|
+
TEMPERATURE_CONFIG_KEY,
|
|
39
41
|
TIMEOUT_CONFIG_KEY,
|
|
40
42
|
)
|
|
41
43
|
from rasa.shared.core.constants import ACTION_LISTEN_NAME
|
|
@@ -106,14 +108,14 @@ NLU_ABSTENTION_THRESHOLD = "nlu_abstention_threshold"
|
|
|
106
108
|
DEFAULT_LLM_CONFIG = {
|
|
107
109
|
PROVIDER_CONFIG_KEY: OPENAI_PROVIDER,
|
|
108
110
|
MODEL_CONFIG_KEY: DEFAULT_OPENAI_CHAT_MODEL_NAME,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
TEMPERATURE_CONFIG_KEY: 0.0,
|
|
112
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY: DEFAULT_OPENAI_MAX_GENERATED_TOKENS,
|
|
111
113
|
TIMEOUT_CONFIG_KEY: 5,
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
DEFAULT_EMBEDDINGS_CONFIG = {
|
|
115
117
|
PROVIDER_CONFIG_KEY: OPENAI_PROVIDER,
|
|
116
|
-
|
|
118
|
+
MODEL_CONFIG_KEY: DEFAULT_OPENAI_EMBEDDING_MODEL_NAME,
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
DEFAULT_INTENTLESS_PROMPT_TEMPLATE = importlib.resources.open_text(
|
|
@@ -338,8 +340,6 @@ class IntentlessPolicy(Policy):
|
|
|
338
340
|
# ensures that the policy will not override a deterministic policy
|
|
339
341
|
# which utilizes the nlu predictions confidence (e.g. Memoization).
|
|
340
342
|
NLU_ABSTENTION_THRESHOLD: 0.9,
|
|
341
|
-
LLM_CONFIG_KEY: DEFAULT_LLM_CONFIG,
|
|
342
|
-
EMBEDDINGS_CONFIG_KEY: DEFAULT_EMBEDDINGS_CONFIG,
|
|
343
343
|
PROMPT_CONFIG_KEY: DEFAULT_INTENTLESS_PROMPT_TEMPLATE,
|
|
344
344
|
}
|
|
345
345
|
|
|
@@ -374,6 +374,13 @@ class IntentlessPolicy(Policy):
|
|
|
374
374
|
"""Constructs a new Policy object."""
|
|
375
375
|
super().__init__(config, model_storage, resource, execution_context, featurizer)
|
|
376
376
|
|
|
377
|
+
self.config[LLM_CONFIG_KEY] = combine_custom_and_default_config(
|
|
378
|
+
self.config.get(LLM_CONFIG_KEY), DEFAULT_LLM_CONFIG
|
|
379
|
+
)
|
|
380
|
+
self.config[EMBEDDINGS_CONFIG_KEY] = combine_custom_and_default_config(
|
|
381
|
+
self.config.get(EMBEDDINGS_CONFIG_KEY), DEFAULT_EMBEDDINGS_CONFIG
|
|
382
|
+
)
|
|
383
|
+
|
|
377
384
|
self.nlu_abstention_threshold: float = self.config[NLU_ABSTENTION_THRESHOLD]
|
|
378
385
|
self.response_index = responses_docsearch
|
|
379
386
|
self.conversation_samples_index = samples_docsearch
|
|
@@ -21,11 +21,14 @@ from rasa.engine.recipes.default_recipe import DefaultV1Recipe
|
|
|
21
21
|
from rasa.engine.storage.resource import Resource
|
|
22
22
|
from rasa.engine.storage.storage import ModelStorage
|
|
23
23
|
from rasa.shared.constants import (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
PROVIDER_CONFIG_KEY,
|
|
24
|
+
LOGIT_BIAS_CONFIG_KEY,
|
|
25
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
27
26
|
MODEL_CONFIG_KEY,
|
|
28
27
|
OPENAI_PROVIDER,
|
|
28
|
+
PROMPT_CONFIG_KEY,
|
|
29
|
+
PROVIDER_CONFIG_KEY,
|
|
30
|
+
ROUTE_TO_CALM_SLOT,
|
|
31
|
+
TEMPERATURE_CONFIG_KEY,
|
|
29
32
|
TIMEOUT_CONFIG_KEY,
|
|
30
33
|
)
|
|
31
34
|
from rasa.shared.core.trackers import DialogueStateTracker
|
|
@@ -57,9 +60,11 @@ DEFAULT_LLM_CONFIG = {
|
|
|
57
60
|
PROVIDER_CONFIG_KEY: OPENAI_PROVIDER,
|
|
58
61
|
MODEL_CONFIG_KEY: DEFAULT_OPENAI_CHAT_MODEL_NAME,
|
|
59
62
|
TIMEOUT_CONFIG_KEY: 7,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
TEMPERATURE_CONFIG_KEY: 0.0,
|
|
64
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY: 1,
|
|
65
|
+
LOGIT_BIAS_CONFIG_KEY: {
|
|
66
|
+
str(token_id): 100 for token_id in A_TO_C_TOKEN_IDS_CHATGPT
|
|
67
|
+
},
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
structlogger = structlog.get_logger()
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
from rasa.shared.constants import (
|
|
2
|
-
|
|
3
|
-
OPENAI_PROVIDER,
|
|
2
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
4
3
|
MODEL_CONFIG_KEY,
|
|
4
|
+
OPENAI_PROVIDER,
|
|
5
|
+
PROVIDER_CONFIG_KEY,
|
|
6
|
+
TEMPERATURE_CONFIG_KEY,
|
|
5
7
|
TIMEOUT_CONFIG_KEY,
|
|
6
8
|
)
|
|
7
9
|
from rasa.shared.utils.llm import (
|
|
@@ -12,8 +14,8 @@ from rasa.shared.utils.llm import (
|
|
|
12
14
|
DEFAULT_LLM_CONFIG = {
|
|
13
15
|
PROVIDER_CONFIG_KEY: OPENAI_PROVIDER,
|
|
14
16
|
MODEL_CONFIG_KEY: DEFAULT_OPENAI_CHAT_MODEL_NAME_ADVANCED,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
TEMPERATURE_CONFIG_KEY: 0.0,
|
|
18
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY: DEFAULT_OPENAI_MAX_GENERATED_TOKENS,
|
|
17
19
|
TIMEOUT_CONFIG_KEY: 7,
|
|
18
20
|
}
|
|
19
21
|
|
|
@@ -246,7 +246,7 @@ class MultiStepLLMCommandGenerator(LLMBasedCommandGenerator):
|
|
|
246
246
|
skip_question_re = re.compile(r"SkipQuestion\(\)")
|
|
247
247
|
knowledge_re = re.compile(r"SearchAndReply\(\)")
|
|
248
248
|
humand_handoff_re = re.compile(r"HumanHandoff\(\)")
|
|
249
|
-
clarify_re = re.compile(r"Clarify\(([\"\'a-zA-Z0-9_
|
|
249
|
+
clarify_re = re.compile(r"Clarify\(([\"\'a-zA-Z0-9_\-, ]+)\)")
|
|
250
250
|
cannot_handle_re = re.compile(r"CannotHandle\(\)")
|
|
251
251
|
|
|
252
252
|
for action in actions.strip().splitlines():
|
|
@@ -308,7 +308,7 @@ class SingleStepLLMCommandGenerator(LLMBasedCommandGenerator):
|
|
|
308
308
|
skip_question_re = re.compile(r"SkipQuestion\(\)")
|
|
309
309
|
knowledge_re = re.compile(r"SearchAndReply\(\)")
|
|
310
310
|
humand_handoff_re = re.compile(r"HumanHandoff\(\)")
|
|
311
|
-
clarify_re = re.compile(r"Clarify\(([\"\'a-zA-Z0-9_
|
|
311
|
+
clarify_re = re.compile(r"Clarify\(([\"\'a-zA-Z0-9_\-, ]+)\)")
|
|
312
312
|
|
|
313
313
|
for action in actions.strip().splitlines():
|
|
314
314
|
if match := slot_set_re.search(action):
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from typing import Any, Dict, List, Text
|
|
3
|
+
from typing import Any, Dict, List, Optional, Text
|
|
4
|
+
|
|
4
5
|
import rasa.dialogue_understanding.processor.command_processor
|
|
5
6
|
|
|
6
7
|
from rasa.engine.graph import ExecutionContext, GraphComponent
|
|
@@ -37,8 +38,8 @@ class CommandProcessorComponent(GraphComponent):
|
|
|
37
38
|
self,
|
|
38
39
|
tracker: DialogueStateTracker,
|
|
39
40
|
flows: FlowsList,
|
|
40
|
-
story_graph: StoryGraph,
|
|
41
41
|
domain: Domain,
|
|
42
|
+
story_graph: Optional[StoryGraph] = None,
|
|
42
43
|
) -> List[Event]:
|
|
43
44
|
"""Execute commands to update tracker state."""
|
|
44
45
|
return rasa.dialogue_understanding.processor.command_processor.execute_commands(
|
|
@@ -383,7 +383,9 @@ class DefaultV1Recipe(Recipe):
|
|
|
383
383
|
return preprocessors
|
|
384
384
|
|
|
385
385
|
def _get_needs_from_args(
|
|
386
|
-
self,
|
|
386
|
+
self,
|
|
387
|
+
component: Type[GraphComponent],
|
|
388
|
+
fn_name: str,
|
|
387
389
|
) -> Dict[str, str]:
|
|
388
390
|
"""Get the needed arguments from the method on the component.
|
|
389
391
|
|
|
@@ -421,6 +423,7 @@ class DefaultV1Recipe(Recipe):
|
|
|
421
423
|
parameters = {
|
|
422
424
|
name
|
|
423
425
|
for name, param in sig.parameters.items()
|
|
426
|
+
# only consider parameters which are positional or keyword
|
|
424
427
|
if param.kind == param.POSITIONAL_OR_KEYWORD
|
|
425
428
|
}
|
|
426
429
|
|
|
@@ -737,8 +740,28 @@ class DefaultV1Recipe(Recipe):
|
|
|
737
740
|
predict_config, predict_nodes, train_nodes, preprocessors
|
|
738
741
|
)
|
|
739
742
|
|
|
743
|
+
# The `story_graph_provider` is only needed if the intentless policy is used.
|
|
744
|
+
# If it is not used, we can remove it from the nodes as it slows down the
|
|
745
|
+
# loading time if users have a large number of stories.
|
|
746
|
+
if not self._intentless_policy_used(predict_nodes):
|
|
747
|
+
# Removes the `story_graph_provider` from the nodes
|
|
748
|
+
predict_nodes.pop("story_graph_provider", None)
|
|
749
|
+
if "command_processor" in predict_nodes:
|
|
750
|
+
# Removes story_graph from the command processor inputs
|
|
751
|
+
predict_nodes["command_processor"].needs.pop("story_graph", None)
|
|
752
|
+
|
|
740
753
|
return predict_nodes
|
|
741
754
|
|
|
755
|
+
@staticmethod
|
|
756
|
+
def _intentless_policy_used(nodes: Dict[Text, SchemaNode]) -> bool:
|
|
757
|
+
"""Checks if the intentless policy is used in the nodes."""
|
|
758
|
+
from rasa.core import IntentlessPolicy
|
|
759
|
+
|
|
760
|
+
for schema_node in nodes.values():
|
|
761
|
+
if schema_node.matches_type(IntentlessPolicy):
|
|
762
|
+
return True
|
|
763
|
+
return False
|
|
764
|
+
|
|
742
765
|
def _add_nlu_predict_nodes(
|
|
743
766
|
self,
|
|
744
767
|
last_run_node: Text,
|
|
@@ -909,7 +932,8 @@ class DefaultV1Recipe(Recipe):
|
|
|
909
932
|
predict_nodes["command_processor"] = SchemaNode(
|
|
910
933
|
**DEFAULT_PREDICT_KWARGS,
|
|
911
934
|
needs=self._get_needs_from_args(
|
|
912
|
-
CommandProcessorComponent,
|
|
935
|
+
CommandProcessorComponent,
|
|
936
|
+
"execute_commands",
|
|
913
937
|
),
|
|
914
938
|
uses=CommandProcessorComponent,
|
|
915
939
|
fn="execute_commands",
|
|
@@ -10,11 +10,13 @@ from rasa.llm_fine_tuning.paraphrasing.rephrased_user_message import (
|
|
|
10
10
|
RephrasedUserMessage,
|
|
11
11
|
)
|
|
12
12
|
from rasa.shared.constants import (
|
|
13
|
-
MODEL_NAME_CONFIG_KEY,
|
|
14
|
-
MODEL_CONFIG_KEY,
|
|
15
13
|
LLM_CONFIG_KEY,
|
|
14
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
15
|
+
MODEL_CONFIG_KEY,
|
|
16
|
+
MODEL_NAME_CONFIG_KEY,
|
|
16
17
|
PROMPT_TEMPLATE_CONFIG_KEY,
|
|
17
18
|
PROVIDER_CONFIG_KEY,
|
|
19
|
+
TEMPERATURE_CONFIG_KEY,
|
|
18
20
|
TIMEOUT_CONFIG_KEY,
|
|
19
21
|
)
|
|
20
22
|
from rasa.shared.exceptions import ProviderClientAPIException
|
|
@@ -38,8 +40,8 @@ DEFAULT_LLM_CONFIG = {
|
|
|
38
40
|
PROVIDER_CONFIG_KEY: OPENAI_PROVIDER,
|
|
39
41
|
MODEL_CONFIG_KEY: "gpt-4o-mini",
|
|
40
42
|
TIMEOUT_CONFIG_KEY: 7,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
TEMPERATURE_CONFIG_KEY: 0.0,
|
|
44
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY: 4096,
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
structlogger = structlog.get_logger()
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from collections import OrderedDict
|
|
4
|
-
from enum import Enum
|
|
5
3
|
import logging
|
|
4
|
+
import shutil
|
|
6
5
|
import typing
|
|
7
|
-
from
|
|
6
|
+
from collections import OrderedDict
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from typing import Any, Callable, Dict, List, Optional, Text, Tuple, Type
|
|
8
10
|
|
|
9
11
|
import numpy as np
|
|
10
12
|
|
|
@@ -43,6 +45,10 @@ if typing.TYPE_CHECKING:
|
|
|
43
45
|
|
|
44
46
|
CONFIG_FEATURES = "features"
|
|
45
47
|
|
|
48
|
+
TAGGERS_DIR = "taggers"
|
|
49
|
+
CRFSUITE_MODEL_FILE_NAME = "model.crfsuite"
|
|
50
|
+
PLAIN_CRF_MODEL_FILE_NAME = "model.txt"
|
|
51
|
+
|
|
46
52
|
|
|
47
53
|
class CRFToken:
|
|
48
54
|
def __init__(
|
|
@@ -419,19 +425,11 @@ class CRFEntityExtractor(GraphComponent, EntityExtractorMixin):
|
|
|
419
425
|
"""Loads trained component (see parent class for full docstring)."""
|
|
420
426
|
try:
|
|
421
427
|
with model_storage.read_from(resource) as model_dir:
|
|
422
|
-
dataset = rasa.shared.utils.io.read_json_file(
|
|
423
|
-
model_dir / "crf_dataset.json"
|
|
424
|
-
)
|
|
425
428
|
crf_order = rasa.shared.utils.io.read_json_file(
|
|
426
429
|
model_dir / "crf_order.json"
|
|
427
430
|
)
|
|
428
431
|
|
|
429
|
-
|
|
430
|
-
[CRFToken.create_from_dict(token_data) for token_data in sub_list]
|
|
431
|
-
for sub_list in dataset
|
|
432
|
-
]
|
|
433
|
-
|
|
434
|
-
entity_taggers = cls.train_model(dataset, config, crf_order)
|
|
432
|
+
entity_taggers = cls._load_taggers(model_dir, config)
|
|
435
433
|
|
|
436
434
|
entity_extractor = cls(config, model_storage, resource, entity_taggers)
|
|
437
435
|
entity_extractor.crf_order = crf_order
|
|
@@ -443,19 +441,71 @@ class CRFEntityExtractor(GraphComponent, EntityExtractorMixin):
|
|
|
443
441
|
)
|
|
444
442
|
return cls(config, model_storage, resource)
|
|
445
443
|
|
|
444
|
+
@classmethod
|
|
445
|
+
def _load_taggers(
|
|
446
|
+
cls, model_dir: Path, config: Dict[Text, Any]
|
|
447
|
+
) -> Dict[str, "CRF"]:
|
|
448
|
+
"""
|
|
449
|
+
Load taggers from model directory that persists trained binary
|
|
450
|
+
`model.crfsuite` files.
|
|
451
|
+
"""
|
|
452
|
+
|
|
453
|
+
import pycrfsuite
|
|
454
|
+
import sklearn_crfsuite
|
|
455
|
+
|
|
456
|
+
# Get tagger directories
|
|
457
|
+
taggers_base = model_dir / TAGGERS_DIR
|
|
458
|
+
if not taggers_base.exists():
|
|
459
|
+
return {}
|
|
460
|
+
|
|
461
|
+
taggers_dirs = [
|
|
462
|
+
directory for directory in taggers_base.iterdir() if directory.is_dir()
|
|
463
|
+
]
|
|
464
|
+
|
|
465
|
+
entity_taggers: Dict[str, "CRF"] = {}
|
|
466
|
+
|
|
467
|
+
for tagger_dir in taggers_dirs:
|
|
468
|
+
# Instantiate sklearns CRF wrapper for the pycrfsuite's Tagger
|
|
469
|
+
entity_tagger = sklearn_crfsuite.CRF(
|
|
470
|
+
algorithm="lbfgs",
|
|
471
|
+
# coefficient for L1 penalty
|
|
472
|
+
c1=config["L1_c"],
|
|
473
|
+
# coefficient for L2 penalty
|
|
474
|
+
c2=config["L2_c"],
|
|
475
|
+
# stop earlier
|
|
476
|
+
max_iterations=config["max_iterations"],
|
|
477
|
+
# include transitions that are possible, but not observed
|
|
478
|
+
all_possible_transitions=True,
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
# Load pycrfsuite tagger from the persisted binary model.crfsuite file
|
|
482
|
+
entity_tagger._tagger = pycrfsuite.Tagger()
|
|
483
|
+
entity_tagger._tagger.open(str(tagger_dir / CRFSUITE_MODEL_FILE_NAME))
|
|
484
|
+
|
|
485
|
+
entity_taggers[tagger_dir.name] = entity_tagger
|
|
486
|
+
|
|
487
|
+
return entity_taggers
|
|
488
|
+
|
|
446
489
|
def persist(self, dataset: List[List[CRFToken]]) -> None:
|
|
447
490
|
"""Persist this model into the passed directory."""
|
|
448
491
|
with self._model_storage.write_to(self._resource) as model_dir:
|
|
449
|
-
data_to_store = [
|
|
450
|
-
[token.to_dict() for token in sub_list] for sub_list in dataset
|
|
451
|
-
]
|
|
452
|
-
|
|
453
|
-
rasa.shared.utils.io.dump_obj_as_json_to_file(
|
|
454
|
-
model_dir / "crf_dataset.json", data_to_store
|
|
455
|
-
)
|
|
456
492
|
rasa.shared.utils.io.dump_obj_as_json_to_file(
|
|
457
493
|
model_dir / "crf_order.json", self.crf_order
|
|
458
494
|
)
|
|
495
|
+
if self.entity_taggers is not None:
|
|
496
|
+
for tag_name, entity_tagger in self.entity_taggers.items():
|
|
497
|
+
# Create the directories for storing the CRF model
|
|
498
|
+
tagger_dir = model_dir / TAGGERS_DIR / tag_name
|
|
499
|
+
tagger_dir.mkdir(parents=True, exist_ok=True)
|
|
500
|
+
# Create a plain text version of the CRF model
|
|
501
|
+
entity_tagger.tagger_.dump(
|
|
502
|
+
str(tagger_dir / PLAIN_CRF_MODEL_FILE_NAME)
|
|
503
|
+
)
|
|
504
|
+
# Persist binary version of the model.crfsuite
|
|
505
|
+
shutil.copy2(
|
|
506
|
+
src=entity_tagger.modelfile.name,
|
|
507
|
+
dst=tagger_dir / CRFSUITE_MODEL_FILE_NAME,
|
|
508
|
+
)
|
|
459
509
|
|
|
460
510
|
@classmethod
|
|
461
511
|
def _crf_tokens_to_features(
|
rasa/shared/constants.py
CHANGED
|
@@ -175,6 +175,12 @@ PROVIDER_CONFIG_KEY = "provider"
|
|
|
175
175
|
REQUEST_TIMEOUT_CONFIG_KEY = "request_timeout" # deprecated
|
|
176
176
|
TIMEOUT_CONFIG_KEY = "timeout"
|
|
177
177
|
|
|
178
|
+
LOGIT_BIAS_CONFIG_KEY = "logit_bias"
|
|
179
|
+
MAX_RETRIES_CONFIG_KEY = "max_retries"
|
|
180
|
+
TEMPERATURE_CONFIG_KEY = "temperature"
|
|
181
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY = "max_completion_tokens"
|
|
182
|
+
MAX_TOKENS_CONFIG_KEY = "max_tokens"
|
|
183
|
+
|
|
178
184
|
DEPLOYMENT_NAME_CONFIG_KEY = "deployment_name"
|
|
179
185
|
DEPLOYMENT_CONFIG_KEY = "deployment"
|
|
180
186
|
EMBEDDINGS_CONFIG_KEY = "embeddings"
|
|
@@ -4,26 +4,28 @@ from typing import Any, Dict, Optional
|
|
|
4
4
|
import structlog
|
|
5
5
|
|
|
6
6
|
from rasa.shared.constants import (
|
|
7
|
-
MODEL_CONFIG_KEY,
|
|
8
|
-
MODEL_NAME_CONFIG_KEY,
|
|
9
|
-
OPENAI_API_BASE_CONFIG_KEY,
|
|
10
7
|
API_BASE_CONFIG_KEY,
|
|
11
|
-
OPENAI_API_TYPE_CONFIG_KEY,
|
|
12
8
|
API_TYPE_CONFIG_KEY,
|
|
13
|
-
OPENAI_API_VERSION_CONFIG_KEY,
|
|
14
9
|
API_VERSION_CONFIG_KEY,
|
|
10
|
+
AZURE_API_TYPE,
|
|
11
|
+
AZURE_OPENAI_PROVIDER,
|
|
15
12
|
DEPLOYMENT_CONFIG_KEY,
|
|
16
13
|
DEPLOYMENT_NAME_CONFIG_KEY,
|
|
17
14
|
ENGINE_CONFIG_KEY,
|
|
18
|
-
RASA_TYPE_CONFIG_KEY,
|
|
19
15
|
LANGCHAIN_TYPE_CONFIG_KEY,
|
|
20
|
-
|
|
16
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
17
|
+
MAX_TOKENS_CONFIG_KEY,
|
|
18
|
+
MODEL_CONFIG_KEY,
|
|
19
|
+
MODEL_NAME_CONFIG_KEY,
|
|
21
20
|
N_REPHRASES_CONFIG_KEY,
|
|
21
|
+
OPENAI_API_BASE_CONFIG_KEY,
|
|
22
|
+
OPENAI_API_TYPE_CONFIG_KEY,
|
|
23
|
+
OPENAI_API_VERSION_CONFIG_KEY,
|
|
24
|
+
PROVIDER_CONFIG_KEY,
|
|
25
|
+
RASA_TYPE_CONFIG_KEY,
|
|
22
26
|
REQUEST_TIMEOUT_CONFIG_KEY,
|
|
27
|
+
STREAM_CONFIG_KEY,
|
|
23
28
|
TIMEOUT_CONFIG_KEY,
|
|
24
|
-
PROVIDER_CONFIG_KEY,
|
|
25
|
-
AZURE_OPENAI_PROVIDER,
|
|
26
|
-
AZURE_API_TYPE,
|
|
27
29
|
)
|
|
28
30
|
from rasa.shared.providers._configs.utils import (
|
|
29
31
|
resolve_aliases,
|
|
@@ -51,6 +53,8 @@ DEPRECATED_ALIASES_TO_STANDARD_KEY_MAPPING = {
|
|
|
51
53
|
MODEL_NAME_CONFIG_KEY: MODEL_CONFIG_KEY,
|
|
52
54
|
# Timeout aliases
|
|
53
55
|
REQUEST_TIMEOUT_CONFIG_KEY: TIMEOUT_CONFIG_KEY,
|
|
56
|
+
# Max tokens aliases
|
|
57
|
+
MAX_TOKENS_CONFIG_KEY: MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
REQUIRED_KEYS = [DEPLOYMENT_CONFIG_KEY]
|
|
@@ -4,23 +4,25 @@ from typing import Any, Dict, Optional
|
|
|
4
4
|
import structlog
|
|
5
5
|
|
|
6
6
|
from rasa.shared.constants import (
|
|
7
|
+
API_BASE_CONFIG_KEY,
|
|
8
|
+
API_TYPE_CONFIG_KEY,
|
|
9
|
+
API_VERSION_CONFIG_KEY,
|
|
10
|
+
LANGCHAIN_TYPE_CONFIG_KEY,
|
|
11
|
+
MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
12
|
+
MAX_TOKENS_CONFIG_KEY,
|
|
7
13
|
MODEL_CONFIG_KEY,
|
|
8
14
|
MODEL_NAME_CONFIG_KEY,
|
|
15
|
+
N_REPHRASES_CONFIG_KEY,
|
|
9
16
|
OPENAI_API_BASE_CONFIG_KEY,
|
|
10
|
-
|
|
17
|
+
OPENAI_API_TYPE,
|
|
11
18
|
OPENAI_API_TYPE_CONFIG_KEY,
|
|
12
|
-
API_TYPE_CONFIG_KEY,
|
|
13
19
|
OPENAI_API_VERSION_CONFIG_KEY,
|
|
14
|
-
|
|
20
|
+
OPENAI_PROVIDER,
|
|
21
|
+
PROVIDER_CONFIG_KEY,
|
|
15
22
|
RASA_TYPE_CONFIG_KEY,
|
|
16
|
-
LANGCHAIN_TYPE_CONFIG_KEY,
|
|
17
|
-
STREAM_CONFIG_KEY,
|
|
18
|
-
N_REPHRASES_CONFIG_KEY,
|
|
19
23
|
REQUEST_TIMEOUT_CONFIG_KEY,
|
|
24
|
+
STREAM_CONFIG_KEY,
|
|
20
25
|
TIMEOUT_CONFIG_KEY,
|
|
21
|
-
PROVIDER_CONFIG_KEY,
|
|
22
|
-
OPENAI_PROVIDER,
|
|
23
|
-
OPENAI_API_TYPE,
|
|
24
26
|
)
|
|
25
27
|
from rasa.shared.providers._configs.utils import (
|
|
26
28
|
resolve_aliases,
|
|
@@ -46,6 +48,8 @@ DEPRECATED_ALIASES_TO_STANDARD_KEY_MAPPING = {
|
|
|
46
48
|
OPENAI_API_VERSION_CONFIG_KEY: API_VERSION_CONFIG_KEY,
|
|
47
49
|
# Timeout aliases
|
|
48
50
|
REQUEST_TIMEOUT_CONFIG_KEY: TIMEOUT_CONFIG_KEY,
|
|
51
|
+
# Max tokens aliases
|
|
52
|
+
MAX_TOKENS_CONFIG_KEY: MAX_COMPLETION_TOKENS_CONFIG_KEY,
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
REQUIRED_KEYS = [MODEL_CONFIG_KEY]
|
|
@@ -71,7 +71,10 @@ class _BaseLiteLLMEmbeddingClient:
|
|
|
71
71
|
def _embedding_fn_args(self) -> Dict[str, Any]:
|
|
72
72
|
"""Returns the arguments to be passed to the embedding function."""
|
|
73
73
|
return {
|
|
74
|
+
# Parameters set through config, can override drop_params
|
|
74
75
|
**self._litellm_extra_parameters,
|
|
76
|
+
# Model name is constructed in the LiteLLM format from the provided config
|
|
77
|
+
# Non-overridable to ensure consistency
|
|
75
78
|
"model": self._litellm_model_name,
|
|
76
79
|
}
|
|
77
80
|
|
|
@@ -83,12 +83,15 @@ class _BaseLiteLLMClient:
|
|
|
83
83
|
@property
|
|
84
84
|
def _completion_fn_args(self) -> dict:
|
|
85
85
|
return {
|
|
86
|
-
**self._litellm_extra_parameters,
|
|
87
|
-
"model": self._litellm_model_name,
|
|
88
86
|
# Since all providers covered by LiteLLM use the OpenAI format, but
|
|
89
87
|
# not all support every OpenAI parameter, raise an exception if
|
|
90
88
|
# provider/model uses unsupported parameter
|
|
91
89
|
"drop_params": False,
|
|
90
|
+
# All other parameters set through config, can override drop_params
|
|
91
|
+
**self._litellm_extra_parameters,
|
|
92
|
+
# Model name is constructed in the LiteLLM format from the provided config
|
|
93
|
+
# Non-overridable to ensure consistency
|
|
94
|
+
"model": self._litellm_model_name,
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
def validate_client_setup(self) -> None:
|
rasa/shared/utils/llm.py
CHANGED
|
@@ -4,6 +4,7 @@ from typing import (
|
|
|
4
4
|
Any,
|
|
5
5
|
Callable,
|
|
6
6
|
Dict,
|
|
7
|
+
List,
|
|
7
8
|
Optional,
|
|
8
9
|
Text,
|
|
9
10
|
Type,
|
|
@@ -179,6 +180,7 @@ def tracker_as_readable_transcript(
|
|
|
179
180
|
human_prefix: str = USER,
|
|
180
181
|
ai_prefix: str = AI,
|
|
181
182
|
max_turns: Optional[int] = 20,
|
|
183
|
+
turns_wrapper: Optional[Callable[[List[str]], List[str]]] = None,
|
|
182
184
|
) -> str:
|
|
183
185
|
"""Creates a readable dialogue from a tracker.
|
|
184
186
|
|
|
@@ -187,6 +189,7 @@ def tracker_as_readable_transcript(
|
|
|
187
189
|
human_prefix: the prefix to use for human utterances
|
|
188
190
|
ai_prefix: the prefix to use for ai utterances
|
|
189
191
|
max_turns: the maximum number of turns to include in the transcript
|
|
192
|
+
turns_wrapper: optional function to wrap the turns in a custom way
|
|
190
193
|
|
|
191
194
|
Example:
|
|
192
195
|
>>> tracker = Tracker(
|
|
@@ -223,8 +226,11 @@ def tracker_as_readable_transcript(
|
|
|
223
226
|
elif isinstance(event, BotUttered):
|
|
224
227
|
transcript.append(f"{ai_prefix}: {sanitize_message_for_prompt(event.text)}")
|
|
225
228
|
|
|
226
|
-
|
|
227
|
-
|
|
229
|
+
# turns_wrapper to count multiple utterances by bot/user as single turn
|
|
230
|
+
if turns_wrapper:
|
|
231
|
+
transcript = turns_wrapper(transcript)
|
|
232
|
+
# otherwise, just take the last `max_turns` lines of the transcript
|
|
233
|
+
transcript = transcript[-max_turns if max_turns is not None else None :]
|
|
228
234
|
|
|
229
235
|
return "\n".join(transcript)
|
|
230
236
|
|
rasa/telemetry.py
CHANGED
|
@@ -894,7 +894,7 @@ def initialize_error_reporting() -> None:
|
|
|
894
894
|
OSError,
|
|
895
895
|
],
|
|
896
896
|
in_app_include=["rasa"], # only submit errors in this package
|
|
897
|
-
|
|
897
|
+
include_local_variables=False, # don't submit local variables
|
|
898
898
|
release=f"rasa-{rasa.__version__}",
|
|
899
899
|
default_integrations=False,
|
|
900
900
|
environment="development" if in_continuous_integration() else "production",
|
rasa/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: rasa-pro
|
|
3
|
-
Version: 3.10.
|
|
3
|
+
Version: 3.10.26
|
|
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
|
Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework
|
|
6
6
|
Author: Rasa Technologies GmbH
|
|
@@ -26,7 +26,7 @@ Requires-Dist: SQLAlchemy (>=2.0.22,<2.1.0)
|
|
|
26
26
|
Requires-Dist: absl-py (>=2.0,<2.1)
|
|
27
27
|
Requires-Dist: aio-pika (>=8.2.3,<8.2.4)
|
|
28
28
|
Requires-Dist: aiogram (>=2.15,<2.26)
|
|
29
|
-
Requires-Dist: aiohttp (>=3.
|
|
29
|
+
Requires-Dist: aiohttp (>=3.10.11,<3.11)
|
|
30
30
|
Requires-Dist: apscheduler (>=3.10,<3.11)
|
|
31
31
|
Requires-Dist: attrs (>=23.1,<23.2)
|
|
32
32
|
Requires-Dist: azure-storage-blob (>=12.16.0,<12.17.0)
|
|
@@ -113,7 +113,7 @@ Requires-Dist: sanic-routing (>=22.8.0,<23.0.0)
|
|
|
113
113
|
Requires-Dist: scikit-learn (>=1.1.3,<1.2) ; python_version >= "3.9" and python_version < "3.11"
|
|
114
114
|
Requires-Dist: scipy (>=1.10.1,<1.11.0) ; python_version >= "3.9" and python_version < "3.11"
|
|
115
115
|
Requires-Dist: sentencepiece[sentencepiece] (>=0.1.99,<0.2.0) ; extra == "transformers" or extra == "full"
|
|
116
|
-
Requires-Dist: sentry-sdk (>=
|
|
116
|
+
Requires-Dist: sentry-sdk (>=2.8.0,<3)
|
|
117
117
|
Requires-Dist: setuptools (>=78.1.0,<78.2.0)
|
|
118
118
|
Requires-Dist: sklearn-crfsuite (>=0.3.6,<0.4.0)
|
|
119
119
|
Requires-Dist: skops (>=0.10.0,<0.11.0)
|
|
@@ -292,14 +292,14 @@ rasa/core/lock_store.py,sha256=fgdufUYXHEiTcD7NCCqgDAQRRtt7jrKafENHqFKOyi0,12504
|
|
|
292
292
|
rasa/core/migrate.py,sha256=XNeYdiRytBmBNubOQ8KZOT_wR1o9aOpHHfBU9PCB2eg,14626
|
|
293
293
|
rasa/core/nlg/__init__.py,sha256=0eQOZ0fB35b18oVhRFczcH30jJHgO8WXFhnbXGOxJek,240
|
|
294
294
|
rasa/core/nlg/callback.py,sha256=rFkDe7CSAETASRefpERUT6-DHWPs0UXhx8x4tZ1QE0M,5238
|
|
295
|
-
rasa/core/nlg/contextual_response_rephraser.py,sha256=
|
|
295
|
+
rasa/core/nlg/contextual_response_rephraser.py,sha256=zHDMPQEfiYjc-KXB8-6Vzf9c0IuvMdInOVJcOrdEEGU,11611
|
|
296
296
|
rasa/core/nlg/generator.py,sha256=YZ_rh--MeyzA6oXRqr_Ng-jcmPgbCmWMJJrquPmo__8,8436
|
|
297
297
|
rasa/core/nlg/interpolator.py,sha256=Dc-J2Vf6vPPUbwIgZQm3AJDGvMaFTsh9Citd4CYuA9U,5189
|
|
298
298
|
rasa/core/nlg/response.py,sha256=aHpy9BgjO7ub6v-sVPiQqutUA_7-UD1l3DJGVeQyp4k,5888
|
|
299
|
-
rasa/core/nlg/summarize.py,sha256=
|
|
299
|
+
rasa/core/nlg/summarize.py,sha256=0Was54hj7hCOwXPne_QXLyMkRyBn2ngQBE-Vl7TZ8GA,3190
|
|
300
300
|
rasa/core/policies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
301
301
|
rasa/core/policies/ensemble.py,sha256=AjNOEy2Iubbe-LdKaoFUXG8ch6yPrg3bTvcTcAPmeOs,12959
|
|
302
|
-
rasa/core/policies/enterprise_search_policy.py,sha256=
|
|
302
|
+
rasa/core/policies/enterprise_search_policy.py,sha256=kFkPq--CrdfrqvjrDaxdGiVy7qcReqjauSGgLjHVrug,31807
|
|
303
303
|
rasa/core/policies/enterprise_search_prompt_template.jinja2,sha256=dCS_seyBGxMQoMsOjjvPp0dd31OSzZCJSZeev1FJK5Q,1187
|
|
304
304
|
rasa/core/policies/enterprise_search_prompt_with_citation_template.jinja2,sha256=va9rpP97dN3PKoJZOVfyuISt3cPBlb10Pqyz25RwO_Q,3294
|
|
305
305
|
rasa/core/policies/flow_policy.py,sha256=wGb1l_59cGM9ZaexSIK5uXFi618739oNfLOxx2FC0_Y,7490
|
|
@@ -307,7 +307,7 @@ rasa/core/policies/flows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
307
307
|
rasa/core/policies/flows/flow_exceptions.py,sha256=_FQuN-cerQDM1pivce9bz4zylh5UYkljvYS1gjDukHI,1527
|
|
308
308
|
rasa/core/policies/flows/flow_executor.py,sha256=DNO_kUdisI93XIY9-QtYpqCp7faxEpkIqhcfFLkaets,25690
|
|
309
309
|
rasa/core/policies/flows/flow_step_result.py,sha256=agjPrD6lahGSe2ViO5peBeoMdI9ngVGRSgtytgxmJmg,1360
|
|
310
|
-
rasa/core/policies/intentless_policy.py,sha256=
|
|
310
|
+
rasa/core/policies/intentless_policy.py,sha256=D-xMYvQarAXQmTUIur_0bY4XYBwmzLvkBO3H42cfmsY,34018
|
|
311
311
|
rasa/core/policies/intentless_prompt_template.jinja2,sha256=KhIL3cruMmkxhrs5oVbqgSvK6ZiN_6TQ_jXrgtEB-ZY,677
|
|
312
312
|
rasa/core/policies/memoization.py,sha256=XoRxUdYUGRfO47tAEyc5k5pUgt38a4fipO336EU5Vdc,19466
|
|
313
313
|
rasa/core/policies/policy.py,sha256=HeVtIaV0dA1QcAG3vjdn-4g7-oUEJPL4u01ETJt78YA,27464
|
|
@@ -337,7 +337,7 @@ rasa/dialogue_understanding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
|
337
337
|
rasa/dialogue_understanding/coexistence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
338
338
|
rasa/dialogue_understanding/coexistence/constants.py,sha256=RpgLKMG4s7AgII0fRV0siS0Zh2QVI0OVRunhgm4q_j4,94
|
|
339
339
|
rasa/dialogue_understanding/coexistence/intent_based_router.py,sha256=3Pf7ZpmQnJWlaehAVZBSR9B1oWoR0NK7Ll0pLMCovDc,7609
|
|
340
|
-
rasa/dialogue_understanding/coexistence/llm_based_router.py,sha256=
|
|
340
|
+
rasa/dialogue_understanding/coexistence/llm_based_router.py,sha256=2h2fcjab5nQ4rsXlxCAckau83cmfyTibQs_yXo5YGks,10405
|
|
341
341
|
rasa/dialogue_understanding/coexistence/router_template.jinja2,sha256=CHWFreN0sv1EbPh-hf5AlCt3zxy2_llX1Pdn9Q11Y18,357
|
|
342
342
|
rasa/dialogue_understanding/commands/__init__.py,sha256=B_1q6p2l1TOfIcmggSzXc0iETZ1RvTUSFwuQhPmRjtQ,2004
|
|
343
343
|
rasa/dialogue_understanding/commands/can_not_handle_command.py,sha256=2sNnIo1jZ2UEadkBdEWmDasm2tBES59lzvFcf0iY51U,2235
|
|
@@ -361,7 +361,7 @@ rasa/dialogue_understanding/commands/start_flow_command.py,sha256=a0Yk8xpBpFgC3H
|
|
|
361
361
|
rasa/dialogue_understanding/commands/utils.py,sha256=vGDxGlDm2tgTsim1mFWTFFkyYzR9-ElOBY8WQiM4CBk,1652
|
|
362
362
|
rasa/dialogue_understanding/generator/__init__.py,sha256=Ykeb2wQ1DuiUWAWO0hLIPSTK1_Ktiq9DZXF6D3ugN78,764
|
|
363
363
|
rasa/dialogue_understanding/generator/command_generator.py,sha256=woJ4-59Iarugyxy0fT0zM0QnF8el8m2bBSpy-9Gh8U0,11945
|
|
364
|
-
rasa/dialogue_understanding/generator/constants.py,sha256=
|
|
364
|
+
rasa/dialogue_understanding/generator/constants.py,sha256=H23WobclRL6Q3VqHVinh80HqZJHz3y3vHav0qljUEqo,775
|
|
365
365
|
rasa/dialogue_understanding/generator/flow_document_template.jinja2,sha256=f4H6vVd-_nX_RtutMh1xD3ZQE_J2OyuPHAtiltfiAPY,253
|
|
366
366
|
rasa/dialogue_understanding/generator/flow_retrieval.py,sha256=mSqXDz2DPl3Law-Smw7C3x3li85wfj8nkj6R_3Fw30w,16403
|
|
367
367
|
rasa/dialogue_understanding/generator/llm_based_command_generator.py,sha256=Aktu_gdxAIQowfQ9KBcS2w3R9Hilc2ehLPB89ek9mVs,16627
|
|
@@ -369,11 +369,11 @@ rasa/dialogue_understanding/generator/llm_command_generator.py,sha256=P1LA0eJxf3
|
|
|
369
369
|
rasa/dialogue_understanding/generator/multi_step/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
370
370
|
rasa/dialogue_understanding/generator/multi_step/fill_slots_prompt.jinja2,sha256=Y0m673tAML3cFPaLM-urMXDsBYUUcXIw9YUpkAhGUuA,2933
|
|
371
371
|
rasa/dialogue_understanding/generator/multi_step/handle_flows_prompt.jinja2,sha256=8l93_QBKBYnqLICVdiTu5ejZDE8F36BU8-qwba0px44,1927
|
|
372
|
-
rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py,sha256=
|
|
372
|
+
rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py,sha256=nZL-N_q2zYtH9osbnCH4OLviL_1VDd8NDhMMRydvHBk,31866
|
|
373
373
|
rasa/dialogue_understanding/generator/nlu_command_adapter.py,sha256=wEqoSVUtr00lhbE9L9WqKfZkMKOvm7UGe_E5aqXgn6I,9210
|
|
374
374
|
rasa/dialogue_understanding/generator/single_step/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
375
375
|
rasa/dialogue_understanding/generator/single_step/command_prompt_template.jinja2,sha256=qVTuas5XgAv2M_hsihyXl-wAnBDEpg_uhVvNrR5m-h0,3751
|
|
376
|
-
rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py,sha256=
|
|
376
|
+
rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py,sha256=Y5Wi_hnZ3wXqQvBMjMH4sekN9ogWPZgrK5opKMXsCVI,16331
|
|
377
377
|
rasa/dialogue_understanding/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
378
378
|
rasa/dialogue_understanding/patterns/cancel.py,sha256=IQ4GVHNnNCqwKRLlAqBtLsgolcbPPnHsHdb3aOAFhEs,3868
|
|
379
379
|
rasa/dialogue_understanding/patterns/cannot_handle.py,sha256=pg0zJHl-hDBnl6y9IyxZzW57yuMdfD8xI8eiK6EVrG8,1406
|
|
@@ -393,7 +393,7 @@ rasa/dialogue_understanding/patterns/session_start.py,sha256=yglhIEkkquRf0YppZ4C
|
|
|
393
393
|
rasa/dialogue_understanding/patterns/skip_question.py,sha256=rvZuVUxulikwUhP01MAIgkcHZ4Si7mzxNedH6QBPdX4,1214
|
|
394
394
|
rasa/dialogue_understanding/processor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
395
395
|
rasa/dialogue_understanding/processor/command_processor.py,sha256=OEJ8uwV9LsaRN8Jw0IF9GpF-Gh0P8SaW_SDh5ELb7zk,25510
|
|
396
|
-
rasa/dialogue_understanding/processor/command_processor_component.py,sha256=
|
|
396
|
+
rasa/dialogue_understanding/processor/command_processor_component.py,sha256=dV9VfkisajHe2JNv23MnPumUv7s79vqE625LwIvb6Ds,1634
|
|
397
397
|
rasa/dialogue_understanding/stack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
398
398
|
rasa/dialogue_understanding/stack/dialogue_stack.py,sha256=j8MnLCyv6cAZVpKRaUVM-Z5HqgWP-scrnaiQXzLNBwY,5243
|
|
399
399
|
rasa/dialogue_understanding/stack/frames/__init__.py,sha256=CXLs8I_eeJ-d2tQmS19V26OM6CHy3VN5whH5uHBodj4,656
|
|
@@ -432,7 +432,7 @@ rasa/engine/loader.py,sha256=ommFdjddJWkb-KHpemxRhWYlMYRAUs8rcmtJx_DzqnM,1384
|
|
|
432
432
|
rasa/engine/recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
433
433
|
rasa/engine/recipes/config_files/default_config.yml,sha256=M1ehmJScNbVCQD_wkBktmf0YqXn-O4UzJVbB7tnAtqs,1219
|
|
434
434
|
rasa/engine/recipes/default_components.py,sha256=XRg51DZ5CKmDjghXCUq-rTv8rkSOYUTkLNulLHnwWHc,3950
|
|
435
|
-
rasa/engine/recipes/default_recipe.py,sha256=
|
|
435
|
+
rasa/engine/recipes/default_recipe.py,sha256=ZZtv40u3ON7GXryttS_dtxr1lfyzqe1fMEezW44_INA,47005
|
|
436
436
|
rasa/engine/recipes/graph_recipe.py,sha256=Kd2vKIRCENzWe9W24HwNedk_b6lIXL4aYqVIZsCJ4ts,3301
|
|
437
437
|
rasa/engine/recipes/recipe.py,sha256=v-t5jwntbXcLWVzfKhDuluz__ouEgl_Q5VFTZieqYgs,3346
|
|
438
438
|
rasa/engine/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -475,7 +475,7 @@ rasa/llm_fine_tuning/conversations.py,sha256=iW2hoR23Km5wnMC7t8pOXH2Zj3LVcA62xrx
|
|
|
475
475
|
rasa/llm_fine_tuning/llm_data_preparation_module.py,sha256=t-EjZmM7MOfpo422wNuf7ZsnTGOaD5TTroYqd-Hwh6U,6082
|
|
476
476
|
rasa/llm_fine_tuning/notebooks/unsloth_finetuning.ipynb,sha256=7-hD4am9_WZmu3SIJXu1utJz0i4k5Xi-c75WhQjQarM,18784
|
|
477
477
|
rasa/llm_fine_tuning/paraphrasing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
478
|
-
rasa/llm_fine_tuning/paraphrasing/conversation_rephraser.py,sha256=
|
|
478
|
+
rasa/llm_fine_tuning/paraphrasing/conversation_rephraser.py,sha256=uVzKuF4Iw0DqPLyaNOUyd9AHGb7vkGUxVmugSgCnZII,10040
|
|
479
479
|
rasa/llm_fine_tuning/paraphrasing/default_rephrase_prompt_template.jina2,sha256=sOHiE0WYEp7v7U6FUwHdlG7dAYDCDIWWPEP3eAj6elE,1340
|
|
480
480
|
rasa/llm_fine_tuning/paraphrasing/rephrase_validator.py,sha256=nj3HYmZkmTvZfxYb8wdQLc_buwnIHaow2R2wf7kyAls,4484
|
|
481
481
|
rasa/llm_fine_tuning/paraphrasing/rephrased_user_message.py,sha256=cOEmZ71yDXW9-7aZm1gjNHVn_N2kNTHttDqSAz0-lEA,292
|
|
@@ -509,7 +509,7 @@ rasa/nlu/emulators/luis.py,sha256=AWMGI17Su1q6PcE8l1S1mDJpwfVtx7ibY9rwBmg3Maw,30
|
|
|
509
509
|
rasa/nlu/emulators/no_emulator.py,sha256=tLJ2DyWhOtaIBudVf7mJGsubca9Vunb6VhJB_tWJ8wU,334
|
|
510
510
|
rasa/nlu/emulators/wit.py,sha256=0eMj_q49JGj0Z6JZjR7rHIABNF-F3POX7s5W5OkANyo,1930
|
|
511
511
|
rasa/nlu/extractors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
512
|
-
rasa/nlu/extractors/crf_entity_extractor.py,sha256=
|
|
512
|
+
rasa/nlu/extractors/crf_entity_extractor.py,sha256=pLiM6vEybqSW4refbBRr68QbE-9haxyHQo7vslymyI0,29400
|
|
513
513
|
rasa/nlu/extractors/duckling_entity_extractor.py,sha256=XooWjw6eDC0sxZ-T1YgDnrLcRTBx6B40SFGLjHTHg-w,7686
|
|
514
514
|
rasa/nlu/extractors/entity_synonyms.py,sha256=WShheUF7wbP7VWfpCNw3J4NouAcFjAupDsT4oAj_TUc,7148
|
|
515
515
|
rasa/nlu/extractors/extractor.py,sha256=m6p07GDBZi1VhgYCkYJrWs_Zk87okV77hvoiwG_1xxA,17539
|
|
@@ -552,7 +552,7 @@ rasa/nlu/utils/spacy_utils.py,sha256=pBvsCVKVuZ3b2Pjn-XuOVZ6lzZu9Voc2R4N1VczwtCM
|
|
|
552
552
|
rasa/plugin.py,sha256=H_OZcHy_U3eAK-JHr43TSxcPqS0JEGcZkFvmumeeJEs,2670
|
|
553
553
|
rasa/server.py,sha256=pUdhi5dkhzEj4bngj2bTUKJohepjpY-aZ4MGKHYZRH0,57775
|
|
554
554
|
rasa/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
555
|
-
rasa/shared/constants.py,sha256=
|
|
555
|
+
rasa/shared/constants.py,sha256=ZzCaG1wMK7lUvK0GdQL0kHovP1U7dPHEmdftL4yNi7E,9726
|
|
556
556
|
rasa/shared/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
557
557
|
rasa/shared/core/command_payload_reader.py,sha256=Vhiop9LWFawaEruRifBBrVmoEJ-fj1Tli1wBvsYu2_I,3563
|
|
558
558
|
rasa/shared/core/constants.py,sha256=6xnows8KdTMIkPA8SMj9xdAPAkFE_dQcJlcVB4NIPPQ,5200
|
|
@@ -634,16 +634,16 @@ rasa/shared/nlu/training_data/training_data.py,sha256=m24Wqs9KMOPhCHPr3vSaYIH1Bn
|
|
|
634
634
|
rasa/shared/nlu/training_data/util.py,sha256=mom7CxLKI5RfOpsJrAKL281a_b01sIcQsr04gSmEEbU,7049
|
|
635
635
|
rasa/shared/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
636
636
|
rasa/shared/providers/_configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
637
|
-
rasa/shared/providers/_configs/azure_openai_client_config.py,sha256=
|
|
637
|
+
rasa/shared/providers/_configs/azure_openai_client_config.py,sha256=RNf4aVEiru0h5OOSIzlNgIN62PpXyhCSfwvV-mKSNMI,6426
|
|
638
638
|
rasa/shared/providers/_configs/client_config.py,sha256=Tvnv9CCpzoHB053lvuqth_JwjTAKtQosahW6BEWdQNU,1584
|
|
639
639
|
rasa/shared/providers/_configs/default_litellm_client_config.py,sha256=ywD0EYWCKqNpx0fPyOavIwwS2BTd3q9QtNeAyIvOd8E,4318
|
|
640
640
|
rasa/shared/providers/_configs/huggingface_local_embedding_client_config.py,sha256=laahM8xQJ-r0nAL8X2SnBM5kZAOiPNo-w0hv7BudAdk,8166
|
|
641
|
-
rasa/shared/providers/_configs/openai_client_config.py,sha256=
|
|
641
|
+
rasa/shared/providers/_configs/openai_client_config.py,sha256=Fzy8pp3SPxyKcF4R39FIfFNqZiEFz0IZv6A-GBCzofw,5956
|
|
642
642
|
rasa/shared/providers/_configs/self_hosted_llm_client_config.py,sha256=fUEvqCrhEIX-y2WLP2UlG8zMjNTWBZb1LUIEAUy6bYQ,5929
|
|
643
643
|
rasa/shared/providers/_configs/utils.py,sha256=vxtWmrnpnH2ryHWiP7hpLbSBAq3x-3hsGxGWSEgp4Lk,3334
|
|
644
644
|
rasa/shared/providers/_ssl_verification_utils.py,sha256=4tujCOjg0KKX2_DzOb7lZTdsUXtzRB4UkfhkC3W0jO0,4166
|
|
645
645
|
rasa/shared/providers/embedding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
646
|
-
rasa/shared/providers/embedding/_base_litellm_embedding_client.py,sha256=
|
|
646
|
+
rasa/shared/providers/embedding/_base_litellm_embedding_client.py,sha256=C77IY_qSQgUFkeRqOY2WjuDjht4XeWPZVDKZEHt81LI,9357
|
|
647
647
|
rasa/shared/providers/embedding/_langchain_embedding_client_adapter.py,sha256=IR2Rb3ReJ9C9sxOoOGRXgtz8STWdMREs_4AeSMKFjl4,2135
|
|
648
648
|
rasa/shared/providers/embedding/azure_openai_embedding_client.py,sha256=R4d0AGXudYAeqOjDdUeqkcrziNrlD5E4RgLi1ggp0Rc,10242
|
|
649
649
|
rasa/shared/providers/embedding/default_litellm_embedding_client.py,sha256=B-BSoIOWV_-tmRr_gcEEMpibA9PUTi3XF91PR0JKGM4,3231
|
|
@@ -652,7 +652,7 @@ rasa/shared/providers/embedding/embedding_response.py,sha256=H55mSAL3LfVvDlBklaC
|
|
|
652
652
|
rasa/shared/providers/embedding/huggingface_local_embedding_client.py,sha256=Zo3gyj49h4LxXV7bx39TXpIPKlernG-5xzqXczTCbig,6913
|
|
653
653
|
rasa/shared/providers/embedding/openai_embedding_client.py,sha256=XNRGE7apo2v3kWRrtgxE-Gq4rvNko3IiXtvgC4krDYE,5429
|
|
654
654
|
rasa/shared/providers/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
655
|
-
rasa/shared/providers/llm/_base_litellm_client.py,sha256=
|
|
655
|
+
rasa/shared/providers/llm/_base_litellm_client.py,sha256=spYaz8qCKnnCiBU4QVcEK5oRDiPulQRSYT7py7BSjTs,9549
|
|
656
656
|
rasa/shared/providers/llm/azure_openai_llm_client.py,sha256=jwEntKsBHKOXUhNEQM-kTYIfRCJ6qEka58ZPnKsSsb8,11836
|
|
657
657
|
rasa/shared/providers/llm/default_litellm_llm_client.py,sha256=yvqd4ARoGSi9iqfE2uFvVEYRU6rICePBnEEKTduCc9w,2777
|
|
658
658
|
rasa/shared/providers/llm/llm_client.py,sha256=6-gMsEJqquhUPGXzNiq_ybM_McLWxAJ_QhbmWcLnb_Q,2358
|
|
@@ -665,7 +665,7 @@ rasa/shared/utils/cli.py,sha256=bJpkf0VzzmtpmBnDnIl7SgvrntnBuaJQMHBXHm2WxcA,2916
|
|
|
665
665
|
rasa/shared/utils/common.py,sha256=Z0sfpDosVHLhGDY-72lGVTPWsNC64z3HWSLdnZRG7yE,10057
|
|
666
666
|
rasa/shared/utils/constants.py,sha256=ZNQu0RHM_7Q4A2hn6pD8XlKPEwzivNpfKiiQihwH8-U,141
|
|
667
667
|
rasa/shared/utils/io.py,sha256=cYEkHjvuIB-XaK-Qchajv4lDMb_EZc3K-3CLwiEtUcA,15236
|
|
668
|
-
rasa/shared/utils/llm.py,sha256=
|
|
668
|
+
rasa/shared/utils/llm.py,sha256=caFhfYqYnm7S15O_5EdgpppMWfXpXUjfRNZloTz_XXg,14921
|
|
669
669
|
rasa/shared/utils/pykwalify_extensions.py,sha256=4W8gde8C6QpGCY_t9IEmaZSgjMuie1xH0F1DYyn83BM,883
|
|
670
670
|
rasa/shared/utils/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
671
671
|
rasa/shared/utils/schemas/config.yml,sha256=czxSADw9hOIZdhvFP8pVUQo810hs9_C8ZGfCPx17taM,27
|
|
@@ -683,7 +683,7 @@ rasa/studio/download.py,sha256=9uE4KKaHnID_3-Tt_E5_D00XTwhLlj4oxORY8CZRrZc,17188
|
|
|
683
683
|
rasa/studio/results_logger.py,sha256=0gCkEaZ1CeFmxRHArK5my_DsLYjApZrxfiRMT5asE6A,4963
|
|
684
684
|
rasa/studio/train.py,sha256=gfPtirITzBDo9gV4hqDNSwPYtVp_22cq8OWI6YIBgyk,4243
|
|
685
685
|
rasa/studio/upload.py,sha256=5hvj_DUzxq5JkZswro-KaLE4QAKwbMLGb8TakzS1etk,14290
|
|
686
|
-
rasa/telemetry.py,sha256=
|
|
686
|
+
rasa/telemetry.py,sha256=6CMcbQ241zoTPzhtmBsPMfW8Glc2tm8uD6cd3J8t99A,61105
|
|
687
687
|
rasa/tracing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
688
688
|
rasa/tracing/config.py,sha256=O4iHkE4kF6r4uVAt3JUb--TniK7pWD4j3d08Vf_GuYY,12736
|
|
689
689
|
rasa/tracing/constants.py,sha256=N_MJLStE3IkmPKQCQv42epd3jdBMJ4Ith1dVO65N5ho,2425
|
|
@@ -728,9 +728,9 @@ rasa/utils/train_utils.py,sha256=f1NWpp5y6al0dzoQyyio4hc4Nf73DRoRSHDzEK6-C4E,212
|
|
|
728
728
|
rasa/utils/url_tools.py,sha256=JQcHL2aLqLHu82k7_d9imUoETCm2bmlHaDpOJ-dKqBc,1218
|
|
729
729
|
rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
|
|
730
730
|
rasa/validator.py,sha256=AsFJ8e1zWHW-hnH_IB3SGBBl68vstKPrrqbAydgjVhQ,63149
|
|
731
|
-
rasa/version.py,sha256=
|
|
732
|
-
rasa_pro-3.10.
|
|
733
|
-
rasa_pro-3.10.
|
|
734
|
-
rasa_pro-3.10.
|
|
735
|
-
rasa_pro-3.10.
|
|
736
|
-
rasa_pro-3.10.
|
|
731
|
+
rasa/version.py,sha256=GyJiURtkOfxjSeja1T4SO4rlFkmC8Y3Cm2KQMrH8Y1I,118
|
|
732
|
+
rasa_pro-3.10.26.dist-info/METADATA,sha256=_ub_I78tX40PTrmdjSbqjdcWQ3yuMJxtQLigq_NDa7I,10852
|
|
733
|
+
rasa_pro-3.10.26.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
|
|
734
|
+
rasa_pro-3.10.26.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
735
|
+
rasa_pro-3.10.26.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
|
|
736
|
+
rasa_pro-3.10.26.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|