Skip to content

[1.2.x] Implement programmatic retrieval of AI components#284

Merged
NipunaRanasinghe merged 1 commit intoballerina-platform:1.2.xfrom
MohamedSabthar:1.2.x
Sep 5, 2025
Merged

[1.2.x] Implement programmatic retrieval of AI components#284
NipunaRanasinghe merged 1 commit intoballerina-platform:1.2.xfrom
MohamedSabthar:1.2.x

Conversation

@MohamedSabthar
Copy link
Member

@MohamedSabthar MohamedSabthar commented Sep 4, 2025

Purpose

Fixes: wso2/product-ballerina-integrator#1040

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@MohamedSabthar MohamedSabthar changed the title Implement programmatic retrieval of AI components [1.2.x] Implement programmatic retrieval of AI components Sep 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements programmatic retrieval of AI components for the flow model generator by dynamically discovering AI-related components from project dependencies instead of using static JSON files.

  • Introduces AiUtils class to discover AI components (model providers, vector stores, etc.) dynamically from Ballerina project dependencies
  • Updates search commands to use the new dynamic discovery approach
  • Removes dependency on static JSON configuration files and migrates to runtime resolution

Reviewed Changes

Copilot reviewed 51 out of 51 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Various test resources Adds test fixtures with existing AI dependencies to verify dynamic discovery functionality
Search command classes Refactors to use AiUtils instead of static JSON configurations
LocalIndexCentral.java Removes static AI component loading methods
AiUtils.java New utility class for dynamic AI component discovery and caching
Static JSON files Removes hardcoded AI component configurations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NipunaRanasinghe NipunaRanasinghe merged commit a1ff40b into ballerina-platform:1.2.x Sep 5, 2025
4 of 5 checks passed
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.

3 participants