Skip to main content

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

Note: First you need to install Extism on your machine if you have not:

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

Uploaded Source

Built Distribution

extism_func_gen-0.4.0-py3-none-any.whl (351.4 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