AI Tools

CBorg-Powered AI Tools

Note

Got a question? Email us at scienceit@lbl.gov or join the CBorg Users Chatroom

CBorg Chat

Use ChatGPT, Gemini, Anthropic, Llama3 and more.

CBorg API Service

Use CBorg LLMs from your own app or build your own LLM-powered programs.

CBorg Client Proxy

For advanced API users, this client-side everse proxy service streamlines the connection between your local machine and the CBorg API server by injecting your API key automatically and handling parallel connections.

Features:

  • Automatic Key Injection: Inject API keys automatically from environment variable - no need to save keys in each application
  • Automatic Endpoint Routing on LBL-Net: Detects when client is connected to LBL-net and automatically switch to locally-routed endpoint, reducing latency.
  • Usage Monitoring: Periodically checks and reports on current key budget utilization.

VS Code Continue Plugin

Use the popular VS Code Continue Plugin with the CBorg API Server.

Two options:

  1. Easy setup: provides chat and editor functions
  2. Advanced setup: full functionality with tab-autocompletion and indexing - requires CBorg Client Proxy

Cursor AI Code Editor

Cursor is an AI-powered code editor, based on a fork of VS Code. Cursor requires less setup to configure compared to VS Code + Continue, but is dependent on a Cursor Pro subscription for full functionality including “Composer” and “Fill-in-the middle” code completions.

Cursor can be used with the CBorg API for chat, inline code generation and editing.

Step 1: Add CBorg Model Names

Go to “Models” in the Cursor Settings:

  1. Disable Default Models: Disable all of the default model names
  2. Add CBorg Model Names: Add and enable at least one of the following models:
  • lbl/cborg-coder:latest
  • openai/chatgpt:latest
  • google/gemini:latest
  • anthropic/claude:latest
Step 2: Set API Key and Base URL
  1. OpenAI API Key: sk-… (paste your CBorg API Key here)
  2. Override OpenAI Base URL: https://api.cborg.lbl.gov

OpenAI Codex CLI

# Install OpenAI Codex
npm i -g @openai/codex

# Set Base URL to CBorg API Server
export OPENAI_BASE_URL=https://api.cborg.lbl.gov

# Set OPENAI_API_KEY to your CBorg API Key 
export OPENAI_API_KEY=$CBORG_API_KEY

# Now you can use Codex with any CBorg model, e.g.:
codex --model lbl/cborg-coder

For more information see OpenAI Codex Github

Aider

CLI-based coding agent that can edit code in a local git repo.

python -m pip install -U aider-chat

# Mac/Linux:
export OPENAI_API_BASE=https://api.cborg.lbl.gov
export OPENAI_API_KEY=(your CBORG_API_KEY)
# ... restart shell after adding these to ~.bashrc

# Windows:
setx OPENAI_API_BASE https://api.cborg.lbl.gov
setx OPENAI_API_KEY (your CBORG_API_KEY)
# ... restart shell after setx commands

# Prefix the model name with openai/

# e.g. using CBorg Coder (LBL-hosted coding model)
aider --model openai/lbl/cborg-coder:latest

# e.g. using Claude Sonnet 3.7 via CBorg (best results)
aider --model openai/anthropic/claude-sonnet

# e.g. using OpenAI ChatGPT 4o via CBorg
aider --model openai/openai/gpt-4o

LBL Omni-Engineer

CLI-based coding assistant capable of editing files in-place using simple commands. Best results with Claude Sonnet, but you can also use the on-prem CBorg Coder model.

Make sure to check out the ‘utilities’ branch, not “main”.

git checkout utilities
pip install -r requirements.txt
python ./main.py

CBORG_API_KEY environment variable must be defined before launching the tool.