ritual/projects/gpt4/contracts/README.md

839 B

GPT4 Example Contracts

This is a minimalist foundry project that implements a callback consumer that makes a prompt to the container, which then makes a call to OpenAI's GPT4. For an end-to-end flow of how this works, follow the guide here.

Deploying

The Deploy.s.sol deploys the contracts. The Makefile in this project containes a utility deploy target.

make deploy

Prompting

The CallContract.s.sol calls the promptGPT function. The Makefile in this project contains a utility call target. You'll need to pass in the prompt as an env var.

make call-contract prompt="What is 2 * 3?"