An Unoffitial Api For Model gpt-3.5-turbo-0613
pranavkdileep: write a mardown doc for /generate end point
GitHub Copilot: # /generate
Endpoint
The /generate
endpoint is a POST request that generates content based on a provided prompt.
POST
/generate
Content-Type: application/json
The body of the request should be a JSON object with a single key-value pair. The key should be "prompt" and the value should be a string that you want to generate content for.
Example:
{
"prompt": "What is the meaning of life?"
}
200 OK
The body of the response will be a string of generated content based on the provided prompt.
curl -X POST -H "Content-Type: application/json" -d '{"prompt":"What is the meaning of life?"}' http://localhost:3000/generate
{
"content": "The meaning of life is a philosophical question concerning the purpose and significance of life or existence in general. This concept has been approached by many different perspectives including philosophy, religion, and science. The meaning of life as perceived by an individual can also be influenced by cultural, societal, and personal beliefs."
}