Can't upload file through API

Zandarashvili, Levani 0 Reputation points
2024-11-21T20:13:43.6+00:00

I'm trying to upload files to Azure for fine-tuning, but I'm getting resource not available error.
I know that the client I creates is fine, because I tested it with the chat option. For example, if I run the following using my client:

client.chat.completions.create(
    messages=[{"content": "What is the weather like today?", "role": "user"}], model="gpt-4o"
)

It will work fine, but when I try to run a command to upload a file:

client.files.create(file=open("messages/train_messages.jsonl", "rb"), purpose="fine-tune")

It gives me an error: NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,306 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.