如何使用cloudflare的worker搭建Azure OpenAI的api代理?
网友回复
azure openai的restfull curl api请求如下:
POST https://{endpoint}/openai/deployments/{deployment-id}/completions?api-version=2024-06-01 { "prompt": [ "tell me a joke about mango" ], "max_tokens": 32, "temperature": 1.0, "n": 1 }响应
{ "body": { "id": "cmpl-7QmVI15qgYVllxK0FtxVGG6ywfzaq", "created": 1686617332, "choices": [ { "text": "es\n\nWhat do you call a mango who's in charge?\n\nThe head mango.", "index...
点击查看剩余70%