We followed the below steps when we tried to use rest api’s for c# in open ai and it is throwing error. Please suggest.
-
Add file: Added file to open ai using open api v1 files and it returned the file id in response
-
Created a assistant using open api v1 assistants and it returned assistant id in response
-
Created a thread using open api v1 threads and got error.
Below is the input that we gave in c#
var array = new
{
new
{
role = “user”,
content = create_a_thread_content,
attachments = new
{
new
{
file_id = fileId,
tools = new
{
new { type = “file_search” }
}
}
}
}
};
string json = JsonConvert.SerializeObject(array, Formatting.Indented);
object data = new { messages= array };
Response:
{
“error”: {
“message”: "Files with extensions [none] are not supported for retrieval.
“type”: “invalid_request_error”,
“param”: null,
“code”: “unsupported_file”
}
}