diff --git a/guides/actions.mdx b/guides/actions.mdx new file mode 100644 index 0000000..f9a9625 --- /dev/null +++ b/guides/actions.mdx @@ -0,0 +1,213 @@ +--- +title: 'Actions' +description: "Extend your Guru's capabilities with external API calls and tool integrations" +--- + +## Overview + +Actions extend your Guru's capabilities by connecting it to external APIs and services. When users ask questions that require real-time data, your Guru can automatically trigger these actions to fetch information and provide up-to-date responses. + +### What Actions Enable + +Actions transform your Guru into a dynamic assistant that can: +- **Fetch real-time data** from external APIs +- **Retrieve current information** like weather, stock prices, or user details +- **Integrate with third-party tools** and platforms + +### Action Limits + +Each Guru has a limit on the number of actions (e.g., "1 of 10 actions used"). + +## How Actions Work + +Actions use an intelligent trigger system: + +1. **Condition Prompt Evaluation**: The Guru checks if the user's question matches your defined conditions (based on **Condition Prompt**) +2. **Parameter Extraction**: Parameters are extracted from the user's question based on your descriptions +3. **Execution Decision**: The action runs only if all required parameters can be extracted (or have default values) +4. **API Call and Response**: The configured API call is made, and the **Usage Prompt** instructs the AI how to use the response + +## Creating an Action + + + Empty Actions + + +The action creation process consists of two main steps: General Configuration and API Configuration. + +### Step 1: General Configuration + + + Action General Configuration + + +#### Action Name +Provide a descriptive name that appears in your actions list. + +#### Description +Explain what this action does and when it should be used. + +#### Condition Prompt +Describe when this action should be triggered. Be specific to ensure it only runs when appropriate. + +**Example**: "When a question about a Github user is asked." + + + Action Parameters Configuration + + +#### Parameters Configuration + +Each parameter includes: + +- **Parameter Name**: Use only letters and underscores (e.g., `username`, `user_id`) +- **Type**: Choose from String (text), Number (numeric), or Boolean (true/false) +- **Description**: Clear description for parameter extraction from user questions +- **Required**: Check if essential for the action to work +- **Default Value**: Optional fallback when parameter can't be extracted + +### Step 2: API Configuration + + + API Configuration Setup + + +#### HTTP Method +Select from `GET`, `POST`, `PUT`, `PATCH`, `DELETE`. + +#### Endpoint URL +Enter the API endpoint. It supports parameters like `{param_name}` + +**Example**: `https://api.github.com/users/{username}` + +#### Headers +Configure authentication or content type headers. It supports parameters like `{param_name}` + +**Example**: `Authorization: Bearer {token}` + +#### Request Body (JSON) +For `POST`, `PUT`, and `PATCH` methods, include JSON payload. It supports parameters like `{param_name}` + +```json +{ + "query": "{search_term}", + "user_id": "{user_id}" +} +``` + + + Usage Prompt Configuration + + +#### Usage Prompt +Provide instructions for how the AI should interpret and use the API response data. + +**Example**: "Analyze the JSON of the given user and provide a summary of their GitHub profile information." + +#### Testing Your Action + + + Action Testing Results + + +Use the "Test Action" button to verify your configuration. If required parameters exist, you'll be prompted to provide test values. + +Test results show success status, response data, and HTTP status code. + +## Managing Actions + + + Actions Management Dashboard + + +Once created, you can manage all your actions from the Actions dashboard: + +### Actions List +View all configured actions with their name, description, type ("API Call"), and status (Enabled/Disabled). + + +For now, only the "API Call" type is implemented. We are planning to add new types of actions in the future. + + +### Action Management Options + + + Action Management Options + + +Click the menu icon (⋮) next to any action to: +- **Edit**: Modify the action's configuration +- **Disable**: Temporarily disable without deleting +- **Delete**: Permanently remove the action + +### Enabling and Disabling Actions +Enable or disable actions at any time. Disabled actions won't be triggered by user questions. + +## Usage in the Answer + +Actions used in the answer are shown as below with the action name: + + + Action Reference + + +## Common Mistakes to Avoid + +### 1. Vague Condition Prompts +❌ **Poor**: "When asking about data" + +✅ **Good**: "When asking about current weather conditions for a specific location" + +### 2. Inadequate Parameter Descriptions +❌ **Poor**: Parameter name: `id`, Description: "The ID" + +✅ **Good**: Parameter name: `user_id`, Description: "The unique identifier for the GitHub user whose profile information is being requested" + +### 3. Incomplete Usage Prompts +❌ **Poor**: "Use the response data" + +✅ **Good**: "Extract the user's name, bio, and public repository count from the JSON response and present this information in a clear, formatted summary" + +### 4. Not Testing Actions +❌ **Poor**: Enabling actions without testing them first + +✅ **Good**: Always test actions with various parameter combinations before enabling + +### 5. Overly Complex Actions +❌ **Poor**: Creating actions that try to do too many things at once + +✅ **Good**: Keep actions focused on a single, specific task + + +## Next Steps + + + + Explore our API documentation for advanced integrations + + + Learn how to create and configure your first Guru + + + Understand how to add and manage knowledge sources + + + Learn how to customize your Guru's responses and behavior + + diff --git a/guides/audit-logs.mdx b/guides/audit-logs.mdx index 693a68f..fd21465 100644 --- a/guides/audit-logs.mdx +++ b/guides/audit-logs.mdx @@ -29,7 +29,7 @@ Audit logs can be accessed by all maintainers through the Gurubase dashboard: 4. Click on "Details" for individual entries to view detailed information - Audit Logs Interface + Audit Logs Interface ## Filtering Options @@ -118,7 +118,7 @@ Each audit log entry includes: For update operations, audit logs show detailed before/after comparisons: - Before/After Field Comparison + Before/After Field Comparison This includes: @@ -130,7 +130,7 @@ This includes: Additional context is provided for complex operations: - Operation Details + Operation Details This includes: diff --git a/guides/excel-extraction.mdx b/guides/excel-extraction.mdx index 5fa8064..8bfb4de 100644 --- a/guides/excel-extraction.mdx +++ b/guides/excel-extraction.mdx @@ -13,12 +13,12 @@ While Gurubase can interpret different Excel structures, it is still important t ✅ **Good Example** - + ❌ **Bad Example** - + *Missing Price and Stock columns* @@ -29,12 +29,12 @@ While Gurubase can interpret different Excel structures, it is still important t ✅ **Good Example** - + ❌ **Bad Example** - + @@ -43,7 +43,7 @@ While Gurubase can interpret different Excel structures, it is still important t When you have sub-tables or multiple data sections, repeat headers and columns for each section: - + ## 3. Clean Empty Rows and Columns @@ -53,13 +53,13 @@ When you have sub-tables or multiple data sections, repeat headers and columns f **Before Cleaning:** - + **After Cleaning:** - + ## 4. Split into Smaller Sheets @@ -87,14 +87,14 @@ When you have sub-tables or multiple data sections, repeat headers and columns f ✅ **Good Example (Table Structure)** - + ❌ **Bad Example (Form Structure)** - + ## 6. Proper Nested Structure @@ -104,25 +104,25 @@ When you have sub-tables or multiple data sections, repeat headers and columns f ✅ **Good Example (Proper Nested Structure)** - + ✅ **Good Example (Proper Nested Structure)** - + ❌ **Bad Example** - + Here is its fixed version: - + **Key Principles for Nested Structures** @@ -139,7 +139,7 @@ Gurubase can also handle column oriented excel files. Just make sure you include ✅ **Good Example (Proper Nested Structure)** - + diff --git a/images/guides/actions/created.png b/images/guides/actions/created.png new file mode 100644 index 0000000..eb97c37 Binary files /dev/null and b/images/guides/actions/created.png differ diff --git a/images/guides/actions/empty.png b/images/guides/actions/empty.png new file mode 100644 index 0000000..d5715db Binary files /dev/null and b/images/guides/actions/empty.png differ diff --git a/images/guides/actions/options.png b/images/guides/actions/options.png new file mode 100644 index 0000000..06e523f Binary files /dev/null and b/images/guides/actions/options.png differ diff --git a/images/guides/actions/reference.png b/images/guides/actions/reference.png new file mode 100644 index 0000000..d82c038 Binary files /dev/null and b/images/guides/actions/reference.png differ diff --git a/images/guides/actions/stage1-1.png b/images/guides/actions/stage1-1.png new file mode 100644 index 0000000..1b267b6 Binary files /dev/null and b/images/guides/actions/stage1-1.png differ diff --git a/images/guides/actions/stage1-2.png b/images/guides/actions/stage1-2.png new file mode 100644 index 0000000..3c7f746 Binary files /dev/null and b/images/guides/actions/stage1-2.png differ diff --git a/images/guides/actions/stage2-1.png b/images/guides/actions/stage2-1.png new file mode 100644 index 0000000..13142a5 Binary files /dev/null and b/images/guides/actions/stage2-1.png differ diff --git a/images/guides/actions/stage2-2.png b/images/guides/actions/stage2-2.png new file mode 100644 index 0000000..f24d46d Binary files /dev/null and b/images/guides/actions/stage2-2.png differ diff --git a/images/guides/actions/stage2-3.png b/images/guides/actions/stage2-3.png new file mode 100644 index 0000000..0a55235 Binary files /dev/null and b/images/guides/actions/stage2-3.png differ diff --git a/images/audit-logs/audit-logs.png b/images/guides/audit-logs/audit-logs.png similarity index 100% rename from images/audit-logs/audit-logs.png rename to images/guides/audit-logs/audit-logs.png diff --git a/images/audit-logs/before-after.png b/images/guides/audit-logs/before-after.png similarity index 100% rename from images/audit-logs/before-after.png rename to images/guides/audit-logs/before-after.png diff --git a/images/audit-logs/info.png b/images/guides/audit-logs/info.png similarity index 100% rename from images/audit-logs/info.png rename to images/guides/audit-logs/info.png diff --git a/images/excel-extraction/1-bad.png b/images/guides/excel-extraction/1-bad.png similarity index 100% rename from images/excel-extraction/1-bad.png rename to images/guides/excel-extraction/1-bad.png diff --git a/images/excel-extraction/1-good.png b/images/guides/excel-extraction/1-good.png similarity index 100% rename from images/excel-extraction/1-good.png rename to images/guides/excel-extraction/1-good.png diff --git a/images/excel-extraction/2-bad.png b/images/guides/excel-extraction/2-bad.png similarity index 100% rename from images/excel-extraction/2-bad.png rename to images/guides/excel-extraction/2-bad.png diff --git a/images/excel-extraction/2-good.png b/images/guides/excel-extraction/2-good.png similarity index 100% rename from images/excel-extraction/2-good.png rename to images/guides/excel-extraction/2-good.png diff --git a/images/excel-extraction/2-sub-table.png b/images/guides/excel-extraction/2-sub-table.png similarity index 100% rename from images/excel-extraction/2-sub-table.png rename to images/guides/excel-extraction/2-sub-table.png diff --git a/images/excel-extraction/3-bad.png b/images/guides/excel-extraction/3-bad.png similarity index 100% rename from images/excel-extraction/3-bad.png rename to images/guides/excel-extraction/3-bad.png diff --git a/images/excel-extraction/3-good.png b/images/guides/excel-extraction/3-good.png similarity index 100% rename from images/excel-extraction/3-good.png rename to images/guides/excel-extraction/3-good.png diff --git a/images/excel-extraction/5-bad.png b/images/guides/excel-extraction/5-bad.png similarity index 100% rename from images/excel-extraction/5-bad.png rename to images/guides/excel-extraction/5-bad.png diff --git a/images/excel-extraction/5-good.png b/images/guides/excel-extraction/5-good.png similarity index 100% rename from images/excel-extraction/5-good.png rename to images/guides/excel-extraction/5-good.png diff --git a/images/excel-extraction/6-bad-fixed.png b/images/guides/excel-extraction/6-bad-fixed.png similarity index 100% rename from images/excel-extraction/6-bad-fixed.png rename to images/guides/excel-extraction/6-bad-fixed.png diff --git a/images/excel-extraction/6-bad.png b/images/guides/excel-extraction/6-bad.png similarity index 100% rename from images/excel-extraction/6-bad.png rename to images/guides/excel-extraction/6-bad.png diff --git a/images/excel-extraction/6-good-more-complex.png b/images/guides/excel-extraction/6-good-more-complex.png similarity index 100% rename from images/excel-extraction/6-good-more-complex.png rename to images/guides/excel-extraction/6-good-more-complex.png diff --git a/images/excel-extraction/6-good.png b/images/guides/excel-extraction/6-good.png similarity index 100% rename from images/excel-extraction/6-good.png rename to images/guides/excel-extraction/6-good.png diff --git a/images/excel-extraction/7-good.png b/images/guides/excel-extraction/7-good.png similarity index 100% rename from images/excel-extraction/7-good.png rename to images/guides/excel-extraction/7-good.png diff --git a/mint.json b/mint.json index b4d9dfb..16478ab 100644 --- a/mint.json +++ b/mint.json @@ -58,7 +58,9 @@ "guides/pii-masking", "guides/data-sources", "guides/excel-extraction", - "guides/audit-logs" + "guides/audit-logs", + "guides/actions" + ] }, {