In this hands on session we will explore the CLDK and its capabilities with a few real-world examples of using the CLDK and LLMs to build:
- a code summarization tool: See Code Summarization
- a test generation tool: See Test Generation
- a code translation tool: See Code Translation
- Install CLDK and java bindings. Detailed set-up instructions can be found in the CLDK documentation.
- An openrouter API key to access some opensource LLMs. If you don't have an account, you can sign up for free at openrouter.ai/sign-up.
-
First, let's clone this repository and navigate to the directory:
git clone https://github.com/codellm-devkit/cldk-tutorial.git && \ cd cldk-tutorial
-
Next, create a
.envfile in the root directory.touch .env
Log in to your openrouter account and create a new API key.
Fig 2. Generate a name and click "Create"
Copy the API key and paste it into the .env file as follows:
# .env
OPENROUTER_API=sk-rest-of-your_api_key-here
# Ensure to replace 'sk-rest-of-your_api_key-here' with your actual API keyFinally, let's install the required dependencies. You can do this by running the following command in your terminal:
python3 -m venv .venv
source .venv/bin/activate
pip install -U -r requirements.txtYou have two options to start the Jupyter Notebook server:
-
Using the command line: Run the following command in your terminal:
./.venv/bin/jupyter notebook
This will start the Jupyter Notebook server and open it in your default web browser.
-
Recommended: Using VSCode: From inside the
cldk-tutorialdirectory you can open VSCode:code .This will open the current directory in VSCode. You can then open the Jupyter Notebook files and run them directly from there.
Make sure to select the correct Python interpreter (the one inside the
.venvdirectory) in VSCode.
Make sure you deactivate the virtual environment when you are done with the tutorial. You can do this by running the following command in your terminal:
deactivateThis will deactivate the virtual environment and return you to your system's default Python environment.
Join our community on Discord/Github to discuss CLDK and share your experiences with other users:
For any questions, feedback, or suggestions, please contact the authors:
| Name | |
|---|---|
| Rahul Krishna | i.m.ralk@gmail.com |
| Divya Sankar | divya.sankar@ibm.com |
| Rangeet Pan | rangeet.pan@ibm.com |
| Saurabh Sihna | sinhas@us.ibm.com |



