Skip to main content

How to Use the AskTable Function

1. How to Import the Function

1. Environment Setup

You need to install the Asktable Python SDK in the MaxKB environment. For MaxKB installation environment, refer to Function Dependency Package Installation.

2. How to Use the AskTable Function

1. Go to the Function Library page, click Import Function, and select the .fx file of the AskTable function we provided.

ds

3. In the component addition section, select the imported "AskTable Function" from the function library.

4. Modify Component Parameters

In the component's Parameter Configuration, update the following parameters:

  • API_KEY: Used to store AskTable's authentication token (API-Key)
    • Click here to learn how to obtain an API-Key
    • The value of at_auth must start with Bearer, in the complete format: Bearer ASKER_XXXXXXXX
    • For security reasons, it is recommended to use a lower-privilege asker API-Key (starting with ASKER_), and avoid using admin API-Key (starting with ADMIN_)
  • datasoure_id: Stores the ID of the Excel file or database (starting with ds_). How to obtain datasource_id
  • question: The user's input question
  • base_url: Optional, for local deployment, you can fill in the local interface address
ds

5. Test and Save

Enter a test query, such as "How many records in total," and check if the returned result is correct. If the test passes, save the component, and it will be ready for use in your application.