-
Notifications
You must be signed in to change notification settings - Fork 82
Add documentation for adding Maven dependencies #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -140,6 +140,70 @@ After building: | |
| - The Python package is installed and ready to use | ||
| - The distribution JAR is located at: `dist/target/flink-agents-dist-*.jar` | ||
|
|
||
| ## Maven Dependencies (Java Development) | ||
|
|
||
| For developing Flink Agents applications in Java, add the following dependencies to your `pom.xml`: | ||
|
|
||
| ### Basic Dependencies for Agent Development | ||
|
|
||
| **Required for developing Agent applications:** | ||
| - `flink-agents-api` - Core API interfaces and classes | ||
| - Integration modules - Add the specific integrations you need (e.g., `flink-agents-integrations-chat-models-openai`) | ||
|
|
||
| **Additional dependencies for running in IDE:** | ||
| - `flink-agents-runtime` - Runtime execution engine (required for local execution/testing) | ||
| - Flink artifacts - `flink-streaming-java` and `flink-clients` with `provided` scope | ||
|
|
||
| ### Example pom.xml | ||
|
|
||
| ```xml | ||
| <properties> | ||
| <flink.version>1.20.3</flink.version> | ||
| <flink-agents.version>0.2-SNAPSHOT</flink-agents.version> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <!-- Flink Agents Core API --> | ||
| <dependency> | ||
| <groupId>org.apache.flink</groupId> | ||
| <artifactId>flink-agents-api</artifactId> | ||
| <version>${flink-agents.version}</version> | ||
| </dependency> | ||
|
|
||
| <!-- Flink Agents Integration (example: OpenAI) --> | ||
| <dependency> | ||
| <groupId>org.apache.flink</groupId> | ||
| <artifactId>flink-agents-integrations-chat-models-openai</artifactId> | ||
| <version>${flink-agents.version}</version> | ||
| </dependency> | ||
|
|
||
| <!-- Runtime (required for IDE/local execution) --> | ||
| <dependency> | ||
| <groupId>org.apache.flink</groupId> | ||
| <artifactId>flink-agents-runtime</artifactId> | ||
| <version>${flink-agents.version}</version> | ||
| </dependency> | ||
|
Comment on lines
+180
to
+185
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this also be provided? |
||
|
|
||
| <!-- Flink dependencies (provided scope) --> | ||
| <dependency> | ||
| <groupId>org.apache.flink</groupId> | ||
| <artifactId>flink-streaming-java</artifactId> | ||
| <version>${flink.version}</version> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.flink</groupId> | ||
| <artifactId>flink-clients</artifactId> | ||
| <version>${flink.version}</version> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| ``` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have a feeling that there are too many dependencies need to be added for execution in an IDE. This not only harms the user experience, but also makes this document hard to maintain as the dependencies need to be added may change in future and this document can easily become inconsistent. I wonder if we can introduce a pom like |
||
|
|
||
| {{< hint info >}} | ||
| **Note:** Replace `0.2-SNAPSHOT` with the actual release version when available. For SNAPSHOT versions, you may need to add the Apache snapshot repository to your `pom.xml`. | ||
| {{< /hint >}} | ||
|
Comment on lines
+204
to
+206
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can remove this hint and just use |
||
|
|
||
| ## Deploy to Flink Cluster | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #433, we add constant strings to point a resource implementation, so integration modules is not required for developing. But they are still need for running in IDE