Skip to content

Commit a591320

Browse files
committed
Initial commit for Azure AI Projects SDK
1 parent 5cb4e60 commit a591320

File tree

319 files changed

+63515
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

319 files changed

+63515
-1
lines changed

.vscode/cspell.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,16 @@
13821382
"gcch",
13831383
"updation" // current typo in a swagger
13841384
]
1385+
},
1386+
{
1387+
"filename": "sdk/ai/azure-ai-projects/**",
1388+
"words": [
1389+
"AISEARCH",
1390+
"AISERVICES",
1391+
"SUBSCRIPTIONID",
1392+
"RESOURCEGROUPNAME",
1393+
"PROJECTNAME"
1394+
]
13851395
}
13861396
],
13871397
"allowCompoundWords": true

eng/versioning/version_client.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ com.azure:azure-ai-documenttranslator;1.0.0-beta.1;1.0.0-beta.2
4242
com.azure:azure-ai-formrecognizer;4.1.13;4.2.0-beta.1
4343
com.azure:azure-ai-formrecognizer-perf;1.0.0-beta.1;1.0.0-beta.1
4444
com.azure:azure-ai-inference;1.0.0-beta.4;1.0.0-beta.5
45+
com.azure:azure-ai-projects;1.0.0-beta.1;1.0.0-beta.1
4546
com.azure:azure-ai-metricsadvisor;1.2.6;1.3.0-beta.1
4647
com.azure:azure-ai-metricsadvisor-perf;1.0.0-beta.1;1.0.0-beta.1
4748
com.azure:azure-ai-openai;1.0.0-beta.16;1.0.0-beta.17

sdk/ai/azure-ai-inference/tsp-location.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
commit: 70d146a18939fcfd36661adc0bb123046cd3d19b
1+
commit: 84342a4f74f4d959a3755d7156ef3981d16d0b43
22
additionalDirectories: []
33
repo: Azure/azure-rest-api-specs
44
directory: specification/ai/ModelClient

sdk/ai/azure-ai-projects/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (Unreleased)
4+
5+
- Azure Projects client library for Java. This package contains Microsoft Azure Projects client library.
6+
7+
### Features Added
8+
9+
### Breaking Changes
10+
11+
### Bugs Fixed
12+
13+
### Other Changes

sdk/ai/azure-ai-projects/README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Azure Projects client library for Java
2+
3+
Azure Projects client library for Java.
4+
5+
This package contains Microsoft Azure Projects client library.
6+
7+
## Documentation
8+
9+
Various documentation is available to help you get started
10+
11+
- [API reference documentation][docs]
12+
- [Product documentation][product_documentation]
13+
14+
## Getting started
15+
16+
### Prerequisites
17+
18+
- [Java Development Kit (JDK)][jdk] with version 8 or above
19+
- [Azure Subscription][azure_subscription]
20+
21+
### Adding the package to your product
22+
23+
[//]: # ({x-version-update-start;com.azure:azure-ai-projects;current})
24+
```xml
25+
<dependency>
26+
<groupId>com.azure</groupId>
27+
<artifactId>azure-ai-projects</artifactId>
28+
<version>1.0.0-beta.1</version>
29+
</dependency>
30+
```
31+
[//]: # ({x-version-update-end})
32+
33+
### Authentication
34+
35+
[Azure Identity][azure_identity] package provides the default implementation for authenticating the client.
36+
37+
## Key concepts
38+
39+
## Examples
40+
41+
```java com.azure.ai.projects.readme
42+
```
43+
44+
### Service API versions
45+
46+
The client library targets the latest service API version by default.
47+
The service client builder accepts an optional service API version parameter to specify which API version to communicate.
48+
49+
#### Select a service API version
50+
51+
You have the flexibility to explicitly select a supported service API version when initializing a service client via the service client builder.
52+
This ensures that the client can communicate with services using the specified API version.
53+
54+
When selecting an API version, it is important to verify that there are no breaking changes compared to the latest API version.
55+
If there are significant differences, API calls may fail due to incompatibility.
56+
57+
Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy.
58+
59+
## Troubleshooting
60+
61+
## Next steps
62+
63+
## Contributing
64+
65+
For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
66+
67+
1. Fork it
68+
1. Create your feature branch (`git checkout -b my-new-feature`)
69+
1. Commit your changes (`git commit -am 'Add some feature'`)
70+
1. Push to the branch (`git push origin my-new-feature`)
71+
1. Create new Pull Request
72+
73+
<!-- LINKS -->
74+
[product_documentation]: https://azure.microsoft.com/services/
75+
[docs]: https://azure.github.io/azure-sdk-for-java/
76+
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
77+
[azure_subscription]: https://azure.microsoft.com/free/
78+
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity

sdk/ai/azure-ai-projects/assets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"AssetsRepo":"Azure/azure-sdk-assets","AssetsRepoPrefixPath":"java","TagPrefix":"java/ai/azure-ai-projects","Tag":""}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>com.azure</groupId>
9+
<artifactId>azure-code-customization-parent</artifactId>
10+
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-code-customization-parent;current} -->
11+
<relativePath>../../../parents/azure-code-customization-parent</relativePath>
12+
</parent>
13+
14+
<name>Azure AI Projects SDK for Java</name>
15+
<description>This package contains client customization for Azure AI Projects</description>
16+
17+
<groupId>com.azure.tools</groupId>
18+
<artifactId>azure-ai-projects-customization</artifactId>
19+
<version>1.0.0-beta.1</version>
20+
<packaging>jar</packaging>
21+
</project>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import com.azure.autorest.customization.*;
2+
import org.eclipse.lsp4j.Range;
3+
import org.slf4j.Logger;
4+
5+
import java.util.List;
6+
7+
/**
8+
* This class contains the customization code to customize the AutoRest generated code for Azure AI Inference.
9+
*/
10+
public class AIProjectsCustomizations extends Customization {
11+
12+
@Override
13+
public void customize(LibraryCustomization customization, Logger logger) {
14+
// remove unused class (no reference to them, after partial-update)
15+
16+
ClassCustomization connectionsImpl = customization.getClass(
17+
"com.azure.ai.projects.implementation",
18+
"ConnectionsImpl");
19+
20+
List<Range> toReplace = connectionsImpl.getEditor().searchText(
21+
connectionsImpl.getFileName(),
22+
"{endpoint}/agents/v1.0");
23+
24+
for (Range r : toReplace) {
25+
logger.info("customizing");
26+
connectionsImpl.getEditor().replace(
27+
connectionsImpl.getFileName(),
28+
r.getStart(),
29+
r.getEnd(),
30+
"{endpoint}"
31+
);
32+
}
33+
34+
ClassCustomization telemetriesImpl = customization.getClass(
35+
"com.azure.ai.projects.implementation",
36+
"TelemetriesImpl");
37+
38+
toReplace = telemetriesImpl.getEditor().searchText(
39+
telemetriesImpl.getFileName(),
40+
"{endpoint}/agents/v1.0");
41+
42+
for (Range r : toReplace) {
43+
logger.info("customizing");
44+
telemetriesImpl.getEditor().replace(
45+
telemetriesImpl.getFileName(),
46+
r.getStart(),
47+
r.getEnd(),
48+
"{endpoint}"
49+
);
50+
}
51+
}
52+
}

