Skip to content

Commit

Permalink
fix(azure_dalle): use openai.api_base
Browse files Browse the repository at this point in the history
  • Loading branch information
lanvent committed Apr 28, 2023
1 parent 6b4dc37 commit b0a401a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bot/chatgpt/chat_gpt_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,8 @@ def __init__(self):
self.args["deployment_id"] = conf().get("azure_deployment_id")

def create_img(self, query, retry_count=0, api_key=None):
api_base = "https://a-wxf.openai.azure.com/"
api_version = "2022-08-03-preview"
url = "{}dalle/text-to-image?api-version={}".format(api_base, api_version)
url = "{}dalle/text-to-image?api-version={}".format(openai.api_base, api_version)
api_key = api_key or openai.api_key
headers = {"api-key": api_key, "Content-Type": "application/json"}
try:
Expand Down

0 comments on commit b0a401a

Please sign in to comment.