Getting Started | Galileo Observe
How to monitor your apps with Galileo Observe
Getting started with Galileo Observe is really easy. It involves 3 steps:
Create a project
Integrate Galileo in your code
Galileo Observe can integrate via Langchain callbacks, our Python Logger, or via RESTful APIs.
Choose your Guardrail metrics
Turn on the metrics you want to monitor your system on, select from our Guardrail Metric store or register your own.
Install the Galileo Client
galileo-observe
galileo-observe
-
Open a TypeScript project where you want to install Galileo
-
Install the client via npm with
npm install @rungalileo/galileo
If you are not using Observe Callback features you can use the --no-optional
flag to avoid extraneous dependencies.
- Add your console URL (GALILEO_CONSOLE_URL) and API key (GALILEO_API_KEY) to your environment variables in your
.env
file.
Getting an API Key
To create an API key:
Go to your Galileo Console settings and select API Keys
Select Create a new key
Give your key a distinct name and hit Create
Logging via Client
If you’re not using LangChain, you can use our Python or TypeScript Logger to log your data to Galileo.
First you can create your ObserveWorkflows object with your existing project.
Next you can log your workflow.
First you can create your ObserveWorkflows object with your existing project.
Next you can log your workflow.
- Initialize client and create or select your project
- Log your workflows
- Log your Evaluate run to Galileo
Integrating with Langchain
We support integrating into both Python-based and Typescript-based Langchain systems:
Integrating into your Python-based Langchain application is the easiest and recommended route. You can just add GalileoObserveCallback(project_name="YOUR_PROJECT_NAME")
to the callbacks
of your chain invocation.
The GalileoObserveCallback logs your input, output, and relevant statistics back to Galileo, where additional evaluation metrics are computed.
Integrating into your Python-based Langchain application is the easiest and recommended route. You can just add GalileoObserveCallback(project_name="YOUR_PROJECT_NAME")
to the callbacks
of your chain invocation.
The GalileoObserveCallback logs your input, output, and relevant statistics back to Galileo, where additional evaluation metrics are computed.
Integrating into your Typescript-based Langchain application is a very simple process. You can just add aGalileoObserveCallback
object to the callbacks
of your chain invocation.
Add the callback {callbacks: [observe_callback]}
in the invoke step of your application:
The GalileoObserveCallback callback logs your input, output, and relevant statistics back to Galileo, where additional evaluation metrics are computed.
Logging through our REST APIs
If you are looking to log directly using our REST APIs, you can do so with our public APIs. More instructions on using those can be found here.
What’s next
Once you’ve integrated Galileo into your production app code, you can choose your Guardrail metrics.
Was this page helpful?