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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extism_func_gen-0.4.0-py3-none-any.whl (351.4 kB view details)

Uploaded Python 3

File details

Details for the file extism_func_gen-0.4.0.tar.gz.

File metadata

  • Download URL: extism_func_gen-0.4.0.tar.gz
  • Upload date:
  • Size: 349.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.1.0

File hashes

Hashes for extism_func_gen-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3e07f7d1a45dca183c7655f47ab0e4800f819d641cacc801a67267befc190eab
MD5 38aaa584368fcc7b8b8a3134ae04c8d1
BLAKE2b-256 488daf1c9b4ad095fc7b4b0d6e8d1035255201b93517e02ab80a75104608e02f

See more details on using hashes here.

File details

Details for the file extism_func_gen-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: extism_func_gen-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 351.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.1.0

File hashes

Hashes for extism_func_gen-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa5df151a5bb5266d914631adc5cdfb47a39a1dd38267dd4140e49625e7418e1
MD5 635c816e9357dbdf80d6dad8c3bf2267
BLAKE2b-256 25f99dc15f4df99e27fe1b7eaec68f8e07181422f4a1622234ce4ca617b49d4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page