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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prompt_passage-0.2.2.tar.gz.
File metadata
- Download URL: prompt_passage-0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74dc92b59ed230c89f853816096665ce65856c2ac951233c50e1cada0cd97df2
|
|
| MD5 |
de49d3f900609b548cbc61879a1713d8
|
|
| BLAKE2b-256 |
e192a652ae734b66ca16a0590dd036e49fbbe31b61345605e696cfedb53404d9
|
Provenance
The following attestation bundles were made for prompt_passage-0.2.2.tar.gz:
Publisher:
python-publish.yml on emgarten/prompt-passage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prompt_passage-0.2.2.tar.gz -
Subject digest:
74dc92b59ed230c89f853816096665ce65856c2ac951233c50e1cada0cd97df2 - Sigstore transparency entry: 274340644
- Sigstore integration time:
-
Permalink:
emgarten/prompt-passage@fff75d806149693a708b23b42cb8cee66282cdcc -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/emgarten
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fff75d806149693a708b23b42cb8cee66282cdcc -
Trigger Event:
release
-
Statement type:
File details
Details for the file prompt_passage-0.2.2-py3-none-any.whl.
File metadata
- Download URL: prompt_passage-0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0e583edb716ed81c150844095528e0f47e0477f80e9c63d71d8934b820e3199
|
|
| MD5 |
6f4915c7e90f96621211dba3b935dfa6
|
|
| BLAKE2b-256 |
82b078f45ea966436d0f34892437743463e3d0e82c4c6de53f6d0d4c3481569e
|
Provenance
The following attestation bundles were made for prompt_passage-0.2.2-py3-none-any.whl:
Publisher:
python-publish.yml on emgarten/prompt-passage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prompt_passage-0.2.2-py3-none-any.whl -
Subject digest:
f0e583edb716ed81c150844095528e0f47e0477f80e9c63d71d8934b820e3199 - Sigstore transparency entry: 274340648
- Sigstore integration time:
-
Permalink:
emgarten/prompt-passage@fff75d806149693a708b23b42cb8cee66282cdcc -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/emgarten
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fff75d806149693a708b23b42cb8cee66282cdcc -
Trigger Event:
release
-
Statement type: