Browse Source

add openai_proxy to AiTranslateService

visuddhinanda 9 months ago
parent
commit
b766c2ef80
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ai-translate/ai_translate/worker.py

+ 1 - 1
ai-translate/ai_translate/worker.py

@@ -12,7 +12,7 @@ def handle_message(redis, ch, method, id, content_type, body, api_url: str,opena
     try:
     try:
         logger.info("process message start (%s) messages", len(body.payload))
         logger.info("process message start (%s) messages", len(body.payload))
         consumer = AiTranslateService(
         consumer = AiTranslateService(
-            redis, ch, method, api_url, customer_timeout)
+            redis, ch, method, api_url,openai_proxy, customer_timeout)
         messages = ns_to_dataclass([body], Message)
         messages = ns_to_dataclass([body], Message)
         consumer.process_translate(id, messages[0])
         consumer.process_translate(id, messages[0])
         ch.basic_ack(delivery_tag=method.delivery_tag)  # 确认消息
         ch.basic_ack(delivery_tag=method.delivery_tag)  # 确认消息