Browse Source

fix kimi task

luojunhui 5 months ago
parent
commit
6e86964fe7
2 changed files with 2 additions and 2 deletions
  1. 1 1
      applications/functions/kimi.py
  2. 1 1
      tasks/newContentIdTask.py

+ 1 - 1
applications/functions/kimi.py

@@ -205,7 +205,7 @@ class KimiServer(object):
             ],
             model="moonshot-v1-32k",
         )
-        response = chat_completion.choices[0].message.content.replace('```json', '').replace('```', '')
+        response = chat_completion.choices[0].message.content.replace('```json', '').replace('```', '').replace('“', '"').replace('”', '"')
         try:
             response = json.loads(response)
             return response

+ 1 - 1
tasks/newContentIdTask.py

@@ -810,7 +810,7 @@ class NewContentIdTask(object):
             print(process_list)
             a = time.time()
             print("开始处理,一共{}个任务".format(total_task))
-            tasks = [self.process_task(params) for params in process_list]
+            tasks = [self.process_task(params) for params in process_list[:1]]
             await asyncio.gather(*tasks)
             b = time.time()
             print("处理时间: {} s".format(b - a))