# Creating ChatBots & Inference API's

{% hint style="warning" %}
In case you dont have an account with us, follow the steps [here](https://andromeda-labs-1.gitbook.io/andromeda-labs/services/quickstart) or follow the steps below to get started.
{% endhint %}

### Navigating the Meda Dashboard

Once verified, you'll have access to your personal dashboard

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2Fki3fpwl68erMf1InsKQR%2Fimage.png?alt=media&#x26;token=1022401c-dda9-4dab-b5b9-56f75d975493" alt=""><figcaption><p>Those are the differnt sections you could navigate</p></figcaption></figure>

Our Interface is very straight forward, it currently allows you to add data sources;

### Adding data sources

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FRfQXfyYXRXAsF1RRaI54%2Fimage.png?alt=media&#x26;token=9bd2ecbe-108a-4fe1-a63a-79170b7b5935" alt=""><figcaption><p>Click the Create Source Button</p></figcaption></figure>

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2F4S6n6jedPdUzDXXhQb5O%2Fimage.png?alt=media&#x26;token=f47f237e-f734-4a8b-afaf-58b408ae0968" alt=""><figcaption><p>The reset here is straight forward;</p></figcaption></figure>

We support sources that include **Web page** urls, **PDF** documents (For now) and also plain text that you can paste directly in our interface;

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FPrYZpEgLxWgxCoVUtYsJ%2Fimage.png?alt=media&#x26;token=2a63a737-e093-4a0a-a482-5031a94dc81b" alt=""><figcaption></figcaption></figure>

We provide AI powered means of improving the uploaded content, making it easier to generate better information;

{% hint style="info" %}
The AI models availed to you depend on the plan you have subscribed to, the more advanced the plan, the better the tools availed;
{% endhint %}

### **Data Source Management**

You can also edit and delete the data sources according&#x20;

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2F4mvtJ6EoS3KGb0vKteZ2%2Fimage.png?alt=media&#x26;token=fa228d92-43cf-43f3-a028-8ea7a3a3bc55" alt=""><figcaption></figcaption></figure>

### **Creating Assets (**<mark style="background-color:blue;">ChatBots & Inference</mark>**)**

> For Both Chatbots & Inference API',s its required the creation process is slightly the same however their configuration is different.

Using the data sources created you can now create Inference API's, ChatBots, Summarization Endpoints Etc ;

1. Click Create Asset, and choose what kind of asset you wish to create

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FFOSHktgxtI2TTIfoCQUA%2Fimage.png?alt=media&#x26;token=b564d28b-b19a-48c0-8198-560e617d9abf" alt=""><figcaption><p>Choose ChatBot In Case you want to create one</p></figcaption></figure>

2. Fill in the necessary details of the asset as shown above next provide a system prompt (this is required for much of the AI powered services we provide)

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2Fclv1iU6x79QqlRB6Lr9K%2Fimage.png?alt=media&#x26;token=615439cc-260e-4c1a-9f33-0b1bf1b6f4e6" alt=""><figcaption></figcaption></figure>

3. Lastly select the necessary sources that the asset may need to reason, <mark style="background-color:yellow;">you can change them later whenever you can</mark>;

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FB1FIAFVGZh5Rq8sFJTYo%2Fimage.png?alt=media&#x26;token=2709b009-5973-4754-83b0-645f34916c81" alt=""><figcaption><p>Enable those sources that you will need to use</p></figcaption></figure>

On save you will be able to view your saved Assets at the **Deployments Tab**

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FU43EEWCxYgqA7PJ4FgM9%2Fimage.png?alt=media&#x26;token=054c5888-4351-45b7-99c6-3aa96fc474d0" alt=""><figcaption><p>For an API Endpoint</p></figcaption></figure>

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2Fe9Q9CfJGkRtunrOi5UJe%2Fbot.png?alt=media&#x26;token=3945314b-8f52-486f-87fe-803796365aed" alt=""><figcaption><p>For a Chatbot</p></figcaption></figure>

## ChatBots: Configuring a Chatbot

{% hint style="info" %}
After creating a chatbot, as above you cant use it immediately, more configuration is required for it to be usable; (You will notice that each **Chatbot** instance has an indicator);

🔴 - Means the chatbot has no configuration yet

🟢 - Means the chatbot can be exported (shared)
{% endhint %}

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FpWBBCABUftDOx1dlazDi%2Fchat-1.png?alt=media&#x26;token=38488297-9901-4228-a903-d8ed56672a43" alt=""><figcaption><p>This requires configuration</p></figcaption></figure>

On clicking configure, you can now access this interface;

1. Changing the Look by adjusting the colors

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2F5bWmXDSA48nZhE7eNmOw%2Fchat-2.png?alt=media&#x26;token=a4338b36-28f8-4a8b-b969-8d45bd6f1fec" alt=""><figcaption><p>Change the interface lok</p></figcaption></figure>

2. Adding help links (more resources to help visitors of the website)

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2Fj28qi3wBAcPOX1sFppUq%2Fchat-3.png?alt=media&#x26;token=473cc364-0e7f-44b4-b7ff-ead31a2688a8" alt=""><figcaption><p>You can add as many as you want</p></figcaption></figure>

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FAlydFjjQex3a633YvhFL%2Fchat-4.png?alt=media&#x26;token=311769fc-74f4-4ce7-8ee4-359d9e918ecb" alt=""><figcaption><p>Adding more links</p></figcaption></figure>

3. Updating particulars like (Organization Information, welcome message, display position etc)

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2F3YV4NOfUfw4pqFPl0ckd%2Fchat-5.png?alt=media&#x26;token=9a246c26-f310-429d-9873-1360cf7619aa" alt=""><figcaption><p>Updating details</p></figcaption></figure>

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FymQJh4vWx6Focx92341q%2Fchat-6.png?alt=media&#x26;token=d5fbe9df-807f-4369-9dc5-fc7ad34fedf8" alt=""><figcaption><p>Adjusting positions</p></figcaption></figure>

4. Sharing the ChatBot (Using it in a website)

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FJ9lmiUYHFBuqgO7ybvHh%2Fchat-8.png?alt=media&#x26;token=1ad10758-59b3-407b-936a-2f176196d985" alt=""><figcaption><p>Green means all is well</p></figcaption></figure>

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2Flu5lCtrTuSYKuqPHsenW%2Fchat-9.png?alt=media&#x26;token=b257a22a-7a2d-4544-8202-45c5d995aa4f" alt=""><figcaption><p>Copy and embed snippet</p></figcaption></figure>

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2Fi2HK9RLujCXEuWPw5X09%2Fchat-10.png?alt=media&#x26;token=4c900409-7778-49cf-b846-b7634832b052" alt=""><figcaption><p>You can now paste the snippet anywhere in a website </p></figcaption></figure>

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FMh7vKLESdMWJLvajHARO%2Fchat-11.png?alt=media&#x26;token=bad6fd08-be6c-4ce0-b577-aaf6e003c7f1" alt=""><figcaption><p>Sample code snippet</p></figcaption></figure>

Sample Conversation

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2Fi60ZfIdCvxaGms3kdMDZ%2Fchat-12.png?alt=media&#x26;token=31c3ebfa-b54c-4e4a-9a3d-47017ed1e36e" alt=""><figcaption></figcaption></figure>

## **API's: Exporting & Accessing the API's**

Currently, to export an asset (Say an Inference API), you require the <mark style="background-color:yellow;">asset ID</mark> and your <mark style="background-color:yellow;">Account API details</mark>;

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FZMKiiHNIYKqqRw39rL4l%2Fimage.png?alt=media&#x26;token=fff745af-1427-4c84-8749-4120eaea46cd" alt=""><figcaption><p>You cane access the ASSET ID from there;</p></figcaption></figure>

**Account API details;**

Now you need to get the <mark style="background-color:yellow;">API endpoint URL</mark> which you can copy from the overview panel (On the deployments section) of your account ;

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FHJNQ2WveLy4P4Kyp9NrC%2Fimage.png?alt=media&#x26;token=e81a43ca-0e85-4bbf-a828-0d6895f9e8a3" alt=""><figcaption><p>API url endpoint</p></figcaption></figure>

{% hint style="info" %}
The same **API Endpoint** is what you will use for all **chat API,s** you have created, its different from that when interacting with hosted Machine Learning models ([see here](https://andromeda-labs-1.gitbook.io/andromeda-labs/services/hosting-machine-learning-models))
{% endhint %}

Also  <mark style="background-color:yellow;">When you click on the Quick Guide button</mark>, the following will be shown to you, this interface alsp provides you with the same API URL endpoint that is specific to your account (you will use it for all interactions);

<figure><img src="https://3445501756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX3BIBWYzdgDJ7EPeaDaH%2Fuploads%2FdsmKkTeHeDCi51UiXg1A%2Fimage.png?alt=media&#x26;token=1de7dc76-8aba-4ac2-9b36-867bf693a5d0" alt=""><figcaption></figcaption></figure>

It will require some skills with programming in any language so as to be able to use the API, or any other assets like ChatBots.

### How to access the API's programatically

Andromeda Labs also allows you to access your assets via a dedicated endpoint, that consumes the necessary data the endpoint expects ; For more information on this ; [visit here ](https://andromeda-labs-1.gitbook.io/andromeda-labs/services/accessing-api-endpoints)
