0

I upload a file to create a job with official API:

$fineTuned  = $client->fineTuning()->createJob([
    'training_file' => 'file-bdj...W2',
    'validation_file' => null,
    'model' => 'gpt-3.5-turbo',
    'suffix' => null,
]);

resulting in error:

OpenAI\Exceptions\ErrorException

File file-bdj...W2 has invalid purpose 'fine-tune-results', must be 'fine-tune'

Fatal error: Uncaught OpenAI\Exceptions\ErrorException: File file-bdj...W2 has invalid purpose 'fine-tune-results', must be 'fine-tune' in /.../vendor/openai-php/client/src/Transporters/HttpTransporter.php:131
Stack trace:
#0 /.../vendor/openai-php/client/src/Transporters/HttpTransporter.php(57):
OpenAI\Transporters\HttpTransporter->throwIfJsonError(Array, '{\n "error": {\n...')
#1 /.../vendor/openai-php/client/src/Resources/FineTuning.php(32): OpenAI\Transporters\HttpTransporter->requestObject(Object(OpenAI\ValueObjects\Transporter\Payload))
#2 /.../test.php(15): OpenAI\Resources\FineTuning->createJob(Array) #3 {main} thrown in /.../vendor/openai-php/client/src/Transporters/HttpTransporter.php on line 131

I tried using the api docs.

hakre
  • 193,403
  • 52
  • 435
  • 836
IceIceIce
  • 1
  • 1
  • What is your understanding of the error message? What puzzles you with it? Please share your current understanding even you're facing the error. This is so that you can get better feedback, without your own understanding, the question remains more vague. And welcome back to Stack Overflow (SO). /Edit: And you write you used the API docs, it's not bad to leave a reference (link) which one in concrete. `$client` is undefined in your script, we can only guess what it is, but we don't do that. [edit] your question to improve it. – hakre Aug 31 '23 at 15:43

0 Answers0