[1.2.x] Implement programmatic retrieval of AI components#284
Merged
NipunaRanasinghe merged 1 commit intoballerina-platform:1.2.xfrom Sep 5, 2025
Merged
[1.2.x] Implement programmatic retrieval of AI components#284NipunaRanasinghe merged 1 commit intoballerina-platform:1.2.xfrom
NipunaRanasinghe merged 1 commit intoballerina-platform:1.2.xfrom
Conversation
Contributor
There was a problem hiding this comment.
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
AiUtilsclass 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.
...es/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/AiUtils.java
Show resolved
Hide resolved
...es/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/AiUtils.java
Show resolved
Hide resolved
a1ff40b
into
ballerina-platform:1.2.x
4 of 5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning