Skip to main content

Action Collective

A framework for dynamic action generation and reuse with LLMs.

Installation

pip install action-collective

Quick Start

from action_collective import ActionClient

client = ActionClient(
    openai_api_key=os.getenv("OPENAI_API_KEY"),
    backend_url=os.getenv("BACKEND_URL", "http://70.179.0.242:11000"),
    verbose=True,
)
prompt = """Please perform the matrix multiplication of A x B and return the result, here are the variables:
A = [[1, 2, 3, 4, 5],
        [6, 7, 7, 9, 10],
        [11, 12, 13, 14, 15],
        [16, 17, 7, 19, 20],
        [21, 22, 23, 24, 25]]
B = [[1, 2, 3, 4, 5],
        [6, 7, 8, 9, 10],
        [11, 12, 7, 14, 15],
        [16, 17, 18, 19, 20],
        [21, 22, 23, 24, 25]]"""

chat_history = [{"role": "user", "content": prompt}]

result = await client.execute(chat_history=chat_history)
print("\n\nresult:\n", json.dumps(result, indent=4), "\n\n")
matrix = [
    [215, 230, 227, 260, 275],
    [479, 518, 515, 596, 635],
    [765, 830, 817, 960, 1025],
    [919, 998, 1035, 1156, 1235],
    [1315, 1430, 1407, 1660, 1775],
]
# validate that each of the number inside matrix exist in the result string
assert result is not None
for row in matrix:
    for number in row:
        assert str(number) in result[-1]["content"]
print("\n\nPASSED\n\n")

Features

  • Dynamic action generation
  • Action reuse through vector similarity
  • Automatic validation and testing
  • Easy integration with OpenAI models

Documentation

For full documentation, visit our GitHub repository.

Metadata

Release files for action-collective 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for action-collective 0.0.4
File Size Uploaded Provenance Actions
action_collective-0.0.4.tar.gz 6.0 kB Without provenance Details for action_collective-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for action-collective 0.0.4
File Interpreter ABI Platform Actions
action_collective-0.0.4-py3-none-any.whl Python 3 none any Details for action_collective-0.0.4-py3-none-any.whl

Total release size: 13.8 kB

Release files / action_collective-0.0.4.tar.gz

Download URL action_collective-0.0.4.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6263a4e216fddbb11d2787faa7aca362677938c2e9da7c35bedd08be376eb640
BLAKE2b-256 checksum
How to use checksums
4ec4174b35114e527d31343e58fb36ea93f1054a21ea36ffa72925f5cca05e2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.9.0 Windows/10

Release files / action_collective-0.0.4-py3-none-any.whl

Download URL action_collective-0.0.4-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c608974cb514a451c3ac7940fd5304b49b6675b8dc68f05f22bf58f130884608
BLAKE2b-256 checksum
How to use checksums
e09207dfc14adc5596f882d50d5e27b6c07047f97232d4270095865fbbe47bb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.9.0 Windows/10

Security for action-collective 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page