Pamela Fox

Results 814 comments of Pamela Fox

By the way, I don't think OpenAI is actually cheaper than Azure OpenAI, and Azure OpenAI no longer requires a form, so it might be just as easy to use...

Closing as I don't think we've run into this issue recently, and we didn't find a root cause.

We currently have a token limit of 1024: response_token_limit = 1024 messages = build_messages( model=self.chatgpt_model, system_prompt=rendered_answer_prompt.system_content, past_messages=rendered_answer_prompt.past_messages, new_user_content=rendered_answer_prompt.new_user_content, max_tokens=self.chatgpt_token_limit - response_token_limit, fallback_to_default=self.ALLOW_NON_GPT_MODELS, ) You can increase the token limit there...

Here's an example of how I would use keyless auth with Azure with the openai package, by the way: https://github.com/pamelafox/python-openai-demos/blob/c7de0ec332cab9340ff1bf327efceebdec2f6364/chat.py#L16 client = openai.AzureOpenAI( api_version=os.getenv("AZURE_OPENAI_VERSION"), azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"), azure_ad_token_provider=token_provider, )