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

Uploaded Source

Built Distribution

promplate_pyodide-0.0.3.4-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file promplate_pyodide-0.0.3.4.tar.gz.

File metadata

  • Download URL: promplate_pyodide-0.0.3.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.17.1 CPython/3.12.4 Windows/11

File hashes

Hashes for promplate_pyodide-0.0.3.4.tar.gz
Algorithm Hash digest
SHA256 0da89d8fd605e7c6be97611b2b8b912272ebe3fbfd380d828c89378554a8db0b
MD5 6cfde3587d3c17010a6d75705fc2e561
BLAKE2b-256 893454f15a9719177213cab5016774a37fe83d57f18a71ab271bc6f77ba6a13e

See more details on using hashes here.

File details

Details for the file promplate_pyodide-0.0.3.4-py3-none-any.whl.

File metadata

File hashes

Hashes for promplate_pyodide-0.0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2469dea57539171f808c8f6c6e5ce0ce05b559297996c3de2916675f6b2f9e2c
MD5 3350f13cc415a53ec8170977cee974fd
BLAKE2b-256 6e0a5882474583741fca733bb92162ce64ac70bfa12585bc430c6a13f3b98fdb

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