Browse Source

Update open_ai_image.py

master
Haikui Yang GitHub 11 months ago
parent
commit
76a95c0226
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      bot/openai/open_ai_image.py

+ 1
- 0
bot/openai/open_ai_image.py View File

@@ -12,6 +12,7 @@ from config import conf
class OpenAIImage(object): class OpenAIImage(object):
def __init__(self): def __init__(self):
openai.api_key = conf().get("open_ai_api_key") openai.api_key = conf().get("open_ai_api_key")
openai.api_base = conf().get("open_ai_api_base")
if conf().get("rate_limit_dalle"): if conf().get("rate_limit_dalle"):
self.tb4dalle = TokenBucket(conf().get("rate_limit_dalle", 50)) self.tb4dalle = TokenBucket(conf().get("rate_limit_dalle", 50))




Loading…
Cancel
Save