Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 989 Bytes

wtf.md

File metadata and controls

25 lines (18 loc) · 989 Bytes

About

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

Contract

Prerequisites

  • EXM SDK
npm i -g @execution-machine/sdk

Iteracting with the contract

Example

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