Skip to content

Commit

Permalink
fix: api base bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhayujie committed Jan 17, 2024
1 parent 11f6e98 commit eae95df
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions bot/openai/open_ai_image.py
Expand Up @@ -12,7 +12,6 @@
class OpenAIImage(object):
def __init__(self):
openai.api_key = conf().get("open_ai_api_key")
openai.api_base = conf().get("open_ai_api_base")
if conf().get("rate_limit_dalle"):
self.tb4dalle = TokenBucket(conf().get("rate_limit_dalle", 50))

Expand All @@ -23,7 +22,6 @@ def create_img(self, query, retry_count=0, api_key=None, api_base=None):
logger.info("[OPEN_AI] image_query={}".format(query))
response = openai.Image.create(
api_key=api_key,
api_base=api_base,
prompt=query, # 图片描述
n=1, # 每次生成图片的数量
model=conf().get("text_to_image") or "dall-e-2",
Expand Down

0 comments on commit eae95df

Please sign in to comment.