Skip to content

add aidbase app#220

Closed
TenTwo07 wants to merge 1 commit intomainfrom
feat/add_aidbase_app
Closed

add aidbase app#220
TenTwo07 wants to merge 1 commit intomainfrom
feat/add_aidbase_app

Conversation

@TenTwo07
Copy link
Contributor

@TenTwo07 TenTwo07 commented Apr 17, 2025

This PR introduces updates and improvements to the functions.json file for the Aidbase application. The changes ensure consistency in naming conventions, descriptions, and parameter structures for all API functions.

APP_URL: https://aidbase.ai
APP_API_DOCS_URL: https://docs.aidbase.ai

Integrated API

AIDBASE__GET_ALL_CHATBOTS - Retrieve a list of all chatbots associated with the user. AIDBASE__GET_CHATBOT_BY_ID - Retrieve details of a specific chatbot by its unique ID. AIDBASE__POST_CHATBOT_REPLY - Send a reply to a specific chatbot. AIDBASE__GET_CHATBOT_KNOWLEDGE - Retrieve all knowledge items associated with a specific chatbot. AIDBASE__PUT_CHATBOT_KNOWLEDGE - Add or update a knowledge item in a chatbot. AIDBASE__REMOVE_CHATBOT_KNOWLEDGE - Remove a knowledge item from a chatbot.

Fuzzy Tests

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__GET_ALL_CHATBOTS --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Can you show me all the chatbots in the system?"

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__GET_CHATBOT_BY_ID --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Get the details of the chatbot with ID cvkHIqhSMWaiwRP5O763K."

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__POST_CHATBOT_REPLY --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Send the message 'hello?' to the chatbot with ID cvkHIqhSMWaiwRP5O763K."

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__GET_CHATBOT_KNOWLEDGE --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "show me all the chatbot knowledge,ID='cvkHIqhSMWaiwRP5O763K'."

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__PUT_CHATBOT_KNOWLEDGE --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Add the knowledge base of the chatbot with ID cvkHIqhSMWaiwRP5O763K for the knowledge item with ID 3facf6c9-4bfe-4524-838d-75ea395eecee."

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__REMOVE_CHATBOT_KNOWLEDGE --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Remove the knowledge item with ID 3facf6c9-4bfe-4524-838d-75ea395eecee from the chatbot with ID cvkHIqhSMWaiwRP5O763K."

Videos

aidbase.mp4

Summary by CodeRabbit

  • New Features
    • Introduced support for managing Aidbase chatbots, including retrieving chatbot lists, viewing chatbot details, sending messages for AI replies, and managing chatbot knowledge items.
  • Chores
    • Updated app configuration to reflect Aidbase branding and categories, replacing previous Airtable references.

This PR introduces updates and improvements to the functions.json file for the Aidbase application. The changes ensure consistency in naming conventions, descriptions, and parameter structures for all API functions.

APP_URL: https://aidbase.ai
APP_API_DOCS_URL: https://docs.aidbase.ai

### Integrated API
AIDBASE__GET_ALL_CHATBOTS - Retrieve a list of all chatbots associated with the user.
AIDBASE__GET_CHATBOT_BY_ID - Retrieve details of a specific chatbot by its unique ID.
AIDBASE__POST_CHATBOT_REPLY - Send a reply to a specific chatbot.
AIDBASE__GET_CHATBOT_KNOWLEDGE - Retrieve all knowledge items associated with a specific chatbot.
AIDBASE__PUT_CHATBOT_KNOWLEDGE - Add or update a knowledge item in a chatbot.
AIDBASE__REMOVE_CHATBOT_KNOWLEDGE - Remove a knowledge item from a chatbot.

### Fuzzy Tests
docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__GET_ALL_CHATBOTS --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Can you show me all the chatbots in the system?"

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__GET_CHATBOT_BY_ID --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Get the details of the chatbot with ID cvkHIqhSMWaiwRP5O763K."

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__POST_CHATBOT_REPLY --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Send the message 'hello?' to the chatbot with ID cvkHIqhSMWaiwRP5O763K."

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__GET_CHATBOT_KNOWLEDGE --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "show me all the chatbot knowledge,ID='cvkHIqhSMWaiwRP5O763K'."

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__PUT_CHATBOT_KNOWLEDGE --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Add the knowledge base of the chatbot with ID cvkHIqhSMWaiwRP5O763K for the knowledge item with ID 3facf6c9-4bfe-4524-838d-75ea395eecee."

docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution --function-name AIDBASE__REMOVE_CHATBOT_KNOWLEDGE --linked-account-owner-id <LINKED_ACCOUNT_OWNER_ID> --aipolabs-api-key <AIPOLABS_API_KEY> --prompt "Remove the knowledge item with ID 3facf6c9-4bfe-4524-838d-75ea395eecee from the chatbot with ID cvkHIqhSMWaiwRP5O763K."
### Videos
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 17, 2025

Walkthrough

This update completely replaces the configuration and API function definitions for an Airtable integration with those for Aidbase, Inc. The app.json file now describes the Aidbase app, updating metadata such as name, logo, provider, and categories. The functions.json file removes all Airtable-related endpoints and introduces new endpoints for managing Aidbase chatbots, including retrieving chatbots, sending messages, and managing chatbot knowledge items. All references to Airtable have been removed, and the domain focus has shifted to chatbot operations within Aidbase.

Changes

