Add setup script and skills for Azure AI Content Understanding#48893
Add setup script and skills for Azure AI Content Understanding#48893changjian-wang wants to merge 8 commits intomainfrom
Conversation
…AI Content Understanding Java SDK - Created `run_sample.sh` to compile and execute Java samples with Maven. - Added `setup_samples.sh` to check prerequisites, install SDK from Maven Central or build locally, and create a sample `.env` file. - Introduced `SKILL.md` for interactive setup of environment variables required for running samples. - Updated `README.md` to include information about new GitHub Copilot skills for environment setup and sample execution.
…etter navigation and user guidance Co-authored-by: Copilot <copilot@github.com>
| @@ -0,0 +1,213 @@ | |||
| --- | |||
| name: cu-sdk-java-setup-env | |||
There was a problem hiding this comment.
Let's name this cu-sdk-setup
- Introduced `run_sample.sh` to execute specific Java samples with Maven. - Added `setup_samples.sh` to prepare the environment, check prerequisites, and create a `.env` file. - Created `SKILL.md` to guide users in setting up their environment variables interactively. - Updated `README.md` to reflect new skills for environment setup and sample execution.
| description: Help users create and configure their .env file for the Azure AI Content Understanding Java SDK. Use when users need to set up credentials, endpoint, and model deployment configuration. | ||
| --- | ||
|
|
||
| # Set Up Environment Variables |
There was a problem hiding this comment.
Before this step, we should add a step to instruct the skill to check and install required Java components per Prerequisites section in README.md
There was a problem hiding this comment.
This is useful as the user might just enlisth our SDK but has not yet set up required Java components
|
|
||
| ### Next Steps | ||
|
|
||
| After the `.env` is configured, direct the user to: |
There was a problem hiding this comment.
When I test this skill, and ask it to run the update defaults sample for me, it does this and is about to compile local library, this is not what we want. Like Python, we should ask if the user is just using the CU SDK, or is contributing to CU SDK. Most people is abour using SDK, so we should have it to load the CU Java SDK, instead of buidling them.
| > If DefaultAzureCredential: Leave `CONTENTUNDERSTANDING_KEY` empty. | ||
| > If API Key: Ask the user to provide the key value. | ||
|
|
||
| #### 3c. Model Deployment Names |
There was a problem hiding this comment.
I think that this is a weak point in our cu-sdk-setup for all languages. We should use CU SDK here first to check if the default models has been set or not. And only ask for the following when they are not yet set. If they are set, we should just populate the default model values and ask user to confirm.
Let's do this for all languages.
…eshooting notes for Java SDK setup Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
This pull request introduces new developer tooling and documentation to support running and understanding Java SDK samples for Azure AI Content Understanding. The main changes include the addition of a comprehensive skill knowledge base, a robust script for running Java samples, and a setup script to prepare the local environment. These improvements make it easier for developers to get started, run, and troubleshoot sample code for the SDK.
Developer Documentation and Knowledge Base:
cu-sdk-common-knowledgeskill inSKILL.md, providing detailed guidance, official documentation links, and copilot instructions for answering questions about Content Understanding concepts, analyzers, API operations, and Java SDK usage.Sample Execution Tooling:
run_sample.shscript to list and execute specific Java sample classes, with support for environment variable loading, dry-run, and helpful error messages.Sample Environment Setup:
setup_samples.shscript to automate environment setup: checks Java/Maven prerequisites, attempts to resolve the SDK from Maven Central or builds it locally, and generates a template.envfile for credentials and configuration.