Skip to main content

Pi Labs model providers for NLWeb

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nlweb_pilabs_models-0.6.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nlweb_pilabs_models-0.6.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file nlweb_pilabs_models-0.6.0.tar.gz.

File metadata

  • Download URL: nlweb_pilabs_models-0.6.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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}

File hashes

Hashes for nlweb_pilabs_models-0.6.0.tar.gz
Algorithm Hash digest
SHA256 cb253d05fc69573fc06fe111428ae1ae4f088e3173dcc2c37c13e44294deb21c
MD5 be4def149e1cc3bb7b8d0fcc108082a8
BLAKE2b-256 a0dfba7c9704e9df058a8ff8901806e7097590d01e3d9eb8570827350662c265

See more details on using hashes here.

File details

Details for the file nlweb_pilabs_models-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: nlweb_pilabs_models-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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}

File hashes

Hashes for nlweb_pilabs_models-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ff8b93ee6b69500963342b77f64c0519b563476ff335633fe87b1578d169e92
MD5 f583084e66d796f9fb60adf234420feb
BLAKE2b-256 3b784f01e610f7c33143fd93d88152a3e6ead9d5c3f36b78eec6f70fc053e226

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page