File(s) Change Summary
apps/airtable/app.json Updated all app metadata from Airtable to Aidbase, including name, display name, logo, provider, version, categories, and description.
apps/airtable/functions.json Completely replaced Airtable API function definitions with Aidbase chatbot API endpoints for chatbot and knowledge management.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant AidbaseAPI

    User->>App: Request chatbot list
    App->>AidbaseAPI: GET /v1/chatbots
    AidbaseAPI-->>App: Return chatbots
    App-->>User: Display chatbots

    User->>App: Send message to chatbot
    App->>AidbaseAPI: POST /v1/chatbot/{id}/reply (message, session_id)
    AidbaseAPI-->>App: Return AI reply
    App-->>User: Show AI reply

    User->>App: Manage chatbot knowledge (add/remove)
    App->>AidbaseAPI: PUT/DELETE /v1/chatbot/{id}/knowledge (knowledge_id)
    AidbaseAPI-->>App: Confirm operation
    App-->>User: Update knowledge status
Loading

Possibly related PRs

Suggested reviewers

  • thisisfixer

Poem

In the warren of code, a new path we pave,
From Airtable’s fields to Aidbase we wave.
Chatbots now chatter, with knowledge in tow,
As endpoints and configs in fresh rivers flow.
🐇 With whiskers a-twitch, I hop and I cheer—
Here’s to new chatbots, and Aidbase this year!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c2f112 and c529c54.

📒 Files selected for processing (2)
  • apps/airtable/app.json (2 hunks)
  • apps/airtable/functions.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test
  • GitHub Check: Format & Lint

Note

🎁 Summarized by CodeRabbit Free

Your organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

ACI Integration Code Review (Sonnet 3.7) - 2025-04-17 07:04:52.207

This review analyzes changes to integration files in the app/ directories.

Code Review: Aidbase Integration

File Analysis

apps/airtable/app.json

  • Line 1-20: The app.json file appears to be correctly configured for the Aidbase integration with appropriate security scheme using Bearer token authentication in the Authorization header.

apps/airtable/functions.json

This file contains the function specifications for the Aidbase API integration. Let me analyze each function:

Issues Found

1. File Location Issue

  • Issue: The integration files are located in the apps/airtable directory but contain Aidbase functions.
  • Suggestion: Move the files to a new directory apps/aidbase to maintain proper organization.

2. Server URL Configuration

  • Issue: In all functions, the API version (/v1) is included in the path field rather than in the server_url.
  • File: functions.json, all functions
  • Suggestion: Move the version to the server_url field. For example:
    "protocol_data": {
        "method": "GET",
        "path": "/chatbots",
        "server_url": "https://api.aidbase.ai/v1"
    }

3. Header Parameters Visibility

  • Issue: In all functions, the header parameters are defined but marked as not visible and not required.
  • File: functions.json, all functions
  • Suggestion: Since the Accept header is standard and handled automatically, you can remove it entirely from the visible and required fields.

4. Inconsistent Parameter Naming

  • Issue: In AIDBASE__POST_CHATBOT_REPLY, the parameter uses snake_case (session_id) while other functions use camelCase.
  • File: functions.json, line ~150
  • Suggestion: Maintain consistent naming conventions across all functions, preferably using camelCase for all parameters.

5. Missing Examples in Some Parameters

  • Issue: Some parameters have examples while others don't.
  • File: functions.json, various functions
  • Suggestion: Add examples for all parameters to improve usability, especially for parameters like message in AIDBASE__POST_CHATBOT_REPLY.

6. Redundant Header Definitions

  • Issue: Each function defines the same header parameters repeatedly.
  • File: functions.json, all functions
  • Suggestion: Consider simplifying the integration by removing redundant header definitions if they're standard across all endpoints.

Function-Specific Issues

AIDBASE__GET_ALL_CHATBOTS

  • No specific issues beyond the general ones mentioned above.

AIDBASE__GET_CHATBOT_BY_ID

  • Issue: The path parameter is correctly defined and marked as required and visible.

AIDBASE__POST_CHATBOT_REPLY

  • Issue: The session_id parameter is optional but doesn't have a clear indication of when it should be used.
  • Suggestion: Enhance the description to explain when and why a session_id would be needed.

AIDBASE__GET_CHATBOT_KNOWLEDGE

  • No specific issues beyond the general ones mentioned above.

AIDBASE__PUT_CHATBOT_KNOWLEDGE

  • Issue: The function only allows updating by knowledge_id, but there's no parameter for the actual knowledge content.
  • Suggestion: Add parameters for the knowledge content that needs to be updated or clarify in the description if this is just for associating existing knowledge items.

AIDBASE__REMOVE_CHATBOT_KNOWLEDGE

  • No specific issues beyond the general ones mentioned above.

Summary of Changes and Impact

This PR introduces a new integration with Aidbase, providing six functions to interact with chatbots and their knowledge bases. The integration allows:

  1. Listing all chatbots
  2. Getting details of a specific chatbot
  3. Sending messages to chatbots and receiving AI-generated replies
  4. Managing knowledge items associated with chatbots (get, add/update, remove)

The functions are well-structured and cover the core functionality needed for chatbot interactions. The integration will enable users to leverage Aidbase's AI chatbot capabilities through the platform.

Overall Assessment: Needs Improvement

While the core functionality is implemented correctly, there are several issues related to file organization, parameter consistency, and API URL structure that should be addressed before merging.

Actionable Next Steps

  1. Move the integration files from apps/airtable to apps/aidbase directory
  2. Restructure the server_url and path fields to properly separate the API version
  3. Remove redundant header definitions or make them consistent across all functions
  4. Add missing examples and improve parameter descriptions
  5. Ensure consistent naming conventions (camelCase vs snake_case)
  6. For PUT_CHATBOT_KNOWLEDGE, clarify if additional parameters are needed for the knowledge content
  7. Run the fuzzy tests again after making these changes to ensure everything works as expected

Once these issues are addressed, the integration will be more maintainable and consistent with best practices.

@TenTwo07 TenTwo07 closed this Apr 17, 2025
@TenTwo07 TenTwo07 deleted the feat/add_aidbase_app branch April 17, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant