So you want to contribute code to this project? Excellent! We're glad you're here. Here's what you need to do.
Fork this repository on GitHub, and clone locally with git clone
.
OpenSearch components build using Java 11 at a minimum. This means you must have a JDK 11 installed with the environment variable JAVA_HOME
referencing the path to Java home for your JDK 11 installation, e.g. JAVA_HOME=/usr/lib/jvm/jdk-11
.
To build from the command line, use ./gradlew
.
./gradlew clean
./gradlew build
./gradlew publishToMavenLocal
- Create a new Java file in the specified package directory -> eg. cat src/main/java/org/opensearch/agent/tools/NewTool.java
- Modify ToolPlugin file to instantiate, initialize, and add the new tool, refer -> (here)
- Start the server with ./gradlew run
- Make sure to have access to the LLM that you're using
- Create any remote connector using (remote_inference_blueprints)
- Get the model_id from the step above and provide it as a parameter in below step to register the agent
- Register the agent that will run your custom tool for (reference)
- Get the agent_id from the step above and provide it as part of URL in below step to run the agent
- Run the agent (refer)
Launch Intellij IDEA, choose Import Project, and select the settings.gradle
file in the root of this package.
See CONTRIBUTING.