Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 2.35 KB

DEVELOPER_GUIDE.md

File metadata and controls

58 lines (38 loc) · 2.35 KB

Developer Guide

So you want to contribute code to this project? Excellent! We're glad you're here. Here's what you need to do.

Forking and Cloning

Fork this repository on GitHub, and clone locally with git clone.

Install Prerequisites

JDK 11

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.

Building

To build from the command line, use ./gradlew.

./gradlew clean
./gradlew build
./gradlew publishToMavenLocal

Build your custom tool

  • 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

Test your custom tool

  • 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)

Using IntelliJ IDEA

Launch Intellij IDEA, choose Import Project, and select the settings.gradle file in the root of this package.

Submitting Changes

See CONTRIBUTING.

Backport