Commit 6a48d00f by lei

1

parent 808f8c31
...@@ -62,7 +62,7 @@ def get_module_list(): ...@@ -62,7 +62,7 @@ def get_module_list():
print(x.text) print(x.text)
def get_gpt_message(task): async def get_gpt_message(task):
openai.organization = organization openai.organization = organization
openai.api_key = api_key openai.api_key = api_key
prompt_num = task['prompt_num'] prompt_num = task['prompt_num']
...@@ -111,7 +111,6 @@ if __name__ == '__main__': ...@@ -111,7 +111,6 @@ if __name__ == '__main__':
if task: if task:
# 存在任务--转对象 # 存在任务--转对象
task = json.loads(task) task = json.loads(task)
logger.info(task)
tasks.append(get_gpt_message(task)) tasks.append(get_gpt_message(task))
loop.run_until_complete((asyncio.wait(tasks, timeout=30))) loop.run_until_complete((asyncio.wait(tasks, timeout=30)))
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment