This val is a proxy server that interacts with the OpenAI API to generate responses based on prompts in the request body. The function handles incoming HTTP POST requests, processes the prompt, and returns a response generated by the LLM.
The primary endpoint for this function is designed to handle HTTP POST requests.
prompt field (e.g. {"prompt": "Help me make a boat."})curl -X POST https://ashryanio-openaiproxy.web.val.run -H "Content-Type: application/json" -d '{"prompt": "Hello, OpenAI!"}'
{ "llmResponse": "Hi there! How can I assist you today?" }
prompt field is missing in the request body.