To set up the environment variable for the OpenAI API key in a .env file, you should add the following line to the file:
OPENAI_API_KEY=sk-xxxxxxx
Replace sk-xxxxxxx with your actual API key.
Execute the following bash command:
./tutorial.sh build
./tutorial.sh start
import funcs
result = funcs.chat('hello!')
print(result)
result = funcs.image2text('./data/image01.jpg', prompt='What’s in this image?')
print(result)
funcs.text2image('a putty cat', filename='cat.jpg')