Skip to main content

Moss semantic search integration for VAPI Custom Knowledge Base webhooks

Project description

vapi-moss

Moss semantic search integration for VAPI Custom Knowledge Base webhooks.

Provides MossVapiSearch — a framework-agnostic adapter that queries a preloaded Moss index and returns documents in VAPI's expected {"content", "similarity"} shape. Also includes verify_vapi_signature for webhook HMAC-SHA256 verification.

Installation

pip install vapi-moss

Quick Start

from vapi_moss import MossVapiSearch

search = MossVapiSearch(
    project_id="your-id",
    project_key="your-key",
    index_name="my-faq-index",
)
await search.load_index()

result = await search.search("How do I return an item?")
print(result.documents)    # [{"content": "...", "similarity": 0.92}, ...]
print(result.time_taken_ms)  # 3

Signature Verification

from vapi_moss import verify_vapi_signature

is_valid = verify_vapi_signature(
    raw_body=request_bytes,
    signature_header=headers["x-vapi-signature"],
    secret="your-webhook-secret",
)

See apps/vapi-moss for a complete FastAPI server example.

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

vapi_moss-0.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

vapi_moss-0.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file vapi_moss-0.0.1.tar.gz.

File metadata

  • Download URL: vapi_moss-0.0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for vapi_moss-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f0e650526f8a8107ebb6f27735af8938bc88f39b6d24ce52788e7d43695c1f45
MD5 62b4c6d2324597a3e0722fffdeac05ea
BLAKE2b-256 2a29d84627964445d901f0822faad118970cf1fdec2890408a1c6007d3ba9ac3

See more details on using hashes here.

File details

Details for the file vapi_moss-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: vapi_moss-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for vapi_moss-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1be444f4f8f257b1fd55ddf8ad53db82bb7ad30c63a7d2c8eeffd4536d74e1d8
MD5 172b87bc3aad32e9d9a9ee987cee1e11
BLAKE2b-256 62d778dd683a36ec8ed27d1fe1b7923b4094f8808f68a12b12e8b76c3f3680cc

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