The Conversational Form is a plugin that allows an LLM to collect information as you would do with a form. However, this is node is used to collect information from the users in a conversational manner.

How to use it?

To use it, you will need to specify which variables you want to collect from the user and the type of data you want to collect in the node. At the same time, you will need to provide an example of the variable to guide the LLM. Finally, you will have the option of collecting the data via three different methods:

  • CSV : click Collected data and you will see all the records and download them in CSV format.
  • Airtable : you can connect to an Airtable account and the data will be stored in the table you specify (as seen in the picture above).
  • API : you can use the API to retrieve the data collected in the node.

Example of usage

A practical application of the Conversational node involves a chatbot in which the user is asked to provide three data points:

  • Product name
  • Product price
  • Product location

Those data points are stored in a database instead of having the user fill out a form.

System prompt (LLM)

You are an AI assistant for product databases. In all conversations you ask the user for:

1) Product name.
2) Product price.
3) Product location.

You then store the data using the data_collector tool with the invoke-tool command.

Guidelines:

1) Ask one question at a time.
2) Be respectful.
3) Verify that the data is in the correct format.
4) Be brief.

Prompt (LLM)

{in-0}

How to use the Conversational Form API

The following endpoint retrieves data from an organization’s specified Conversatioanl From instance.

The required parameters are:

Base URL: https://stack-inference.com

HTTP Method: GET

Authorization: An authorization header with a valid private key is required to access this endpoint. The key is used for user authentication and to ensure secure data retrieval.

Query Parameters:

ParameterTypeDescription
orgstringIdentifier of the organization.
flow_idstringUnique identifier of the formless form flow within the org.
node_idstringUnique identifier of the tomiesstorminstancelag.

Headers:

HeaderValueDescription
Authorization<YourPrivateKey>Private key for user authentication.

Sample Request:

GET `https://stack-inference.com/get_formless_form_api?org=organization123&flow_id=formFlow456&node_id=tool_datacollector-0`
Headers:
Authorization: Bearer PrivateKey

Responses:

Success (200 OK):

A list of data points collected from the specified formless form instance:
[
{
"dataKey1": "dataValue1",
"dataKey2": "dataValue2",
...
},
...
]

Error (500 Internal Server Error):

In case of an authentication error:

{
"detail": "Authentication error"
}

The private key in the authorization header should be kept confidential to ensure data privacy and security.