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.7.0.tar.gz (3.2 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.7.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nlweb_pilabs_models-0.7.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for nlweb_pilabs_models-0.7.0.tar.gz
Algorithm Hash digest
SHA256 ede21b6afe7cb57e83912153db585b4b2739e0aaa19df00637843e0903dec5cc
MD5 969ed794ee969650e0129e9b9b2594ef
BLAKE2b-256 4d4115b63c83c55b1540e35ce5f42c49b23de01b696e5d7ab91a61c6bbc42dd5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlweb_pilabs_models-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for nlweb_pilabs_models-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c341b4129b3abaa16b3a160381599d318b42865955a141a4d13c5f5d69afb85d
MD5 20eed4909bb6fe1c492823017079e88d
BLAKE2b-256 a3ea5caa9d09a29cdba4ef002124ca2ea3d160bc617b46538e249ca5d720f446

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