Skip to main content

Suprsonic tools for LangChain

Load source pages for a documentation assistant, or find official release notes for a recurring software update check. Both examples make a real Suprsonic request using your own API key. You can run them without a language model.

Load a source page for a documentation assistant

  1. Get your Suprsonic API key. Sign in and copy a key from the dashboard. If you open a new account, confirm your email to use its welcome credits.
  2. Install the package and set SUPRSONIC_API_KEY in your shell or secret manager.
  3. Run the example with a public page your assistant needs to read, such as the Python release schedule.
python -m pip install langchain-suprsonic
python -m langchain_suprsonic source-page https://www.python.org/downloads/

The response contains the title and Markdown under data, plus source_url, request_id, and credits_used. Use source_url with the text when you cite it. The example uses Fast mode for static HTML.

from langchain_suprsonic import source_page_tool

load_source_page = source_page_tool()
result = load_source_page.invoke({"url": "https://www.python.org/downloads/"})
print(result["data"]["title"], result["request_id"], result["credits_used"])

For recurring production requests, sign in to the same account and choose a plan with API credits. Once the plan is active, rerun the command with the same key. Check the request and its credit charge in your API dashboard.

Find official release notes for an update monitor

Get your Suprsonic API key, install the same package, and search a publisher's official domain.

python -m langchain_suprsonic search-sources 'site:docs.python.org Python release notes' --num-results 5

The results in data.organic_results include titles, links, and snippets. The search uses SERP mode, so your monitor can use the underlying sources directly.

from langchain_suprsonic import source_search_tool

search_sources = source_search_tool()
result = search_sources.invoke({"query": "site:docs.python.org Python release notes"})
for source in result["data"].get("organic_results", []):
    print(source["title"], source["url"])

Choose a plan with API credits when you are ready to run this on a schedule. Keep the same key in your deployment's secret manager.

Both factories return a LangChain StructuredTool you can add to an existing agent's tools list. Each invocation makes one API request. See the Suprsonic API reference for current modes, credit costs, and error details.

Metadata

Release files for langchain-suprsonic 0.1.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 langchain-suprsonic 0.1.0
File Size Uploaded Provenance Actions
langchain_suprsonic-0.1.0.tar.gz 5.3 kB Without provenance Details for langchain_suprsonic-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-suprsonic 0.1.0
File Interpreter ABI Platform Actions
langchain_suprsonic-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_suprsonic-0.1.0-py3-none-any.whl

Total release size: 10.1 kB

Release files / langchain_suprsonic-0.1.0.tar.gz

Download URL langchain_suprsonic-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3a07a336f36740fcd3b0aa394673650ae0e02da73702103ef9ab38c793d862cb
BLAKE2b-256 checksum
How to use checksums
cab96b0b4731491c39b49bb891007eca4844f42aa5c2045b5be65282a564f386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / langchain_suprsonic-0.1.0-py3-none-any.whl

Download URL langchain_suprsonic-0.1.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3a8d35b6ef682a5864310cf08af2aa70af8e29af413c66abdc839c4d6798c82
BLAKE2b-256 checksum
How to use checksums
f2f26c109df296a4a6f43ec854a7b8c9d54928d5ebab8c2e802725b1c21a9967
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Security for langchain-suprsonic 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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