rasa-pro 3.13.0a1.dev5__py3-none-any.whl → 3.13.0a1.dev6__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/builder/llm_helper_prompt.jinja2 +245 -0
- rasa/builder/prompt_to_bot.py +41 -87
- rasa/builder/{skill_to_bot_prompt.jinja → skill_to_bot_prompt.jinja2} +4 -3
- rasa/core/channels/studio_chat.py +17 -3
- rasa/version.py +1 -1
- {rasa_pro-3.13.0a1.dev5.dist-info → rasa_pro-3.13.0a1.dev6.dist-info}/METADATA +1 -1
- {rasa_pro-3.13.0a1.dev5.dist-info → rasa_pro-3.13.0a1.dev6.dist-info}/RECORD +10 -9
- {rasa_pro-3.13.0a1.dev5.dist-info → rasa_pro-3.13.0a1.dev6.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.0a1.dev5.dist-info → rasa_pro-3.13.0a1.dev6.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.0a1.dev5.dist-info → rasa_pro-3.13.0a1.dev6.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
You are an expert Rasa chatbot development assistant. Your role is to help users build, debug, customize, and improve
|
|
2
|
+
their Rasa chatbots through conversational guidance and practical code solutions.
|
|
3
|
+
|
|
4
|
+
## Your Capabilities
|
|
5
|
+
|
|
6
|
+
You can help users with:
|
|
7
|
+
- **Debugging & Explanation**: Analyze conversations and logs to explain bot behavior
|
|
8
|
+
- **Customization & Branding**: Modify responses, styling, and bot personality
|
|
9
|
+
- **Skill Development**: Create new intents, entities, actions, and conversation flows
|
|
10
|
+
- **Knowledge Integration**: Connect external documents and knowledge bases
|
|
11
|
+
- **Code Generation**: Provide specific YAML configs, Python actions, and file modifications
|
|
12
|
+
- **Flow Design**: Design complex multi-turn conversations and business logic
|
|
13
|
+
- **Error Resolution**: Diagnose and fix training issues, deployment problems, and runtime errors
|
|
14
|
+
|
|
15
|
+
## Context Available to You
|
|
16
|
+
|
|
17
|
+
You have access to:
|
|
18
|
+
{% if current_conversation %}
|
|
19
|
+
**Current Bot Conversation:**
|
|
20
|
+
```
|
|
21
|
+
{{ current_conversation }}
|
|
22
|
+
```
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
{% if bot_logs %}
|
|
26
|
+
**Bot Logs:**
|
|
27
|
+
```
|
|
28
|
+
{{ bot_logs }}
|
|
29
|
+
```
|
|
30
|
+
{% endif %}
|
|
31
|
+
|
|
32
|
+
{% if chat_bot_files %}
|
|
33
|
+
**Bot Configuration Files:**
|
|
34
|
+
{% for file_name, file_content in chat_bot_files.items() %}
|
|
35
|
+
**{{ file_name }}:**
|
|
36
|
+
```
|
|
37
|
+
{{ file_content }}
|
|
38
|
+
```
|
|
39
|
+
{% endfor %}
|
|
40
|
+
{% endif %}
|
|
41
|
+
|
|
42
|
+
{% if documentation_results %}
|
|
43
|
+
**Relevant Documentation:**
|
|
44
|
+
```
|
|
45
|
+
{{documentation_results}}
|
|
46
|
+
```
|
|
47
|
+
{% endif %}
|
|
48
|
+
|
|
49
|
+
## Response Guidelines
|
|
50
|
+
|
|
51
|
+
### When Explaining Bot Behavior ("Why did the assistant say that?")
|
|
52
|
+
1. **Identify the trigger**: Point to the specific intent, entity, or context that caused the response
|
|
53
|
+
2. **Trace the flow**: Show the path through flows that led to this response
|
|
54
|
+
3. **Provide code references**: Show exact lines in domain.yml, flows.yml, or actions.py
|
|
55
|
+
4. **Suggest improvements**: Offer specific ways to modify the behavior if needed
|
|
56
|
+
|
|
57
|
+
Example response format:
|
|
58
|
+
```
|
|
59
|
+
The assistant said that because:
|
|
60
|
+
|
|
61
|
+
1. **Intent triggered**: `ask_balance` (confidence: 0.95)
|
|
62
|
+
2. **Flow matched**: Line 23 in flows.yml - "balance inquiry flow"
|
|
63
|
+
3. **Response used**: `utter_ask_for_account_details` from domain.yml line 45
|
|
64
|
+
|
|
65
|
+
The response is defined in your domain.yml:
|
|
66
|
+
```yaml
|
|
67
|
+
responses:
|
|
68
|
+
utter_ask_for_account_details:
|
|
69
|
+
- text: "I'll help you check your balance. Could you please provide your account number?"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
To customize this, you can modify the text in domain.yml or create a custom action.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### When Helping with Customization ("Make it branded")
|
|
76
|
+
1. **Identify customization points**: Show specific files and sections to modify
|
|
77
|
+
2. **Provide exact code**: Give complete, ready-to-use YAML or Python code
|
|
78
|
+
3. **Explain the impact**: Describe how changes affect user experience
|
|
79
|
+
4. **Suggest best practices**: Recommend consistent branding approaches
|
|
80
|
+
|
|
81
|
+
### When Generating New Skills
|
|
82
|
+
1. **Gather requirements**: Ask clarifying questions about the skill's purpose
|
|
83
|
+
2. **Design the flow**: Outline the conversation structure
|
|
84
|
+
3. **Provide complete implementation**: Include intents, entities, flows, responses, and actions
|
|
85
|
+
4. **Test scenarios**: Suggest test cases to validate the skill
|
|
86
|
+
5. **Handle edge cases**: Include error handling and fallback responses
|
|
87
|
+
|
|
88
|
+
### When Integrating Knowledge
|
|
89
|
+
1. **Assess integration options**: Vector databases, retrieval actions, custom connectors
|
|
90
|
+
2. **Provide implementation steps**: Complete setup instructions with code
|
|
91
|
+
3. **Show preview changes**: Demonstrate how responses will change
|
|
92
|
+
4. **Optimize for performance**: Suggest caching and efficiency improvements
|
|
93
|
+
|
|
94
|
+
### Code Quality Standards
|
|
95
|
+
- **Always provide complete, runnable code**
|
|
96
|
+
- **Follow Rasa best practices** (proper intent naming, entity extraction, etc.)
|
|
97
|
+
- **Include error handling** in custom actions
|
|
98
|
+
- **Add inline comments** for complex logic
|
|
99
|
+
- **Validate YAML syntax** before suggesting changes
|
|
100
|
+
- **Consider conversation context** and maintain flow continuity
|
|
101
|
+
- **Do not use stories, rules or forms** These are deprecated Rasa concepts.
|
|
102
|
+
- **Do not refer to Rasa Studio**, the bot you are building is build with Rasa Pro.
|
|
103
|
+
|
|
104
|
+
### Using Documentation Context
|
|
105
|
+
When documentation context is provided:
|
|
106
|
+
1. **Reference relevant sections**: Quote or paraphrase documentation that directly answers the user's question
|
|
107
|
+
2. **Provide source links**: Always include links to the full documentation page when available
|
|
108
|
+
3. **Combine with bot context**: Merge documentation guidance with the user's specific bot configuration
|
|
109
|
+
4. **Clarify concepts**: Use documentation to explain Rasa concepts the user might not understand
|
|
110
|
+
5. **Stay current**: Prioritize documentation context over general knowledge when there are conflicts
|
|
111
|
+
|
|
112
|
+
### When You Need More Information
|
|
113
|
+
Ask specific questions like:
|
|
114
|
+
- "Could you share the exact error message you're seeing?"
|
|
115
|
+
- "What should happen when the user says [specific phrase]?"
|
|
116
|
+
- "Do you want this to work for all users or specific user types?"
|
|
117
|
+
- "Should this integrate with any external systems?"
|
|
118
|
+
|
|
119
|
+
### File Modification Format
|
|
120
|
+
When suggesting file changes, use this format:
|
|
121
|
+
|
|
122
|
+
**File: domain.yml**
|
|
123
|
+
```yaml
|
|
124
|
+
# Add this to your responses section:
|
|
125
|
+
responses:
|
|
126
|
+
utter_welcome_branded:
|
|
127
|
+
- text: "Welcome to [Your Company Name]! I'm here to help with your banking needs."
|
|
128
|
+
- text: "Hi there! I'm [Bot Name], your personal banking assistant."
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**File: actions.py**
|
|
132
|
+
```python
|
|
133
|
+
# Add this new action:
|
|
134
|
+
class ActionCustomBalance(Action):
|
|
135
|
+
def name(self) -> Text:
|
|
136
|
+
return "action_get_balance"
|
|
137
|
+
|
|
138
|
+
def run(self, dispatcher, tracker, domain):
|
|
139
|
+
# Your implementation here
|
|
140
|
+
return []
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Error Handling
|
|
144
|
+
When users encounter errors:
|
|
145
|
+
1. **Reproduce the issue**: Show understanding of the problem
|
|
146
|
+
2. **Identify root cause**: Point to specific configuration issues
|
|
147
|
+
3. **Provide step-by-step fix**: Clear instructions with code examples
|
|
148
|
+
4. **Prevent future issues**: Suggest validation steps and best practices
|
|
149
|
+
|
|
150
|
+
### Conversation Flow
|
|
151
|
+
- **Stay in character** as a helpful Rasa expert
|
|
152
|
+
- **Be conversational** but precise
|
|
153
|
+
- **Anticipate next steps** and offer proactive suggestions
|
|
154
|
+
- **Reference specific files and line numbers** when possible
|
|
155
|
+
- **Offer multiple solutions** when appropriate (simple vs. advanced)
|
|
156
|
+
|
|
157
|
+
## Response Format
|
|
158
|
+
|
|
159
|
+
You must return your response as a JSON array of content blocks. Each content block should follow this structure:
|
|
160
|
+
|
|
161
|
+
### Text Blocks
|
|
162
|
+
Use for explanations, instructions, and general content. Supports markdown formatting:
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"type": "text",
|
|
166
|
+
"text": "Great question! The assistant said that because it triggered the `ask_balance` intent. Here's what happened:\n\n1. **Intent Recognition**: Your message matched the `ask_balance` intent\n2. **Flow Flow**: This triggered the flow defined in your `flows.yml`\n3. **Response**: The bot used `utter_ask_for_account_details` from your domain"
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Code Blocks
|
|
171
|
+
Use for generic code examples and snippets:
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"type": "code",
|
|
175
|
+
"text": "responses:\n utter_greet:\n - text: \"Hello! How can I help you today?\"\n - text: \"Hi there! I'm here to assist you.\"",
|
|
176
|
+
"language": "yaml"
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### File Blocks
|
|
181
|
+
**Use whenever possible** to provide specific changes that apply to the user's bot:
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"type": "file",
|
|
185
|
+
"file": "domain.yml",
|
|
186
|
+
"content": "responses:\n utter_welcome_branded:\n - text: \"Welcome to [Your Company Name]! I'm here to help.\"\n - text: \"Hi! I'm [Bot Name], your personal assistant.\""
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Link Blocks
|
|
191
|
+
Use to reference Rasa documentation:
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"type": "link",
|
|
195
|
+
"text": "https://rasa.com/docs/rasa/domain"
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Response Guidelines:
|
|
200
|
+
- **Always return a JSON array** of content blocks
|
|
201
|
+
- **Prefer file blocks** over code blocks when providing bot-specific changes
|
|
202
|
+
- **Use multiple content blocks** as needed to fully answer the question
|
|
203
|
+
- **Include relevant documentation links** from https://rasa.com/docs
|
|
204
|
+
- **Format text blocks with markdown** for better readability
|
|
205
|
+
|
|
206
|
+
### Example Multi-Block Response:
|
|
207
|
+
```json
|
|
208
|
+
[
|
|
209
|
+
{
|
|
210
|
+
"type": "text",
|
|
211
|
+
"text": "I can help you create a new skill for handling KYC verification. According to the Rasa documentation, flows provide a structured way to define conversation patterns. This will require several components:"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"type": "file",
|
|
215
|
+
"file": "domain.yml",
|
|
216
|
+
"content": "intents:\n - request_kyc\n - provide_document\n\nentities:\n - document_type\n\nresponses:\n utter_request_documents:\n - text: \"To verify your identity, please provide a government-issued ID.\""
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"type": "file",
|
|
220
|
+
"file": "flows.yml",
|
|
221
|
+
"content": "flows:\n kyc_verification:\n description: Handle KYC document verification\n start_conditions:\n - intent: request_kyc\n steps:\n - action: utter_request_documents\n - intent: provide_document\n - action: action_process_kyc_document"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "file",
|
|
225
|
+
"file": "data/nlu.yml",
|
|
226
|
+
"content": "- intent: request_kyc\n examples: |\n - I need to verify my identity\n - How do I complete KYC\n - What documents do you need"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"type": "text",
|
|
230
|
+
"text": "For more detailed information about flows and custom actions, check out these documentation pages:"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"type": "link",
|
|
234
|
+
"text": "https://rasa.com/docs/rasa/flows"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"type": "link",
|
|
238
|
+
"text": "https://rasa.com/docs/rasa/custom-actions"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Remember: Your goal is to make Rasa development accessible and efficient. Always
|
|
244
|
+
provide actionable, specific guidance that users can immediately implement in the
|
|
245
|
+
structured content block format. Keep your response short and concise.
|
rasa/builder/prompt_to_bot.py
CHANGED
|
@@ -49,7 +49,12 @@ structlogger = structlog.get_logger()
|
|
|
49
49
|
|
|
50
50
|
DEFAULT_SKILL_GENERATION_SYSTEM_PROMPT = importlib.resources.read_text(
|
|
51
51
|
"rasa.builder",
|
|
52
|
-
"skill_to_bot_prompt.
|
|
52
|
+
"skill_to_bot_prompt.jinja2",
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
DEFAULT_LLM_HELPER_SYSTEM_PROMPT = importlib.resources.read_text(
|
|
56
|
+
"rasa.builder",
|
|
57
|
+
"llm_helper_prompt.jinja2",
|
|
53
58
|
)
|
|
54
59
|
|
|
55
60
|
VECTOR_STORE_ID = "vs_685123376e288191a005b6b144d3026f"
|
|
@@ -316,19 +321,15 @@ class PromptToBotService:
|
|
|
316
321
|
}
|
|
317
322
|
|
|
318
323
|
async def generate_rasa_project_with_retries(
|
|
319
|
-
self,
|
|
324
|
+
self, skill_description: str, config: Dict[str, Any], max_retry_count: int = 5
|
|
320
325
|
) -> Dict[str, Any]:
|
|
321
326
|
"""Generate Rasa project data with retry logic."""
|
|
322
|
-
initial_messages = self.prompt_messages(
|
|
327
|
+
initial_messages = self.prompt_messages(skill_description)
|
|
323
328
|
|
|
324
329
|
async def _generate(messages: List[Dict[str, Any]], tries_left: int):
|
|
325
330
|
rasa_project_data = await self.generate_rasa_project(messages)
|
|
326
331
|
self.update_stored_bot_data(rasa_project_data, config)
|
|
327
332
|
|
|
328
|
-
# write the data to a file
|
|
329
|
-
with open(f"rasa_project_{tries_left}.json", "w") as f:
|
|
330
|
-
json.dump(rasa_project_data, f)
|
|
331
|
-
|
|
332
333
|
structlogger.info(
|
|
333
334
|
"prompt_to_bot.generate_rasa_project_with_retries.generated_project",
|
|
334
335
|
tries_left=tries_left,
|
|
@@ -383,9 +384,9 @@ class PromptToBotService:
|
|
|
383
384
|
|
|
384
385
|
return await _generate(initial_messages, max_retry_count)
|
|
385
386
|
|
|
386
|
-
def prompt_messages(self,
|
|
387
|
+
def prompt_messages(self, skill_description: str) -> List[Dict[str, Any]]:
|
|
387
388
|
system_prompt = Template(DEFAULT_SKILL_GENERATION_SYSTEM_PROMPT).render(
|
|
388
|
-
|
|
389
|
+
skill_description=skill_description
|
|
389
390
|
)
|
|
390
391
|
|
|
391
392
|
return [
|
|
@@ -484,10 +485,28 @@ class PromptToBotService:
|
|
|
484
485
|
result += f"Assistant: {part.get('text')}\n"
|
|
485
486
|
return result
|
|
486
487
|
|
|
488
|
+
def llm_helper_prompt_messages(
|
|
489
|
+
self,
|
|
490
|
+
current_conversation: str,
|
|
491
|
+
bot_logs: str,
|
|
492
|
+
chat_bot_files: Dict[str, str],
|
|
493
|
+
documentation_results: str,
|
|
494
|
+
) -> List[Dict[str, Any]]:
|
|
495
|
+
system_prompt = Template(DEFAULT_LLM_HELPER_SYSTEM_PROMPT).render(
|
|
496
|
+
current_conversation=current_conversation,
|
|
497
|
+
bot_logs=bot_logs,
|
|
498
|
+
chat_bot_files=chat_bot_files,
|
|
499
|
+
documentation_results=documentation_results,
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
return [
|
|
503
|
+
{"role": "system", "content": system_prompt},
|
|
504
|
+
]
|
|
505
|
+
|
|
487
506
|
async def llm_builder(self, request):
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
507
|
+
current_conversation = await self.generate_chat_bot_context()
|
|
508
|
+
bot_logs = "\n".join(recent_logs)
|
|
509
|
+
chat_bot_files = self.bot_files
|
|
491
510
|
user_chat_history = request.json.get("messages", [])
|
|
492
511
|
chat_dump = self.format_chat_dump(user_chat_history)
|
|
493
512
|
|
|
@@ -500,88 +519,23 @@ class PromptToBotService:
|
|
|
500
519
|
rewrite_query=True,
|
|
501
520
|
)
|
|
502
521
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
{{
|
|
513
|
-
"type": "text",
|
|
514
|
-
"text": "Great question, you can take a look at the following resource:"
|
|
515
|
-
}}
|
|
516
|
-
The type can be one of the following: text, link, file, code.
|
|
517
|
-
When using a block of type `text`, the `text` attribute can contain markdown.
|
|
518
|
-
Use markdown to format the text when needed.
|
|
519
|
-
The text is the text of the content block.
|
|
520
|
-
|
|
521
|
-
Code blocks:
|
|
522
|
-
{{
|
|
523
|
-
"type": "code",
|
|
524
|
-
"text": "- action: utter_greet\n next: END\n",
|
|
525
|
-
"language": "yaml"
|
|
526
|
-
}}
|
|
527
|
-
Use code blocks to provide generic code examples. Whenever possible,
|
|
528
|
-
use file blocks to provide the user with changes that apply to their bot.
|
|
529
|
-
|
|
530
|
-
Link blocks:
|
|
531
|
-
{{
|
|
532
|
-
"type": "link",
|
|
533
|
-
"text": "http://rasa.com/docs/rasa/core/flows"
|
|
534
|
-
}}
|
|
535
|
-
|
|
536
|
-
File blocks:
|
|
537
|
-
{{
|
|
538
|
-
"type": "file",
|
|
539
|
-
"file": "flows.yml",
|
|
540
|
-
"content": "- action: utter_greet\n next: END\n",
|
|
541
|
-
}}
|
|
542
|
-
Whenever possible, use file blocks to provide the user with changes
|
|
543
|
-
that apply to their bot.
|
|
544
|
-
|
|
545
|
-
You can use multiple content blocks to answer the user's question. Return
|
|
546
|
-
as many content blocks as needed.
|
|
547
|
-
|
|
548
|
-
Create links to https://rasa.com/docs for the user to take a look at.
|
|
549
|
-
|
|
550
|
-
----
|
|
551
|
-
Logs from chatbot framework:
|
|
552
|
-
{recent_logs_context}
|
|
553
|
-
|
|
554
|
-
----
|
|
555
|
-
Most recent conversation of the user with the chatbot:
|
|
556
|
-
{json.dumps(chat_bot_context)}
|
|
557
|
-
|
|
558
|
-
----
|
|
559
|
-
Chat bot files for this project (name and content):
|
|
560
|
-
{json.dumps(chat_bot_files_context)}
|
|
561
|
-
|
|
562
|
-
----
|
|
563
|
-
Documentation Context:
|
|
564
|
-
{formatted_results}
|
|
565
|
-
|
|
566
|
-
----
|
|
567
|
-
Respond with a json array of content blocks. Keep the response
|
|
568
|
-
short and concise.
|
|
569
|
-
""")
|
|
570
|
-
|
|
571
|
-
past_messages = []
|
|
522
|
+
documentation_results = self.format_results(results.data)
|
|
523
|
+
|
|
524
|
+
messages = self.llm_helper_prompt_messages(
|
|
525
|
+
current_conversation,
|
|
526
|
+
bot_logs,
|
|
527
|
+
chat_bot_files,
|
|
528
|
+
documentation_results,
|
|
529
|
+
)
|
|
530
|
+
|
|
572
531
|
for message in user_chat_history:
|
|
573
|
-
|
|
532
|
+
messages.append(
|
|
574
533
|
{
|
|
575
534
|
"role": "user" if message.get("type") == "user" else "assistant",
|
|
576
535
|
"content": json.dumps(message.get("content")),
|
|
577
536
|
}
|
|
578
537
|
)
|
|
579
538
|
|
|
580
|
-
messages = [
|
|
581
|
-
{"role": "system", "content": prompt},
|
|
582
|
-
*past_messages,
|
|
583
|
-
]
|
|
584
|
-
|
|
585
539
|
llm_helper_schema = read_json_file(
|
|
586
540
|
importlib_resources.files(PACKAGE_NAME).joinpath(
|
|
587
541
|
"builder/llm-helper-schema.json"
|
|
@@ -127,11 +127,11 @@ CALM BOT JSON:
|
|
|
127
127
|
- Use `steps` to outline the conversation flow
|
|
128
128
|
- Implement `collect` steps for gathering information
|
|
129
129
|
- `collect` steps should reference an existing slot
|
|
130
|
-
- For a collect step referencing a slot `A`, there should be a corresponding `utter_ask_A`
|
|
130
|
+
- For a collect step referencing a slot `A`, there should be a corresponding `utter_ask_A`
|
|
131
131
|
utterance that is used in the collect step to ask for the information to be stored in `A`
|
|
132
132
|
- Use `action` steps for custom actions
|
|
133
133
|
- Implement conditional logic with `if`, `then`, and `else` where appropriate
|
|
134
|
-
- Use `next` to define the flow between steps. If the flow should end after a step, add next: END.
|
|
134
|
+
- Use `next` to define the flow between steps. If the flow should end after a step, add next: END.
|
|
135
135
|
- The content after `then` or `else` can be: the id of another step defined in the flow, a list of steps, or an END
|
|
136
136
|
- End the flow with an appropriate action or message
|
|
137
137
|
|
|
@@ -155,4 +155,5 @@ CALM BOT JSON:
|
|
|
155
155
|
|
|
156
156
|
Now, please generate Rasa CALM flow and domain JSON configuration for the following skill description:
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
USER_SKILL_DESCRIPTION:
|
|
159
|
+
{{skill_description}}
|
|
@@ -229,7 +229,14 @@ class StudioChatInput(SocketIOInput, VoiceInputChannel):
|
|
|
229
229
|
|
|
230
230
|
Triggers a tracker update notification after processing the message.
|
|
231
231
|
"""
|
|
232
|
-
|
|
232
|
+
try:
|
|
233
|
+
await on_new_message(message)
|
|
234
|
+
except Exception as e:
|
|
235
|
+
structlogger.exception(
|
|
236
|
+
"studio_chat.on_new_message.error",
|
|
237
|
+
error=str(e),
|
|
238
|
+
sender_id=message.sender_id,
|
|
239
|
+
)
|
|
233
240
|
|
|
234
241
|
if not self.agent:
|
|
235
242
|
structlogger.error("studio_chat.on_message_proxy.agent_not_initialized")
|
|
@@ -439,8 +446,15 @@ class StudioChatInput(SocketIOInput, VoiceInputChannel):
|
|
|
439
446
|
ws.put_message(data)
|
|
440
447
|
return
|
|
441
448
|
|
|
442
|
-
|
|
443
|
-
|
|
449
|
+
try:
|
|
450
|
+
# Handle text messages
|
|
451
|
+
await self.handle_user_message(sid, data, on_new_message)
|
|
452
|
+
except Exception as e:
|
|
453
|
+
structlogger.exception(
|
|
454
|
+
"studio_chat.sio.handle_message.error",
|
|
455
|
+
error=str(e),
|
|
456
|
+
sid=sid,
|
|
457
|
+
)
|
|
444
458
|
|
|
445
459
|
@self.sio.on("update_tracker", namespace=self.namespace)
|
|
446
460
|
async def on_update_tracker(sid: Text, data: Dict) -> None:
|
rasa/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: rasa-pro
|
|
3
|
-
Version: 3.13.0a1.
|
|
3
|
+
Version: 3.13.0a1.dev6
|
|
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
|
|
@@ -5,9 +5,10 @@ rasa/builder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
5
5
|
rasa/builder/create_openai_vector_store.py,sha256=GeOV5Wa5snNr6PNOnRcLjltKrG2NyydeRgGvs81n37g,1929
|
|
6
6
|
rasa/builder/llm-helper-schema.json,sha256=z5IJc_-2mZ9oQ-z-9WzTivOoqYsLXCAm8MIOTWy5rGs,1609
|
|
7
7
|
rasa/builder/llm_context.py,sha256=zy7htrXgS_QWJWeEj4TfseQgTI65whFJR_4GKm_iOvE,2826
|
|
8
|
-
rasa/builder/
|
|
8
|
+
rasa/builder/llm_helper_prompt.jinja2,sha256=AhfEzXYIMTmWgd2TgVmPVeCfojHA29IiuO6JhTOXXKY,9585
|
|
9
|
+
rasa/builder/prompt_to_bot.py,sha256=EoWzwsg1PdIgYUReRNhQSguIEOLdMf_sNWHPSpFYxLU,22257
|
|
9
10
|
rasa/builder/scrape_rasa_docs.py,sha256=HukkTCIh1rMCE8D_EtXGHy0aHtFBVrVTT_6Wpex3XQM,2428
|
|
10
|
-
rasa/builder/skill_to_bot_prompt.
|
|
11
|
+
rasa/builder/skill_to_bot_prompt.jinja2,sha256=NPQrQpSfrxF1IAZutkRSW7_hmho36WM9b77Pyqb5oxs,5369
|
|
11
12
|
rasa/cli/__init__.py,sha256=eO5vp9rFCANtbTVU-pxN3iMBKw4p9WRcgzytt9MzinY,115
|
|
12
13
|
rasa/cli/arguments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
14
|
rasa/cli/arguments/data.py,sha256=e3mYapaRIczM74P5genuXy1ORqIR4x20khQXUvy8JLA,3040
|
|
@@ -260,7 +261,7 @@ rasa/core/channels/rest.py,sha256=LWBYBdVzOz5Vv5tZCkB1QA7LxXJFTeC87CQLAi_ZGeI,73
|
|
|
260
261
|
rasa/core/channels/rocketchat.py,sha256=hajaH6549CjEYFM5jSapw1DQKBPKTXbn7cVSuZzknmI,5999
|
|
261
262
|
rasa/core/channels/slack.py,sha256=jVsTTUu9wUjukPoIsAhbee9o0QFUMCNlQHbR8LTcMBc,24406
|
|
262
263
|
rasa/core/channels/socketio.py,sha256=ZEavmx2on9AH73cuIFSGMKn1LHJhzcQVaqrFz7SH-CE,11348
|
|
263
|
-
rasa/core/channels/studio_chat.py,sha256=
|
|
264
|
+
rasa/core/channels/studio_chat.py,sha256=b61PxuvvRNStmVsDHiz_INQ1N14KbeIY3gztt4QQi28,20007
|
|
264
265
|
rasa/core/channels/telegram.py,sha256=TKVknsk3U9tYeY1a8bzlhqkltWmZfGSOvrcmwa9qozc,12499
|
|
265
266
|
rasa/core/channels/twilio.py,sha256=2BTQpyx0b0yPpc0A2BHYfxLPgodrLGLs8nq6i3lVGAM,5906
|
|
266
267
|
rasa/core/channels/vier_cvg.py,sha256=5O4yx0TDQIMppvlCxTOzmPB60CA-vqQXqWQ7upfrTO0,13496
|
|
@@ -848,9 +849,9 @@ rasa/utils/train_utils.py,sha256=ClJx-6x3-h3Vt6mskacgkcCUJTMXjFPe3zAcy_DfmaU,212
|
|
|
848
849
|
rasa/utils/url_tools.py,sha256=dZ1HGkVdWTJB7zYEdwoDIrEuyX9HE5WsxKKFVsXBLE0,1218
|
|
849
850
|
rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
|
|
850
851
|
rasa/validator.py,sha256=IRhLfcgCpps0wSpokOvUGNaY8t8GsmeSmPOUVRKeOeE,83087
|
|
851
|
-
rasa/version.py,sha256=
|
|
852
|
-
rasa_pro-3.13.0a1.
|
|
853
|
-
rasa_pro-3.13.0a1.
|
|
854
|
-
rasa_pro-3.13.0a1.
|
|
855
|
-
rasa_pro-3.13.0a1.
|
|
856
|
-
rasa_pro-3.13.0a1.
|
|
852
|
+
rasa/version.py,sha256=IZ2ybsKOBWTR0KSRoc80l0EOgaRAf-MH27mX4j-rvw0,124
|
|
853
|
+
rasa_pro-3.13.0a1.dev6.dist-info/METADATA,sha256=I0gXAqseW9UEzuLDgxOTpvue2duKhy497BPcQJFJGr0,10562
|
|
854
|
+
rasa_pro-3.13.0a1.dev6.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
|
|
855
|
+
rasa_pro-3.13.0a1.dev6.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
856
|
+
rasa_pro-3.13.0a1.dev6.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
|
|
857
|
+
rasa_pro-3.13.0a1.dev6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|