ritual/projects/gpt4/contracts
2024-06-06 13:18:48 -04:00
..
.github/workflows feat: publishing infernet-container-starter v0.2.0 2024-03-29 10:50:13 -04:00
lib infernet-1.0.0 update 2024-06-06 13:18:48 -04:00
script infernet-1.0.0 update 2024-06-06 13:18:48 -04:00
src infernet-1.0.0 update 2024-06-06 13:18:48 -04:00
.gitignore feat: publishing infernet-container-starter v0.2.0 2024-03-29 10:50:13 -04:00
foundry.toml feat: publishing infernet-container-starter v0.2.0 2024-03-29 10:50:13 -04:00
Makefile feat: publishing infernet-container-starter v0.2.0 2024-03-29 10:50:13 -04:00
README.md feat: publishing infernet-container-starter v0.2.0 2024-03-29 10:50:13 -04:00
remappings.txt feat: publishing infernet-container-starter v0.2.0 2024-03-29 10:50:13 -04:00

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?"