# Creating a chatbot

Creating a chatbot in Cloozo is quite straightforward. The only 2 critical requirements are OpenAI and Pinecone details. Once you have them, the entire process is self contained and smooth.

In case you are interested in a **video tutorial**, check below:

{% embed url="<https://youtu.be/Qaw3xFW4zks>" %}

***

We will go step by step.

<details>

<summary>Step 1: Create a workspace</summary>

Create a workspace. A workspace can be considered as a client or just a folder inside which you will create your chatbots.

<img src="/files/PnJax0qMNySALDFv6Q7a" alt="" data-size="original">

</details>

<details>

<summary>Step 2: Create a chatbot</summary>

After creating a workspace, click visit to go inside the workspace. Here, click 'New Chatbot' to create one.&#x20;

<img src="/files/YoRqAIPC4tFi46krGueY" alt="" data-size="original">

Give it a name and choose the type of chatbot that you want to create. It can be a chatbot&#x20;

* based on your knowledge base,&#x20;
* or it can be a one that searches the internet to provide answers.

The one with your knowledge base is specific to your provided custom data and can only respond to queries which are related to the data that you provided to your chatbot. This type of chatbot is best suited for niche industries where the key requirement is to provide customer support or guidance about a specific product.&#x20;

</details>

<details>

<summary>Step 3: Edit the chatbot details</summary>

After the chatbot is created, click 'Edit' to add the openAI details, pinecone details,  edit chatbot appearance and even set pre-defined questions known as 'Starter questions' in Cloozo.&#x20;

<img src="/files/ErGUtdJ0JPQUGXAO25OU" alt="" data-size="original">

You can fully train the chatbot by uploading your own custom data like pdf, docs and txt files. And can also input website links which will be scraped to feed the relavant data to the chatbot.

Details on how to create a pinecone account can be found here: [Pinecone Setup](/fundamentals/pinecone-setup.md)

</details>

<details>

<summary>Step 4: Generate the code</summary>

Once all the details are filled, click on Generate code to generate the embed code. Insert this code in the header part of your website.&#x20;

It can take 2 to 3 minutes for the chatbot to render on your website.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloozo.com/product-guides/creating-a-chatbot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
