RASA CALM tutorial: issue with integrating API call step of tutorial

Hi,

I’m still trying to follow RASA CALM tutorial but the last step when integrating API call to check for sufficient funds before transfer money does not run as expected and transfer pass even if amount pass is greater than balance set in ActionCheckSufficientFunds (1000). Even if not mentioned in tutorial at this step, I tried to re-train rasa before running inspect command. But rasa train lead to error below:

UserWarning: Loading domain from 'domain.yml' failed. Using empty domain. Error: 'Your domain uses an invalid slot mapping of type 'controlled' for slot 'has_sufficient_funds'. Please see https://rasa.com/docs/rasa-pro/nlu-based-assistants/domain#slots for more information.' 2025-03-26 16:46:42 INFO rasa.shared.core.domain - [info ] domain.from_yaml.validating 2025-03-26 16:46:42 INFO rasa.validator - [info ] Validating intents... event_key=validator.verify_intents_in_stories.start 2025-03-26 16:46:42 INFO rasa.validator - [info ] Validating uniqueness of intents and stories... event_key=validator.verify_example_repetition_in_intents.start 2025-03-26 16:46:42 INFO rasa.validator - [info ] Story structure validation... event_key=validator.verify_story_structure.start 2025-03-26 16:46:42 INFO rasa.core.training.story_conflict - Considering all preceding turns for conflict analysis. 2025-03-26 16:46:42 INFO rasa.validator - [info ] No story structure conflicts found. event_key=validator.verify_story_structure.no_conflicts 2025-03-26 16:46:42 INFO rasa.validator - [info ] validation.flows.started 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The collect step 'recipient' has neither an utterance nor an action defined, or an initial value defined in the domain.You need to define either an utterance or an action. collect=recipient event_key=validator.verify_flows_steps_against_domain.collect_step flow=transfer_money has_action_defined=False has_utterance_defined=False 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The slot 'recipient' is used in the step 'transfer_money_0_collect_recipient' of flow id 'transfer_money', but it is not listed in the domain slots. You should add it to your domain file! event_key=validator.verify_flows_steps_against_domain.slot_not_in_domain flow=transfer_money slot=recipient step=transfer_money_0_collect_recipient 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The collect step 'amount' has neither an utterance nor an action defined, or an initial value defined in the domain.You need to define either an utterance or an action. collect=amount event_key=validator.verify_flows_steps_against_domain.collect_step flow=transfer_money has_action_defined=False has_utterance_defined=False 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The slot 'amount' is used in the step 'transfer_money_1_collect_amount' of flow id 'transfer_money', but it is not listed in the domain slots. You should add it to your domain file! event_key=validator.verify_flows_steps_against_domain.slot_not_in_domain flow=transfer_money slot=amount step=transfer_money_1_collect_amount 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The action 'action_check_sufficient_funds' is used in the step 'transfer_money_2_action_check_sufficient_funds' of flow id 'transfer_money', but it is not listed in the domain file. You should add it to your domain file! action=action_check_sufficient_funds event_key=validator.verify_flows_steps_against_domain.action_not_in_domain flow=transfer_money step=transfer_money_2_action_check_sufficient_funds 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The action 'utter_insufficient_funds' is used in the step 'transfer_money_3_utter_insufficient_funds' of flow id 'transfer_money', but it is not listed in the domain file. You should add it to your domain file! action=utter_insufficient_funds event_key=validator.verify_flows_steps_against_domain.action_not_in_domain flow=transfer_money step=transfer_money_3_utter_insufficient_funds 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The collect step 'final_confirmation' has neither an utterance nor an action defined, or an initial value defined in the domain.You need to define either an utterance or an action. collect=final_confirmation event_key=validator.verify_flows_steps_against_domain.collect_step flow=transfer_money has_action_defined=False has_utterance_defined=False 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The slot 'final_confirmation' is used in the step 'final_confirmation' of flow id 'transfer_money', but it is not listed in the domain slots. You should add it to your domain file! event_key=validator.verify_flows_steps_against_domain.slot_not_in_domain flow=transfer_money slot=final_confirmation step=final_confirmation 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The action 'utter_transfer_cancelled' is used in the step 'transfer_money_5_utter_transfer_cancelled' of flow id 'transfer_money', but it is not listed in the domain file. You should add it to your domain file! action=utter_transfer_cancelled event_key=validator.verify_flows_steps_against_domain.action_not_in_domain flow=transfer_money step=transfer_money_5_utter_transfer_cancelled 2025-03-26 16:46:42 ERROR rasa.validator - [error ] The action 'utter_transfer_complete' is used in the step 'transfer_successful' of flow id 'transfer_money', but it is not listed in the domain file. You should add it to your domain file! action=utter_transfer_complete event_key=validator.verify_flows_steps_against_domain.action_not_in_domain flow=transfer_money step=transfer_successful 2025-03-26 16:46:42 ERROR rasa.validator - [error ] Detected invalid slot 'has_sufficient_funds' at step 'transfer_money_2_action_check_sufficient_funds' for flow id 'transfer_money'. Please make sure that all slots are specified in the domain file. event_key=validator.verify_namespaces.invalid_slot flow=transfer_money slot=has_sufficient_funds step=transfer_money_2_action_check_sufficient_funds 2025-03-26 16:46:42 ERROR rasa.validator - [error ] Detected invalid slot 'final_confirmation' at step 'final_confirmation' for flow id 'transfer_money'. Please make sure that all slots are specified in the domain file. event_key=validator.verify_namespaces.invalid_slot flow=transfer_money slot=final_confirmation step=final_confirmation 2025-03-26 16:46:42 INFO rasa.validator - [info ] validation.flows.ended 2025-03-26 16:46:42 ERROR rasa.cli.utils - [error ] Project validation completed with errors. event_key=cli.validate_files.project_validation_error

