Skip to content

Add setup script and skills for Azure AI Content Understanding#48893

Draft
changjian-wang wants to merge 8 commits intomainfrom
changjian-wang/cu-sdk-skills
Draft

Add setup script and skills for Azure AI Content Understanding#48893
changjian-wang wants to merge 8 commits intomainfrom
changjian-wang/cu-sdk-skills

Conversation

@changjian-wang
Copy link
Copy Markdown
Member

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:

  • Added cu-sdk-common-knowledge skill in SKILL.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:

  • Introduced run_sample.sh script to list and execute specific Java sample classes, with support for environment variable loading, dry-run, and helpful error messages.

Sample Environment Setup:

  • Added setup_samples.sh script to automate environment setup: checks Java/Maven prerequisites, attempts to resolve the SDK from Maven Central or builds it locally, and generates a template .env file for credentials and configuration.

…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.
changjian-wang and others added 2 commits April 22, 2026 14:54
@@ -0,0 +1,213 @@
---
name: cu-sdk-java-setup-env
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants