Skip to main content

patches for promplate-core for running in pyodide runtime

Project description

promplate-pyodide

Run your promplate project in the browser with pyodide!

Usage

from micropip import install  # in pyodide runtime
await install("promplate-pyodide")

from promplate_pyodide import patch_all
patch_all()

You can register the openai module as the JavaScript SDK in the JavaScript scope because the Python SDK v1.x doesn't support pyodide.

It will remove sync APIs of promplate.llm.openai because the JavaScript OpenAI SDK is async-only.


Of course you can use OpenAI Python SDK v0.x in pyodide, but it is not recommended.

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

promplate_pyodide-0.0.2.1b0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

promplate_pyodide-0.0.2.1b0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file promplate_pyodide-0.0.2.1b0.tar.gz.

File metadata

File hashes

Hashes for promplate_pyodide-0.0.2.1b0.tar.gz
Algorithm Hash digest
SHA256 077fee0388f30a2eb774efe3a98e0dd9114d11d1a7caa24af1f1bdd453b419a0
MD5 f1db8bc728a8dbe757ff8bdbb5d90c08
BLAKE2b-256 b4271fbccff420fae1dc23faa43b8cb56a8f50076f0077a4b2dd8ab290fda52f

See more details on using hashes here.

File details

Details for the file promplate_pyodide-0.0.2.1b0-py3-none-any.whl.

File metadata

File hashes

Hashes for promplate_pyodide-0.0.2.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f1402f974027cfcb50356fa3c7e2034b9c2dd6517261e8726ff3da40bc4a422
MD5 417b5bcc46b4a0d71c3231ad21e18152
BLAKE2b-256 455ee92f38868d03ed47329adb98bc4310ba0c82881e1afd9c64af8f185736bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page