openai-openapi icon indicating copy to clipboard operation
openai-openapi copied to clipboard

OpenAIFile: status_details is a string

Open gehrisandro opened this issue 2 years ago • 0 comments

Hi there

According to the API documentation the status_details of a file must be an object or null. But I never receive an object there but we ran into the issue that it returns a string. This happens if we upload a (very long) jsonl file with a syntax error in it and then hit the FineTunes Create endpoint.

Here is the response I got:

{
  "object": "fine-tune",
  "id": "ft-kSsak20Ml0faDIpmvbTvmKEP",
  "hyperparams": {
    "n_epochs": 4,
    "batch_size": null,
    "prompt_loss_weight": 0.01,
    "learning_rate_multiplier": null
  },
  "organization_id": "org-****",
  "model": "curie",
  "training_files": [
    {
      "object": "file",
      "id": "file-OGHjVIyNB7svNc6vaUXNgR87",
      "purpose": "fine-tune",
      "filename": "MyFile_corrupt.jsonl",
      "bytes": 181023,
      "created_at": 1678253244,
      "status": "error",
      "status_details": "Invalid file format. Example 1273 cannot be parsed. Error: line contains invalid json: Expecting ',' delimiter: line 1 column 79 (char 78) (line 1273)"
    }
  ],
  "validation_files": [],
  "result_files": [],
  "created_at": 1678254001,
  "updated_at": 1678254001,
  "status": "pending",
  "fine_tuned_model": null,
  "events": [
    {
      "object": "fine-tune-event",
      "level": "info",
      "message": "Created fine-tune: ft-kSsak20Ml0faDIpmvbTvmKEP",
      "created_at": 1678254001
    }
  ]
}

Can you help us to understand what return types we can expect there?

Thank you in advance!

Sandro

gehrisandro avatar Mar 08 '23 05:03 gehrisandro