This example contract demonstrates how to integrates the gpt3
atom from ai
molecule in order to interact with openAI's GPT-3 from an EXM smart contract.
OpenAI documentation and usage: https://beta.openai.com/docs/guides
- Live deployment: E2DKhSpqaeVfksg-YfWmrR4ZI667X58ndTJzjyikXIc
- source code: ./contract.js
- EXM SDK
npm i -g @execution-machine/sdk
exm function:write $CONTRACT_ID --input '{"function": "generate-text", "prompt": "$BASE64URL_ENCODED_PROMPT", "model": "text-davinci-003", "max_tokens": 20, "temperature": 0.4}' --token EXM_TOKEN_ID