This change aligns the behavior of TypeChat for Python with that of its TypeScript counterpart with respect to Azure OpenAI usage.
While TypeChat for TypeScript simply accepted the fully-formed endpoint URL for chat completions as documented here, the openai package made it so that individual components of that URL had to be threaded through piecemeal (i.e. the deployment name, the model name, the version number, and the API key). What that meant was (at least as far as I could tell), the logic didn't work for Azure OpenAI.
This PR makes it so that TypeChat only cares about the API key and the fully formed URL being placed in your .env file:
This change aligns the behavior of TypeChat for Python with that of its TypeScript counterpart with respect to Azure OpenAI usage.
While TypeChat for TypeScript simply accepted the fully-formed endpoint URL for chat completions as documented here, the
openai
package made it so that individual components of that URL had to be threaded through piecemeal (i.e. the deployment name, the model name, the version number, and the API key). What that meant was (at least as far as I could tell), the logic didn't work for Azure OpenAI.This PR makes it so that TypeChat only cares about the API key and the fully formed URL being placed in your
.env
file: