Skip to content

Commit

Permalink
Merge pull request AntonOsika#817 from mfeyx/feat-azure-api-version
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoMcCabe authored Oct 23, 2023
2 parents fb8b6ca + fe62af7 commit 2e16286
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gpt_engineer/core/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import json
import logging
import os

from dataclasses import dataclass
from typing import List, Optional, Union
Expand Down Expand Up @@ -506,7 +507,7 @@ def _create_chat_model(self) -> BaseChatModel:
if self.azure_endpoint:
return AzureChatOpenAI(
openai_api_base=self.azure_endpoint,
openai_api_version="2023-05-15", # might need to be flexible in the future
openai_api_version=os.getenv("OPENAI_API_VERSION", "2023-05-15"),
deployment_name=self.model_name,
openai_api_type="azure",
streaming=True,
Expand Down

0 comments on commit 2e16286

Please sign in to comment.