Open aslisabanci opened 1 year ago
Try guidance.llms.AzureOpenAI(…)
Try
guidance.llms.AzureOpenAI(…)
@TomTom101 thanks for trying to help - but that throws the following exception
Exception has occurred: NotImplementedError
The AzureOpenAI class has been merged with the OpenAI class for Azure usage. Please use the OpenAI class instead: https://guidance.readthedocs.io/en/latest/example_notebooks/api_examples/llms/OpenAI.html
NotImplementedError: The AzureOpenAI class has been merged with the OpenAI class for Azure usage. Please use the OpenAI class instead: https://guidance.readthedocs.io/en/latest/example_notebooks/api_examples/llms/OpenAI.html
In addition, I'm able to use other model deployments from Azure (like text-davinci-003
) successfully with guidance using the same constructor. So the issue seems to be specific to using functions with gpt-3.5-turbo-0613
. Azure OpenAI Services made function calling available with their 2023-07-01-preview
so I'm guessing that the incompatibility is rooted in there.
Sorry, by bad! I am on an older version still.
Are there any updates on this?
@seanbenhur Unfortunately no. The latest release came out in June 20 btw. So, it's been a while this library is not getting attention.
It seems like the same error as #372. It seems that it is not limited to Azure.
It seems like the same error as #372. It seems that it is not limited to Azure.
@Keiku The problem you're having could be because you're swapping the model with a chat based model (like gpt3.5 or gpt4), i.e. not with a text completion model (like text-davinci). Since chat models are trained with tokens that mark out roles in the prompt, your guidance program should be prompting the model accordingly when you're using chat based ones.
@aslisabanci Sorry. Do you know how to actually change the code? I couldn't understand your abstract answer.
This PR should solve the issue
The bug Using guidance with gpt-3.5-turbo-0613 from Azure OpenAI does not work. Hope I'm missing a silly thing :)
To Reproduce The following code executes fine when using the
gpt-3.5-turbo-0613
model from OpenAI but not from an Azure deployment.System info (please complete the following information):
guidance.__version__
): 0.0.64Here is the full trace: