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.3.3.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

promplate_pyodide-0.0.3.3-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

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