Skip to content
FlexiPedia logo

X.AI Integration

Unlock the full potential of your Flexito OmniAI chatbot by integrating it with http://x.AI . This powerful combination enables dynamic, context-aware interactions, automating tasks like customer support and reservations with ease. Discover how to set up and optimise your chatbot

Flexito OmniAI
Beginnerv4
Read in:

Listen to an audio overview

A short, AI-generated podcast-style summary of this article.

Unlock the full potential of your Flexito OmniAI chatbot by integrating it with . This powerful combination enables dynamic, context-aware interactions, automating tasks like customer support and reservations with ease. Discover how to set up and optimise your chatbot for a seamless user experience.

Integration

Integrating with your Flexito OmniAI chatbot enhances its capabilities, providing personalised, context-sensitive responses and advanced automation features.

This guide will walk you through the process of setting up your API key, configuring the integration, and designing customised chatbot flows to suit your business requirements.

Step 1: Generate Your API Key

To begin using the integration, you need to create an API key. Visit the platform in your browser, and within your account, follow the instructions shown in the image below to generate your unique API key.

Step 2: Copy Your API Key and Await Provisioning

After generating the API key, copy it and wait for the provisioning process to complete. This might take a few moments. Ensure the status shows that the key is ready for use before moving forward.

Step 3: Set Up the API Key in Flexito OmniAI

  1. Access the Integrations section in your Flexito OmniAI dashboard.

  2. Find and paste your copied API key into the specified field.

  3. Click Save and ensure the status changes to “Verified.”

Once the status is verified, you can start using in your chatbot flows.

Incorporating into Your Flows

To integrate into your chatbot workflows, follow these steps:

  1. Open your bot in Flexito OmniAI.

  2. Go to an Action Node in your flow.

  3. Select Integrations and choose .

From this point, you can set up the integration to carry out various actions, such as Chat Completions.

Key Features and Configuration Options

Chat Completion

This feature lets you use to produce dynamic responses during user interactions. Below are the configuration fields and their descriptions:

Input Parameters

System Message: This optional field provides context about your business or bot. For instance, if you're creating a restaurant chatbot, you might use something like this: System: You are a Flexito OmniAI steak restaurant assistant. You will handle customer support, guide users, and book reservations. The restaurant operates from 9 am to 8 pm Monday to Saturday. No pets are allowed. Always offer the coupon code if applicable.

  • This helps the AI generate responses that align with your business rules.

Message: This is the main user input or prompt for which you want the AI to generate a response. For example: User: How can I make a reservation?

  • You can use the system field {{last_text_input}} to dynamically pass user input.

  • System JSON Field ({{XAi}}):

  • This field keeps track of the entire conversation history, including system setup and user interactions. The JSON is limited to 20,000 characters, and older entries will be deleted once this limit is reached.

Model

Choose the AI model you wish to use. The default model is grok-beta.

Max Tokens

This limits the number of tokens used during a task, helping to control response length and token usage.

Temperature

This setting influences the randomness of responses.

  • Higher values (e.g., 1.0) result in more creative answers.

  • Lower values (e.g., 0.2) produce more predictable answers.

Presence Penalty

This encourages the AI to generate unique phrases. Higher values decrease repetition.

Frequency Penalty

This controls how much to penalise new tokens based on their frequency in the text so far.

  • Default Value: 0

  • Behaviour:

  • A higher value discourages the AI from repeating lines or phrases verbatim.

  • A value of 0 allows responses to have natural repetitions.

Recommendation: Adjust this setting if you want less repetitive responses.

Stop Sequences

This defines up to four sequences where the AI will stop generating tokens.

Number of Completions

This specifies how many responses the AI should generate for a single prompt.

  • Default Value: 1

  • Caution: Setting a higher value will consume more tokens and API quota.

This is best used when you want multiple variations of the response for comparison.

Example Usage: Generate three options to select the most suitable reply for a customer query.

Testing the Configuration

  1. Make a test request.

  2. Map the assistant's response to a Custom User Field (e.g., a text field).

  3. Save your configuration.

Sample Response:

json

{

"id": "3b52aa21-8cba- (tel:)d4bbe1f2",

"object": "chat.completion",

"created": (tel:),

"model": "grok-beta",

"choices": [

{

"index": 0,

"message": {

"role": "assistant",

"content": "To make a reservation at our steak restaurant, please provide me with the following details: - Date and Time for your reservation - The number of people in your party - Your name - A contact number or email address for confirmation. Once I have this information, I can check availability and proceed with booking your reservation."

},

"finish_reason": "stop"

}

],

"usage": {

"prompt_tokens": 78,

"completion_tokens": 139,

"total_tokens": 217

}

}

Designing a Chatbot Flow

After setting up the integration, you can create sophisticated chatbot flows. For example:

  1. Add a Text Question Node to send the response and capture the user input.

  1. Use the </> symbol to search for the Custom User Field that stores the response.

This is an example of a simple flow that can be used as a standard response. You can use your creativity to design flows tailored to your specific needs:

Innovative Use Cases

This integration can be customised to suit your business needs. For example:

  • Automating restaurant bookings.

  • Answering FAQs with dynamic, context-aware responses.

  • Offering personalised recommendations based on user input.

By leveraging the capabilities of , you can create efficient, intuitive, and highly responsive chatbot experiences for your users.