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.2a0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

promplate_pyodide-0.0.2.2a0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file promplate_pyodide-0.0.2.2a0.tar.gz.

File metadata

File hashes

Hashes for promplate_pyodide-0.0.2.2a0.tar.gz
Algorithm Hash digest
SHA256 7d6afca94d94ce929a70fe8d325c9b7b5264a7782284679396054aebd7689160
MD5 b1d95d8f36437f7cd3e43aa23ea0547b
BLAKE2b-256 c4686c2fc244314b23ef4531f641de031525807d3f0a73e0275d420b483d4745

See more details on using hashes here.

File details

Details for the file promplate_pyodide-0.0.2.2a0-py3-none-any.whl.

File metadata

File hashes

Hashes for promplate_pyodide-0.0.2.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1ea9209113c3946cb1c539a942aacba74b6f8b6084d09f7609278e2b65b2217
MD5 91b2a1bcb1484961b023de0706865165
BLAKE2b-256 690b59387ffb89c44b20efc10a70fd8c03b572cde855510caee313ae0d1cb8a5

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