Langsung ke konten
Skillpedia
Agen48k · #3891

azure-ai-projects-java

Fungsinya

Kode ini membantu mengelola proyek Artificial Intelligence (AI) di cloud Azure. Anda bisa menghubungkan berbagai layanan, mengatur data, membuat indeks pencarian, dan mengevaluasi performa model AI.

Kapan dipakai

  • ✓Saat Anda perlu menampilkan daftar resource AI yang terhubung dengan akun Azure Anda.
  • ✓Untuk membuat atau memperbarui indeks pencarian dengan data Anda.
  • ✓Saat Anda ingin memeriksa bagaimana performa sebuah model AI.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-ai-projects-java/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-ai-projects-java/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Tampilkan daftar indeks pencarian yang ada di proyek AI saya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Anda menambahkan kode ini ke program Java Anda. Kode ini terhubung ke Azure menggunakan kredensial Anda dan memungkinkan Anda memanggil fungsi tertentu untuk mengelola proyek AI, seperti menampilkan koneksi atau membuat indeks.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Azure AI Projects SDK for Java

High-level SDK for Azure AI Foundry project management with access to connections, datasets, indexes, and evaluations.

Installation

<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-ai-projects</artifactId>
    <version>1.0.0-beta.1</version>
</dependency>

Environment Variables

PROJECT_ENDPOINT=https://<resource>.services.ai.azure.com/api/projects/<project>

Authentication

import com.azure.ai.projects.AIProjectClientBuilder;
import com.azure.identity.DefaultAzureCredentialBuilder;

AIProjectClientBuilder builder = new AIProjectClientBuilder()
    .endpoint(System.getenv("PROJECT_ENDPOINT"))
    .credential(new DefaultAzureCredentialBuilder().build());

Client Hierarchy

The SDK provides multiple sub-clients for different operations:

Client Purpose
ConnectionsClient Enumerate connected Azure resources
DatasetsClient Upload documents and manage datasets
DeploymentsClient Enumerate AI model deployments
IndexesClient Create and manage search indexes
EvaluationsClient Run AI model evaluations
EvaluatorsClient Manage evaluator configurations
SchedulesClient Manage scheduled operations
// Build sub-clients from builder
ConnectionsClient connectionsClient = builder.buildConnectionsClient();
DatasetsClient datasetsClient = builder.buildDatasetsClient();
DeploymentsClient deploymentsClient = builder.buildDeploymentsClient();
IndexesClient indexesClient = builder.buildIndexesClient();
EvaluationsClient evaluationsClient = builder.buildEvaluationsClient();

Core Operations

List Connections

import com.azure.ai.projects.models.Connection;
import com.azure.core.http.rest.PagedIterable;

PagedIterable<Connection> connections = connectionsClient.listConnections();
for (Connection connection : connections) {
    System.out.println("Name: " + connection.getName());
    System.out.println("Type: " + connection.getType());
    System.out.println("Credential Type: " + connection.getCredentials().getType());
}

List Indexes

indexesClient.listLatest().forEach(index -> {
    System.out.println("Index name: " + index.getName());
    System.out.println("Version: " + index.getVersion());
    System.out.println("Description: " + index.getDescription());
});

Create or Update Index

import com.azure.ai.projects.models.AzureAISearchIndex;
import com.azure.ai.projects.models.Index;

String indexName = "my-index";
String indexVersion = "1.0";
String searchConnectionName = System.getenv("AI_SEARCH_CONNECTION_NAME");
String searchIndexName = System.getenv("AI_SEARCH_INDEX_NAME");

Index index = indexesClient.createOrUpdate(
    indexName,
    indexVersion,
    new AzureAISearchIndex()
        .setConnectionName(searchConnectionName)
        .setIndexName(searchIndexName)
);

System.out.println("Created index: " + index.getName());

Access OpenAI Evaluations

The SDK exposes OpenAI's official SDK for evaluations:

import com.openai.services.EvalService;

EvalService evalService = evaluationsClient.getOpenAIClient();
// Use OpenAI evaluation APIs directly

Best Practices

  1. Use DefaultAzureCredential for production authentication
  2. Reuse client builder to create multiple sub-clients efficiently
  3. Handle pagination when listing resources with PagedIterable
  4. Use environment variables for connection names and configuration
  5. Check connection types before accessing credentials

Error Handling

import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceNotFoundException;

try {
    Index index = indexesClient.get(indexName, version);
} catch (ResourceNotFoundException e) {
    System.err.println("Index not found: " + indexName);
} catch (HttpResponseException e) {
    System.err.println("Error: " + e.getResponse().getStatusCode());
}

Reference Links

Resource URL
Product Docs https://learn.microsoft.com/azure/ai-studio/
API Reference https://learn.microsoft.com/rest/api/aifoundry/aiprojects/
GitHub Source https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/ai/azure-ai-projects
Samples https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/ai/azure-ai-projects/src/samples

When to Use

…

Pertanyaan umum

Apa itu 'connections'?

Ini adalah layanan Azure lain yang bisa digunakan proyek AI Anda, seperti database atau layanan penyimpanan.

Apa itu 'index'?

Ini adalah cara terorganisasi untuk menyimpan dan mencari informasi, seperti daftar isi pada sebuah buku, tetapi untuk data digital.

Bagaimana AI tahu bahwa saya yang memiliki proyek ini?

AI menggunakan metode autentikasi yang aman, seperti 'DefaultAzureCredential', yang memverifikasi identitas Anda agar hanya Anda yang bisa mengakses proyek Anda.

Detail

Deskripsi asli dari pembuat

Azure AI Projects SDK for Java. High-level SDK for Azure AI Foundry project management including connections, datasets, indexes, and evaluations.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#3891
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa