No project description provided
Project description
func-gen
func-gen can be used to generate unix text processing utilities from English text. It uses langchain to create javascript functions to process text, and it uses Extism and the JavaScript PDK to safely execute the code in a Wasm sandbox.
Install
pip install --upgrade extism-func-gen
Run
# Need to set the OpenAI API key
export OPENAI_API_KEY="sk-<paste-key-here>"
# Create a func
func-gen count_vowels -d "Write a function that counts the number of vowels in an input string"
# Use a func
echo "hello world" | func-gen count_vowels
# 3
# List the funcs
func-gen --list
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
extism_func_gen-0.3.0.tar.gz
(349.6 kB
view hashes)
Built Distribution
Close
Hashes for extism_func_gen-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76f02ac71517a0d9932aedb9b095baf53f895adeb01275039e81e3f9aeec2f96 |
|
MD5 | bd1c77f8f61c906e7ecc5f7e6427c472 |
|
BLAKE2b-256 | 8c644b1152e891a2d61eb2364b2a72237bd699b88e22a1f5530c2badcd44f92e |