Can't use finetuned gpt-35-turbo-1106 model for chat completion with latest version of SDK

Is it expected that we can’t use a finetuned gpt-35-turbo-1106 model with the newest version of openai SDK? For example, when I run this:

from openai import OpenAI

client = OpenAI()

stream = client.chat.completions.create(
    model="finetuned_gpt-35-turbo-1106.",
    messages=[{"role": "user", "content": "Say this is a test"}],
    stream=True,
)

I get this error:
openai.BadRequestError: Error code: 400 - {‘error’: {‘code’: ‘OperationNotSupported’, ‘message’: 'The completion operation does not work with the specified model. Please choose different model and try again. You can learn more about which models can be used with each operation here:

1 Like

I assume what you put in is complete fabrication of a model number just for the sake of the forum, including a period in the name that doesn’t belong.

It also hints that you are using Azure or got the example from there. Where you should verify the model name is a deployed fine-tune model and give it a unique deployment id for identification.

Fine-tune models on OpenAI are formatted like:

ft:gpt-3.5-turbo-1106:my_org::KKJJLLMm

ChatCompletionChunk(id='chatcmpl-1234567890', choices=[Choice(delta=ChoiceDelta(content=' is', function_call=None, role=None, tool_calls=None), finish_reason=None, index=0, logprobs=None)], created=1708740058, model='ft:gpt-3.5-turbo-1106:my_org::KKJJLLMm', object='chat.completion.chunk', system_fingerprint='fp_811d5fcad5')
ChatCompletionChunk(id='chatcmpl-1234567890', choices=[Choice(delta=ChoiceDelta(content=' a', function_call=None, role=None, tool_calls=None), finish_reason=None, index=0, logprobs=None)], created=1708740058, model='ft:gpt-3.5-turbo-1106:my_org::KKJJLLMm', object='chat.completion.chunk', system_fingerprint='fp_811d5fcad5')
ChatCompletionChunk(id='chatcmpl-1234567890', choices=[Choice(delta=ChoiceDelta(content=' test', function_call=None, role=None, tool_calls=None), finish_reason=None, index=0, logprobs=None)], created=1708740058, model='ft:gpt-3.5-turbo-1106:my_org::KKJJLLMm', object='chat.completion.chunk', system_fingerprint='fp_811d5fcad5')
ChatCompletionChunk(id='chatcmpl-1234567890', choices=[Choice(delta=ChoiceDelta(content=None, function_call=None, role=None, tool_calls=None), finish_reason='stop', index=0, logprobs=None)], created=1708740058, model='ft:gpt-3.5-turbo-1106:my_org::KKJJLLMm', object='chat.completion.chunk', system_fingerprint='fp_811d5fcad5')

Works fine.