Skip to content

mayahq/mayalabs-sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maya Labs : Program machines using natural language.


The Maya Labs Python SDK provides easy async access to our PAC-1 program synthesis engine, with a CLI to instruct and generate programs from instructions in natural language.

Installation

pip install --upgrade mayalabs

Preview

demo.webm

Usage

Get the Maya Labs API key from the Settings > Developer section.

export MAYA_API_KEY = "mayakey-..."

Or set mayalabs.api_key to its value:

import mayalabs

mayalabs.api_key = "mayakey-..."

script = """
1. trigger on receive
2. research {{term}} on wikipedia
3. extract 'title' and 'summary' from tabular data
4. send response back
"""

function = mayalabs.Function(name="Scrape2")
# Creating new worker...

function.update(script=script)
# Generating program graph...
# Starting worker...
# Installing dependencies...
# Deployed!

output = function.call({"term": "Dr. Vikram Sarabhai"})
print(output)
# finds and outputs title and summary from wikipedia results

PAC-1 takes in steps written in English, writes & assembles a discrete program graph, and deploys ready-to-use software on our compute infrastructure, that you can call within your code. You can set up missing dependencies / visualize the flow of logic by following the link to flow-based editor it provides after deployment.

Check our documentation for more usage and tutorials.

Use Cases

Command Line Usage

Today, script need to be manually written step-by-step, but we are offering early WIP preview of iterative script generation via our CLI. Try running:

$ mayalabs instruct -c 'fetch Name and Email from gsheet, write function to merge all columns, and return data'

And then use the generated script as function.

vid.mp4

Requirements

  • Python 3.7.1+

Issues

All feedback and bug reports welcome! Report in the issues section, or mail us at humans@mayalabs.io.

Roadmap

  • Cleaner logs and exception handling
  • Dependency configuration UX improvement
  • Import skill repositories for reusing skills created by user or present in store
  • Create and call downstream auto-deployed functions
  • Allow multi-profile and team profile access

About

The Maya python SDK for running and deploying natural language scripts.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages