Step 1: Introduction
The Javelin AI Gateway is an enterprise-grade API Gateway for AI applications. It integrates robust access security, ensuring secure interactions with Large Language Models. Learn more in the official documentation.Step 2: Installation
Before we begin, we must install thejavelin_sdk and set up the Javelin API key as an environment variable.
Step 3: Completions example
This section will demonstrate how to interact with the Javelin AI Gateway to get completions from a large language model. Here is a Python script that demonstrates this: (note) assumes that you have setup a route in the gateway called ‘eng_dept03’Step 4: Embeddings example
This section demonstrates how to use the Javelin AI Gateway to obtain embeddings for text queries and documents. Here is a Python script that illustrates this: (note) assumes that you have setup a route in the gateway called ‘embeddings’Step 5: Chat example
This section illustrates how to interact with the Javelin AI Gateway to facilitate a chat with a large language model. Here is a Python script that demonstrates this: (note) assumes that you have setup a route in the gateway called ‘mychatbot_route’Connect these docs to Claude, VSCode, and more via MCP for real-time answers.