AI Agent Orchestration Platform
Project description
Concrete
Installation
pip install concrete-operators
Quickstart
export OPENAI_API_KEY=<your-api-key-here>
python -m concrete prompt "Create a simple program that says 'Hello, World!'"
Dev Setup
Run the following commands to get your local environment setup
brew install poetry
poetry install
poetry shell
pre-commit install
Pre-commit will check for code formatting before completing the commit. If code is formatted by black, you will need to add the changes files to staged and re-try the commit. Flake8 generally have to be handled manually.
To force a commit locally add the flag --no-verify
as an option to git commit
e.g. git commit --no-verify -m "..."
. Github workflows should mirror local pre commit checks. After a --no-verify, you should run a pre-commit run --all-files
to ensure that the code is formatted correctly before commiting, as pre-commit checks will not run on unchanged files.
Celery Information
To run the celery worker, run make celery
. This command will also start rabbitmq, the message broker. You can also manually start the message broker by running make rabbitmq
make helloworld_celery
will run a simple celery task to test that everything is running correcetly.
To run operator methods through celery, run operator.foo.delay(kwargs).get()
.
from concrete import clients, operators
c = {'openai': clients.OpenAIClient(temperature=0)}
message="How moral is world domination if you're good"
resp: ConcreteChatCompletion = operators.Operator(c).chat.delay(message=message).get()
print(resp.text)
# print(resp.message.text) # also works
It is important that arguments are keyword arguments. This returns a ConcreteChatCompletion object. message_format has been added to this object to allow for client-side validation into a message format via ConcreteChatCompletion.message
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for concrete_operators-0.1.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f90454445c1fe725a6495ed7d4db744964668820c3af6b8e657bbe5b523f16e |
|
MD5 | 28965a7ba11bb2f43872fac76518b10c |
|
BLAKE2b-256 | 3e137478e5aa705c623dec12f202396e33583278d8c8586d3bdc72cbd1bd1d70 |
Hashes for concrete_operators-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65a719c9ece0289cebd910a513975ef6c28980031a4492dc5b34565188e69222 |
|
MD5 | 91727d0a0d314108cf960b1e1fb384ac |
|
BLAKE2b-256 | 1330ba2da431b9b2d664602ad6670a953bcfb3a87cac369294b2e42290d21846 |