Skip to content

DefangSamples/sample-python-openai-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python & Flask & OpenAI

1-click-deploy

Setup

This sample requires an API key to access the OpenAI API. The name of the config value is referenced in the compose.yaml file. To provide a value for it, you can use the Defang CLI like this:

defang config set --name OPENAI_KEY

and then enter the value when prompted.

Testing

echo "Hello" | curl -H "Content-Type: application/text" -d @- https://xxxxxxxx/prompt

or

cat prompt.txt | curl -H "Content-Type: application/text" -d @- https://xxxxxxxx/prompt

Title: Python & Flask & OpenAI

Short Description: An app that demonstrates how to use the OpenAI API with Python and Flask.

Tags: Python, Flask, OpenAI, AI, Python

Languages: python

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6