sdk/ai/azure-ai-projects/pom.xml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<!--
2+
~ Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the MIT License.
4+
Code generated by Microsoft (R) TypeSpec Code Generator.
5+
-->
6+
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
7+
<modelVersion>4.0.0</modelVersion>
8+
<parent>
9+
<groupId>com.azure</groupId>
10+
<artifactId>azure-client-sdk-parent</artifactId>
11+
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
12+
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
13+
</parent>
14+
15+
<groupId>com.azure</groupId>
16+
<artifactId>azure-ai-projects</artifactId>
17+
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-ai-projects;current} -->
18+
<packaging>jar</packaging>
19+
20+
<name>Microsoft Azure SDK for Projects</name>
21+
<description>This package contains Microsoft Azure Projects client library.</description>
22+
<url>https://github.com/Azure/azure-sdk-for-java</url>
23+
24+
<licenses>
25+
<license>
26+
<name>The MIT License (MIT)</name>
27+
<url>http://opensource.org/licenses/MIT</url>
28+
<distribution>repo</distribution>
29+
</license>
30+
</licenses>
31+
32+
<scm>
33+
<url>https://github.com/Azure/azure-sdk-for-java</url>
34+
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
35+
<developerConnection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</developerConnection>
36+
<tag>HEAD</tag>
37+
</scm>
38+
<developers>
39+
<developer>
40+
<id>microsoft</id>
41+
<name>Microsoft</name>
42+
</developer>
43+
</developers>
44+
<properties>
45+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
46+
<spotless.skip>false</spotless.skip>
47+
48+
<javaModulesSurefireArgLine>
49+
--add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
50+
--add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
51+
</javaModulesSurefireArgLine>
52+
</properties>
53+
<dependencies>
54+
<dependency>
55+
<groupId>com.azure</groupId>
56+
<artifactId>azure-core</artifactId>
57+
<version>1.55.3</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
58+
</dependency>
59+
<dependency>
60+
<groupId>com.azure</groupId>
61+
<artifactId>azure-core-http-netty</artifactId>
62+
<version>1.15.11</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
63+
</dependency>
64+
<dependency>
65+
<groupId>com.azure</groupId>
66+
<artifactId>azure-core-test</artifactId>
67+
<version>1.27.0-beta.8</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
68+
<scope>test</scope>
69+
</dependency>
70+
<dependency>
71+
<groupId>com.azure</groupId>
72+
<artifactId>azure-identity</artifactId>
73+
<version>1.15.4</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
74+
<scope>test</scope>
75+
</dependency>
76+
</dependencies>
77+
</project>

0 commit comments

Comments
 (0)