[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-9ec7d94a-7d56-4373-9152-759c3a1f9f3d":3,"$fdrPueCdBnSN2vzUL5RU3zn1akS2ixjkhDp7RE3YXbhY":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"9ec7d94a-7d56-4373-9152-759c3a1f9f3d","azure-ai-projects-java","Azure AI Projects SDK for Java。用于Azure AI Foundry项目管理的高级SDK，包括连接、数据集、索引和评估。","cat_coding_devops","mod_coding","sickn33,coding","---\nname: azure-ai-projects-java\ndescription: Azure AI Projects SDK for Java. High-level SDK for Azure AI Foundry project management including connections, datasets, indexes, and evaluations.\nrisk: unknown\nsource: community\ndate_added: '2026-02-27'\n---\n\n# Azure AI Projects SDK for Java\n\nHigh-level SDK for Azure AI Foundry project management with access to connections, datasets, indexes, and evaluations.\n\n## Installation\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-ai-projects\u003C\u002FartifactId>\n    \u003Cversion>1.0.0-beta.1\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\n## Environment Variables\n\n```bash\nPROJECT_ENDPOINT=https:\u002F\u002F\u003Cresource>.services.ai.azure.com\u002Fapi\u002Fprojects\u002F\u003Cproject>\n```\n\n## Authentication\n\n```java\nimport com.azure.ai.projects.AIProjectClientBuilder;\nimport com.azure.identity.DefaultAzureCredentialBuilder;\n\nAIProjectClientBuilder builder = new AIProjectClientBuilder()\n    .endpoint(System.getenv(\"PROJECT_ENDPOINT\"))\n    .credential(new DefaultAzureCredentialBuilder().build());\n```\n\n## Client Hierarchy\n\nThe SDK provides multiple sub-clients for different operations:\n\n| Client | Purpose |\n|--------|---------|\n| `ConnectionsClient` | Enumerate connected Azure resources |\n| `DatasetsClient` | Upload documents and manage datasets |\n| `DeploymentsClient` | Enumerate AI model deployments |\n| `IndexesClient` | Create and manage search indexes |\n| `EvaluationsClient` | Run AI model evaluations |\n| `EvaluatorsClient` | Manage evaluator configurations |\n| `SchedulesClient` | Manage scheduled operations |\n\n```java\n\u002F\u002F Build sub-clients from builder\nConnectionsClient connectionsClient = builder.buildConnectionsClient();\nDatasetsClient datasetsClient = builder.buildDatasetsClient();\nDeploymentsClient deploymentsClient = builder.buildDeploymentsClient();\nIndexesClient indexesClient = builder.buildIndexesClient();\nEvaluationsClient evaluationsClient = builder.buildEvaluationsClient();\n```\n\n## Core Operations\n\n### List Connections\n\n```java\nimport com.azure.ai.projects.models.Connection;\nimport com.azure.core.http.rest.PagedIterable;\n\nPagedIterable\u003CConnection> connections = connectionsClient.listConnections();\nfor (Connection connection : connections) {\n    System.out.println(\"Name: \" + connection.getName());\n    System.out.println(\"Type: \" + connection.getType());\n    System.out.println(\"Credential Type: \" + connection.getCredentials().getType());\n}\n```\n\n### List Indexes\n\n```java\nindexesClient.listLatest().forEach(index -> {\n    System.out.println(\"Index name: \" + index.getName());\n    System.out.println(\"Version: \" + index.getVersion());\n    System.out.println(\"Description: \" + index.getDescription());\n});\n```\n\n### Create or Update Index\n\n```java\nimport com.azure.ai.projects.models.AzureAISearchIndex;\nimport com.azure.ai.projects.models.Index;\n\nString indexName = \"my-index\";\nString indexVersion = \"1.0\";\nString searchConnectionName = System.getenv(\"AI_SEARCH_CONNECTION_NAME\");\nString searchIndexName = System.getenv(\"AI_SEARCH_INDEX_NAME\");\n\nIndex index = indexesClient.createOrUpdate(\n    indexName,\n    indexVersion,\n    new AzureAISearchIndex()\n        .setConnectionName(searchConnectionName)\n        .setIndexName(searchIndexName)\n);\n\nSystem.out.println(\"Created index: \" + index.getName());\n```\n\n### Access OpenAI Evaluations\n\nThe SDK exposes OpenAI's official SDK for evaluations:\n\n```java\nimport com.openai.services.EvalService;\n\nEvalService evalService = evaluationsClient.getOpenAIClient();\n\u002F\u002F Use OpenAI evaluation APIs directly\n```\n\n## Best Practices\n\n1. **Use DefaultAzureCredential** for production authentication\n2. **Reuse client builder** to create multiple sub-clients efficiently\n3. **Handle pagination** when listing resources with `PagedIterable`\n4. **Use environment variables** for connection names and configuration\n5. **Check connection types** before accessing credentials\n\n## Error Handling\n\n```java\nimport com.azure.core.exception.HttpResponseException;\nimport com.azure.core.exception.ResourceNotFoundException;\n\ntry {\n    Index index = indexesClient.get(indexName, version);\n} catch (ResourceNotFoundException e) {\n    System.err.println(\"Index not found: \" + indexName);\n} catch (HttpResponseException e) {\n    System.err.println(\"Error: \" + e.getResponse().getStatusCode());\n}\n```\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| Product Docs | https:\u002F\u002Flearn.microsoft.com\u002Fazure\u002Fai-studio\u002F |\n| API Reference | https:\u002F\u002Flearn.microsoft.com\u002Frest\u002Fapi\u002Faifoundry\u002Faiprojects\u002F |\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-java\u002Ftree\u002Fmain\u002Fsdk\u002Fai\u002Fazure-ai-projects |\n| Samples | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-java\u002Ftree\u002Fmain\u002Fsdk\u002Fai\u002Fazure-ai-projects\u002Fsrc\u002Fsamples |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,144,293,"2026-05-16 13:05:20",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"DevOps","devops","mdi-cog-outline","CI\u002FCD、容器化、部署运维",3,162,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"494a23c5-3a2d-4b6b-8789-59721d56d28e","1.0.0","azure-ai-projects-java.zip",1965,"uploads\u002Fskills\u002F9ec7d94a-7d56-4373-9152-759c3a1f9f3d\u002Fazure-ai-projects-java.zip","dfd8c5a0f26135e13b176388916b4f026e31365ed629c59d59713d4e4252891f","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":5095}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]