New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rungalileo/observe

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rungalileo/observe

NodeJS client for Galileo Observe.

  • 0.0.10
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-94.44%
Maintainers
0
Weekly downloads
 
Created
Source

Observe-js

NodeJS client for Galileo Observe.

Testing

In the root directory, run:

  • npm i
  • npm link

In the examples directory, run:

  • npm i
  • npm link @rungalileo/observe
  • node openai.js

Making changes

When updating the code, only modify the *.ts files and then run:

  • npm run format
  • npm run lint-fix (this doesn't currently pass)
  • npm run build

Logging data to Galileo Observe

import { GalileoObserveCallback } from "@rungalileo/observe";
const observe_callback = new GalileoObserveCallback("llm_monitor_example", "app_v1")// project and version
await observe_callback.init();

Add the callback {callbacks: [observe_callback]} in the Langchain invoke step of your application.

Retrieving data from Galileo Observe

import { ApiClient } from "@rungalileo/observe";
const apiClient = new ApiClient();
await apiClient.init("llm_monitor_test_1");// project

You can use this with getLoggedData to retrieve the raw data.

const rows = await apiClient.getLoggedData(
    "2024-03-11T16:15:28.294Z",// ISO start_time string with timezone
    "2024-03-12T16:15:28.294Z",// ISO end_time string with timezone
    filters,// an array of information like "col_name":"model"
    sort_spec,// an array of information like "sort_dir":"asc"
    limit// a number of items to return
);
console.log(rows);

You can use getMetrics to get corresponding metrics.

const metrics = await apiClient.getMetrics(
    "2024-03-11T16:15:28.294Z",
    "2024-03-12T16:15:28.294Z",
    filters
);
console.log(metrics);

FAQs

Package last updated on 04 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc