Skip to main content

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.

Metadata

Release files for concrete-operators 0.1.11

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

Source distribution (sdist)

Source distribution for concrete-operators 0.1.11
File Size Uploaded Provenance Actions
concrete_operators-0.1.11.tar.gz 31.4 kB Without provenance Details for concrete_operators-0.1.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for concrete-operators 0.1.11
File Interpreter ABI Platform Actions
concrete_operators-0.1.11-py3-none-any.whl Python 3 none any Details for concrete_operators-0.1.11-py3-none-any.whl

Total release size: 67.0 kB

Release files / concrete_operators-0.1.11.tar.gz

Download URL concrete_operators-0.1.11.tar.gz
Size 31.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2e7accc8edec57b497417c165d2b5b27dee3a2334e017e61a4936a9ae9fb3743
BLAKE2b-256 checksum
How to use checksums
43f45379af342879433dd6fee96ccc117842da8ad67e318687ca5bd9cd42245c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.6 Darwin/23.4.0

Release files / concrete_operators-0.1.11-py3-none-any.whl

Download URL concrete_operators-0.1.11-py3-none-any.whl
Size 35.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25c6e4ce38fa281214ec82d352fdf851138da303478c3eff4615109b2093cf00
BLAKE2b-256 checksum
How to use checksums
63d7af28758875f0239555e4ec9726c52a6757ffdc72f7c6de3896752bbd1c31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.6 Darwin/23.4.0

Security for concrete-operators 0.1.11

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