Hi @LECARROU, thanks for your message. Could you please show how your flow is structured? Do you use the action in the flow action_check_sufficient_funds?

I go ahead trying to implement “basic_flow_with_branching” and when I train model, I notice in logs that “action_check_sufficient_funds” has been registered and it is now working. I am a quite disappointed not to understand why sometime it works and other not

Hi @LECARROU thank you for your response. Just checking whether you’ve seen this page Rasa Pro Tutorial | Rasa Documentation? It’s a handy tutorial on how to build the CALM assistant from scratch.

Hi Marina,

Yes, I did the tutorial and it works “issues” came when I tried to start a new calm project (rasa init --template calm) which config seems to be quite different I came with issue with OPENAI quotas restrictions… I try to bypass this issue implementing Ollama LLM models but until now I still have issues with OPENAI KEY even if normally config do not refer to OPENAI

config.yml

recipe: default.v1 language: en pipeline:

  • name: CompactLLMCommandGenerator llm: model_group: ollama-gemma3-1b policies:
  • name: FlowPolicy
  • name: IntentlessPolicy assistant_id: 20250328-141853-unary-vial

endpoints.yml

action_endpoint: actions_module: “actions”

model_groups:

  • id: ollama-gemma3-1b models:
  • provider: ollama base_url: http://localhost:11434 model: gemma3:1b request_timeout: 7 max_tokens: 512

still not able to train may model (excpet if I set flow_retrieval to False but I want ti use Entreprise search functionnalities)

Give Feedback / Get Help: Sign in to GitHub · GitHub LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True’.

Provider List: Providers | liteLLM

Provider List: Providers | liteLLM

2025-03-28 17:00:44 ERROR rasa.dialogue_understanding.generator.flow_retrieval - [error ] Failed to populate the FAISS store with the provided flows. error=ProviderClientAPIException(‘Failed to embed documents\nOriginal error: litellm.APIConnectionError: OllamaException - Connection error.)’) error_type=ProviderClientAPIException event_key=flow_retrieval.populate_vector_store.not_populated 2025-03-28 17:00:44 ERROR rasa.dialogue_understanding.generator.llm_based_command_generator - [error ] Flow retrieval store is inaccessible. error=ProviderClientAPIException(‘Failed to embed documents\nOriginal error: litellm.APIConnectionError: OllamaException - Connection error.)’) event_key=llm_based_command_generator.train.failed 2025-03-28 17:00:44 ERROR rasa.engine.graph - [error ] graph.node.error_running_component node_name=train_CompactLLMCommandGenerator0 2025-03-28 17:00:44 ERROR rasa.main - [error ] ProviderClientAPIException: Failed to embed documents Original error: litellm.APIConnectionError: OllamaException - Connection error. event_key=cli.exception.rasa_exception

my current config, following rasa CALM docs and Rasa CAML forum

config.yml

recipe: default.v1 language: en pipeline:

  • name: CompactLLMCommandGenerator llm: model_group: ollama-gemma3-1b flow_retrieval: embeddings: model_group: text_embedding_model policies:
  • name: RulePolicy # Remplace FlowPolicy si problème
  • name: MemoizationPolicy assistant_id: 20250328-161232-caramelized-continent

endpoints.yml

action_endpoint: actions_module: “actions”

model_groups:

  • id: ollama-gemma3-1b models:
  • provider: ollama api_base: “http://localhost:11434” model: gemma3:1b
  • id: text_embedding_model models:
  • provider: ollama api_base: “http://localhost:11434” model: text-embedding-ada-002

Hi @LECARROU thank you for sharing, let me check and get back to you on this

Hi @LECARROU thanks again for your question. If you want to use text-embedding-ada-002 for your Enterprise Search you’d need to add your OpenAI API Key, or you could try using another embedding model which is available from Ollama. We’ve recently published a tutorial on how to customise Enterprise Search parameters.