# How to make generative-based chatbot using Rasa?

**URL:** <https://forum.rasa.com/t/how-to-make-generative-based-chatbot-using-rasa/50376>\
**Category:** Rasa Open Source\
**Created:** [January 3, 2022, 4:04am UTC](https://forum.rasa.com/t/how-to-make-generative-based-chatbot-using-rasa/50376 "2022-01-03T04:04:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganbaa\_elmer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ganbaa_elmer/32/18618_2.png) [@ganbaa\_elmer](https://forum.rasa.com/u/ganbaa_elmer)\
**Post date:** [January 3, 2022, 4:04am UTC](https://forum.rasa.com/t/how-to-make-generative-based-chatbot-using-rasa/50376/1 "2022-01-03T04:04:10Z")

</div>

is there any example of generative-based bot by Rasa?

i mean answer is generated from wikipedia or something?

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [January 3, 2022, 6:11am UTC](https://forum.rasa.com/t/how-to-make-generative-based-chatbot-using-rasa/50376/2 "2022-01-03T06:11:20Z")

</div>

You could use [Custom Actions](https://rasa.com/docs/action-server/sdk-actions) and look up Google/Wikipedia using them.

---

<div class="post-metadata">

**Author:** ![ganbaa\_elmer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ganbaa_elmer/32/18618_2.png) [@ganbaa\_elmer](https://forum.rasa.com/u/ganbaa_elmer)\
**Post date:** [January 3, 2022, 6:19am UTC](https://forum.rasa.com/t/how-to-make-generative-based-chatbot-using-rasa/50376/3 "2022-01-03T06:19:22Z")

</div>

@ChrisRahme how to do that do have any examples?

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [January 3, 2022, 4:17pm UTC](https://forum.rasa.com/t/how-to-make-generative-based-chatbot-using-rasa/50376/4 "2022-01-03T16:17:52Z")

</div>

In Custom Actions you can write any Python code, so the specific code is unrelated to Rasa.

The basic structure is as in the link I previously shared: You write the Python code inside the `run()` method.

You use `tracker.latest_message['text']` to get the text of that message and look it up on Wikipedia or whatever you want to do with it.

Stories and written like for regular responses, but instead of starting with `utter_`, custom action names should start with `action_`.

Please read everything under the “[Rasa Action Server](https://rasa.com/docs/action-server/)” category and everything under the “[Actions](https://rasa.com/docs/rasa/actions)” section in the “Rasa Open Source” category.
