async_aigc_system_api.py 566 B

12345678910111213141516171819
  1. from applications.utils import AsyncHttPClient
  2. async def delete_illegal_gzh_articles(gh_id: str, title: str):
  3. """
  4. Delete illegal gzh articles
  5. :param gh_id: gzh id
  6. :param title: article title
  7. """
  8. url = "http://101.37.174.139:80/articleAudit/titleDangerFindDelete"
  9. payload = {
  10. "title": title,
  11. "ghId": gh_id,
  12. }
  13. headers = {"Content-Type": "application/json;charset=UTF-8"}
  14. async with AsyncHttPClient(timeout=600) as client:
  15. res = await client.post(url=url, headers=headers, json=payload)
  16. return res