题意:OpenAI API 错误:‘提供了无法识别的请求参数’
问题背景:
I'm receiving an error when calling the OpenAI API. It's not recognizing file
argument, which I submitted to the API.
我在调用 OpenAI API 时遇到错误。API 不识别我提交的 file
参数。
Here is my PHP code: 这是我的 PHP 代码
<?php
// Define your OpenAI API key and the endpoint
$apiKey = 'sk-TOh**********************************';
$endpoint = 'https://api.openai.com/v1/engines/davinci/completions';
// File ID of the uploaded data
$fileId = 'file-FlW6jPfNuuq1lTak91AjMj2j';
// Product name
$productName = '6 pack fresh grannies apples';
// Prompt to use the file ID as a reference
$prompt = "Given the following