Skip to main content

LangExtract provider plugin for openrouter

Project description

    # LangExtract openrouter Provider

A provider plugin for LangExtract that supports openrouter models.

Installation

From source:

pip install -e .

From PyPI:

pip install langextract-openrouter

Supported Model IDs

  • openrouter*: Models matching pattern ^openrouter
  • openrouter/google/gemini-2.5-flash
  • openrouter/openai/gpt-4.1
  • ...

Environment Variables

  • OPENROUTER_API_KEY: API key for authentication

Usage

import langextract as lx

result = lx.extract(
    text="Your document here",
    model_id="openrouter/openai/gpt-4.1", # for example
    prompt_description="Extract entities",
    examples=[...]
)

Development

  1. Install in development mode: pip install -e .
  2. Run tests: python test_plugin.py
  3. Build package: python -m build
  4. Publish to PyPI: twine upload dist/*

License

Apache License 2.0

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

langextract_openrouter-0.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

langextract_openrouter-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file langextract_openrouter-0.1.1.tar.gz.

File metadata

  • Download URL: langextract_openrouter-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for langextract_openrouter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ff25ef35d6d633e9a5bf19e33226c7417f91f9ef410d66ae687177ddefa3b844
MD5 5873b6ea7c72661d2e807199384f41a1
BLAKE2b-256 43903d0437de461e2725d096ff89f76a8ea105ce34c695c4db3ee89b086c638d

See more details on using hashes here.

File details

Details for the file langextract_openrouter-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for langextract_openrouter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90065db360a03285fe5bb82fb36e4bbd030b2e61f18779d14ca5bae3e654daf8
MD5 4b1b1085ca67abdd68a9e9a4ead87b0c
BLAKE2b-256 031e95ced03c01d7fc7660bdbb19af3d0fc6540f8a2fe36f1942d061e693fb43

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