Parcourir la source

rank---微信体系内只要有返回则选择微信体系内视频

罗俊辉 il y a 1 an
Parent
commit
6cbcefa412
1 fichiers modifiés avec 1 ajouts et 5 suppressions
  1. 1 5
      applications/functions/ask_kimi.py

+ 1 - 5
applications/functions/ask_kimi.py

@@ -38,13 +38,9 @@ def ask_kimi(question):
         ],
         model="moonshot-v1-8k",
     )
-    response = chat_completion.choices[0].message.content
+    response = chat_completion.choices[0].message.content.replace('```json', '').replace('```', '')
     try:
         response = json.loads(response)
         return response
     except:
         return {}
-
-
-
-