Overview
An overview of the Galileo TypeScript SDK.
The Galileo TypeScript SDK (latest release) provides a comprehensive set of tools for logging, evaluating, and experimenting with LLM applications. It’s designed to be easy to use while providing powerful features for monitoring and improving your AI applications.
Key Features
- Logging: Capture LLM interactions, tool usage, and workflow execution
- Experimentation: Run experiments to evaluate and improve your LLM applications
- Datasets: Create and manage datasets for testing and evaluation
- Prompts: Create, version, and test prompt templates
Installation
Initialization and Authentication
Make sure you have a Galileo API key and configure Galileo using environment variables:
GALILEO_CONSOLE_URL
to your own installation.Getting Started
The simplest way to get started is to use our OpenAI client wrapper:
Logging Methods
The TypeScript SDK allows you to log all prompts, responses, and statistics around your LLM usage. There are three main ways to log your application:
- Using a wrapper (Recommended) - Instead of importing LLM clients directly like
openai
, use Galileo’s wrapper which automatically logs everything with no other code changes required! - Using the log function wrapper - By wrapping a function that calls an LLM with the
log
function wrapper, you can create workflow spans with nested LLM calls and tool spans. - Directly using the
GalileoLogger
class (Manual) - For more advanced use cases, you can use the GalileoLogger directly to have full control over the logging process.
Regardless of which logging method you choose, you will need to initialize your API keys and install the Galileo SDK by following the steps below.
Additional Documentation
The Galileo TypeScript SDK consists of several components: Check out the individual component documentation for more details.
- Wrappers: Easily integrate with popular LLM providers like OpenAI
- Core Logging: Log LLM interactions, tool usage, and workflow execution
- Experiments: Run experiments to evaluate and improve your LLM applications
- Datasets: Create and manage datasets for testing and evaluation
- Prompts: Create, version, and test prompt templates