Skip to main content

NLWeb Pi Labs Models

Pi Labs LLM scoring provider for NLWeb.

Overview

This package provides integration with Pi Labs scoring API for relevance scoring in NLWeb queries.

Features

  • PiLabsProvider: LLM provider that uses Pi Labs scoring API
  • PiLabsClient: HTTP client for Pi Labs API
  • Async scoring with httpx and HTTP/2 support
  • Thread-safe client initialization

Installation

pip install -e packages/providers/pilabs/models

Usage

Configure in your config.yaml:

llm:
  scoring:
    llm_type: pilabs
    endpoint: "http://localhost:8001/invocations"
    import_path: "nlweb_pilabs_models.llm"
    class_name: "PiLabsProvider"

Requirements

  • Python >= 3.11
  • httpx with HTTP/2 support
  • nlweb_core

API

The Pi Labs provider expects:

  • request.query: The user query
  • item.description: The item to score
  • site.itemType: The type of item

Returns:

  • score: Relevance score (0-100)
  • description: Item description

Metadata

Release files for nlweb-pilabs-models 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nlweb-pilabs-models 0.7.0
File Size Uploaded
nlweb_pilabs_models-0.7.0.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nlweb-pilabs-models 0.7.0
File Interpreter ABI Platform
nlweb_pilabs_models-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 kB

Release files / nlweb_pilabs_models-0.7.0.tar.gz

Download URL nlweb_pilabs_models-0.7.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ede21b6afe7cb57e83912153db585b4b2739e0aaa19df00637843e0903dec5cc
BLAKE2b-256 checksum
How to use checksums
4d4115b63c83c55b1540e35ce5f42c49b23de01b696e5d7ab91a61c6bbc42dd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nlweb_pilabs_models-0.7.0-py3-none-any.whl

Download URL nlweb_pilabs_models-0.7.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c341b4129b3abaa16b3a160381599d318b42865955a141a4d13c5f5d69afb85d
BLAKE2b-256 checksum
How to use checksums
a3ea5caa9d09a29cdba4ef002124ca2ea3d160bc617b46538e249ca5d720f446
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page