Skip to main content

A local proxy for LLMs, providing a unified interface for multiple models and support for identity based authentication.

Project description

Prompt Passage

A local proxy for LLMs, providing a unified interface for multiple models and support for identity based authentication.

Example config

service:
  port: 8095
  auth:
    type: apikey
    key: localkey
providers:
  azure-o4-mini-env:
    endpoint: "https://{service}.cognitiveservices.azure.com/openai/deployments/o4-mini/chat/completions?api-version=2025-01-01-preview"
    model: o4-mini
    auth:
      type: apikey
      envKey: AZURE_OPENAI_API_KEY
  azure-o4-mini-key:
    endpoint: "https://{service}.cognitiveservices.azure.com/openai/deployments/o4-mini/chat/completions?api-version=2025-01-01-preview"
    model: o4-mini
    auth:
      type: apikey
      key: djjskskskkkk
  azure-o4-mini-azure:
    endpoint: "https://{service}.cognitiveservices.azure.com/openai/deployments/o4-mini/chat/completions?api-version=2025-01-01-preview"
    model: o4-mini
    auth:
      type: azure

Dev environment setup

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install packages
make install

# Lint and type check
make check

Docker

Build the container image:

docker build -t prompt-passage .

When using the azure authentication method, mount your Azure CLI credentials directory:

docker run -p 8095:8095 -v ~/.prompt-passage.yaml:/etc/prompt-passage.yaml -v ~/.azure:/root/.azure -e AZURE_OPENAI_API_KEY prompt-passage

Docker compose

services:
  prompt-passage:
    image: prompt-passage
    ports:
      - "8095:8095"
    volumes:
      - ~/.prompt-passage.yaml:/etc/prompt-passage.yaml  # mount config file
      - ~/.azure:/root/.azure # mount azure cli credentials if needed
    environment:
      - AZURE_OPENAI_API_KEY  # include any env vars used in the config

HTTPS

To serve the API over HTTPS, set PROMPT_PASSAGE_CERTFILE and optionally define PROMPT_PASSAGE_KEYFILE and PROMPT_PASSAGE_CA_CERTS for the private key and CA bundle:

Example:

PROMPT_PASSAGE_CERTFILE=/path/server.crt \
PROMPT_PASSAGE_KEYFILE=/path/server.key \
PROMPT_PASSAGE_CA_CERTS=/path/ca.pem \
python -m prompt_passage.cli

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

prompt_passage-0.0.2.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

prompt_passage-0.0.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file prompt_passage-0.0.2.tar.gz.

File metadata

  • Download URL: prompt_passage-0.0.2.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for prompt_passage-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4014d725efc4b553289f6f0a4c033ab42ce0142c7db3603e70e3e00f3057fdc0
MD5 c71e2948f40706e7ab64a0fa0f3eff6f
BLAKE2b-256 f3587fb99c85028c818d97a0f3b38413c8cc0b60a614f34129a3522ca5cfb820

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_passage-0.0.2.tar.gz:

Publisher: python-publish.yml on emgarten/prompt-passage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompt_passage-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: prompt_passage-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for prompt_passage-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b48828353d30295911b4ea6d9fd7425919e8e5237db57f7e5755bb45902b3b34
MD5 588731a9d349b96d15153459bbafc9a7
BLAKE2b-256 af78b6159e5185e3fe5521501dca8ff916be4772da996db2260362804f0cb272

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompt_passage-0.0.2-py3-none-any.whl:

Publisher: python-publish.yml on emgarten/prompt-passage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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