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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file promplate_pyodide-0.0.3a4.tar.gz
.
File metadata
- Download URL: promplate_pyodide-0.0.3a4.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.12.4 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02842aeb158af7b8cead59594efd8e90d7f38095fc17132bb9b703325f9f19c5 |
|
MD5 | 64e2682aa792d9a65b1d237771a8bfb0 |
|
BLAKE2b-256 | 4af9216cd3ef6466447a804f44fb3680384af66994afc4ff15167fff661bc39e |
File details
Details for the file promplate_pyodide-0.0.3a4-py3-none-any.whl
.
File metadata
- Download URL: promplate_pyodide-0.0.3a4-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.12.4 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00c54ec832a50bd0e615ca52170a313841db4695115bd2226f88550f18fef452 |
|
MD5 | 270e0ec63307fe64a32a4efa63d50fd9 |
|
BLAKE2b-256 | 5ac7419f031a3d7974ec3d37f64bbadbc0f3bbaead21c0607f1d07301c95a42e |