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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for promplate_pyodide-0.0.2.1a6.tar.gz
Algorithm Hash digest
SHA256 63d69444ee244981b2e19c9bd9f54d9d2bfe9f6af6d36ef300852b6f9c947046
MD5 ed11a7d5605a5e0422f0afca73a2d454
BLAKE2b-256 20aa9b4b0703c13bbc1f599a8b4357c9d351cb3dcca40b1ed5cd0b5d12dd79e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for promplate_pyodide-0.0.2.1a6-py3-none-any.whl
Algorithm Hash digest
SHA256 37c3d905b75f30cc83a25199240035efc8620160fa72d7b9f883f7fbb3901685
MD5 3ffe2b72af03a14632175b2246315a71
BLAKE2b-256 de8810ceecdbd344eecb61e2538ea15ee672901b593162a1006de2c12ca97d03

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