Skip to main content

A client facing API for interacting with the WeCo AI function builder service.

Project description

WeCo AI Typing SVG

Python License

$f$(👷‍♂️)

Open In Colab Open in Studio

A client facing API for interacting with the WeCo AI function builder service!

Use this API to build complex systems fast. We lower the barrier of entry to software engineer, data science and machine learning by providing an interface to prototype difficult solutions quickly in just a few lines of code.

Installation

Install the weco package simply by calling this in your terminal of choice:

pip install weco

Features

  • Synchronous & Asynchronous client.
  • Batch API
  • Multimodality (Language & Vision)
  • Interpretability (view the reasoning behind outputs)

What We Offer

  • The build function enables quick and easy prototyping of new functions via LLMs through just natural language. We encourage users to do this through our web console for maximum control and ease of use, however, you can also do this through our API as shown in here.
  • The query function allows you to test and use the newly created function in your own code.

We provide both services in two ways:

  • weco.WecoAI client to be used when you want to maintain the same client service across a portion of code. This is better for dense service usage.
  • weco.query and weco.build to be used when you only require sparse usage.

Usage

When using the WeCo API, you will need to set the API key: You can find/setup your API key here by navigating to the API key tab. Once you have your API key, you may pass it to the weco client using the api_key argument input or set it as an environment variable such as:

export WECO_API_KEY=<YOUR_WECO_API_KEY>

Example

We create a function on the web console for the following task:

"Analyze a business idea and provide a structured evaluation. Output a JSON with 'viability_score' (0-100), 'strengths' (list), 'weaknesses' (list), and 'next_steps' (list)."

Now, you're ready to query this function anywhere in your code!

from weco import query
response = query(
    fn_name="BusinessIdeaAnalyzer-XYZ123",  # Replace with your actual function name
    text_input="A subscription service for personalized, AI-generated bedtime stories for children."
)

For more examples and an advanced user guide, check out our function builder cookbook.

Happy building $f$(👷‍♂️)!

Contributing

We value your contributions! If you believe you can help to improve our package enabling people to build AI with AI, please contribute!

Use the following steps as a guideline to help you make contributions:

  1. Download and install package from source:

    git clone https://github.com/WecoAI/weco-python.git
    cd weco-python
    pip install -e ".[dev]"
    
  2. Create a new branch for your feature or bugfix:

    git checkout -b feature/your-feature-name
    
  3. Make your changes and run tests to ensure everything is working:

    Tests can be expensive to run as they make LLM requests with the API key being used so it is the developers best interests to write small and simple tests that adds coverage for a large portion of the package.

    pytest -n auto tests
    
  4. Commit and push your changes, then open a PR for us to view 😁

Please ensure your code follows our style guidelines (Numpy docstrings) and includes appropriate tests. We appreciate your contributions!

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

weco-0.1.10.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

weco-0.1.10-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file weco-0.1.10.tar.gz.

File metadata

  • Download URL: weco-0.1.10.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for weco-0.1.10.tar.gz
Algorithm Hash digest
SHA256 8b38e193b607cef073bf2097d51661a24e3ad3f964ebc06aa63a4fa2a44ed841
MD5 10d771eca8f54aaef3f664c9e5acb122
BLAKE2b-256 9f4a8beedd85228626369c21ec8d32a1b6ec8ca019c12537605a99cbe2ef60f0

See more details on using hashes here.

File details

Details for the file weco-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: weco-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for weco-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 0722159117adc5574221300a810b1d986111d354b2c0713dc4a2e904d69b37f7
MD5 575fde3c3d714aaffff85cde287e583a
BLAKE2b-256 7b2f9cf4b403a436c7070455942aa1eaa336af8329bd76fb63ace1f814bf7c76

See more details on using hashes here.

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