MeUtils 2025.1.17.19.49.29__py3-none-any.whl → 2025.1.27.15.5.31__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {MeUtils-2025.1.17.19.49.29.dist-info → MeUtils-2025.1.27.15.5.31.dist-info}/METADATA +27 -28
  2. {MeUtils-2025.1.17.19.49.29.dist-info → MeUtils-2025.1.27.15.5.31.dist-info}/RECORD +46 -43
  3. examples/_openaisdk/4v.py +3 -4
  4. examples/_openaisdk/openai_baichuan.py +7 -3
  5. examples/_openaisdk/openai_chatfire.py +17 -4
  6. examples/_openaisdk/openai_deepinfra.py +2 -2
  7. examples/_openaisdk/openai_deepseek.py +7 -6
  8. examples/_openaisdk/openai_doubao.py +16 -7
  9. examples/_openaisdk/openai_embeddings.py +1 -1
  10. examples/_openaisdk/openai_modelscope.py +2 -1
  11. examples/_openaisdk/openai_together.py +2 -1
  12. meutils/apis/jimeng/lip_sync.py → examples/_openaisdk/openai_x.py +3 -2
  13. examples/_openaisdk/openai_zhipu.py +9 -5
  14. examples/bserver.py +60 -518
  15. examples/json_jmespath.py +13 -13
  16. meutils/apis/fal/videos.py +13 -7
  17. meutils/apis/hailuoai/videos.py +16 -6
  18. meutils/apis/hunyuan/image_tools.py +6 -2
  19. meutils/apis/images/edits.py +74 -6
  20. meutils/apis/images/recraft.py +5 -5
  21. meutils/apis/jimeng/common.py +2 -147
  22. meutils/apis/jimeng/doubao.py +2 -2
  23. meutils/apis/jimeng/files.py +84 -29
  24. meutils/apis/jimeng/images.py +177 -11
  25. meutils/apis/jimeng/videos.py +305 -0
  26. meutils/apis/oneapi/user.py +3 -1
  27. meutils/data/VERSION +1 -1
  28. meutils/io/files_utils.py +9 -3
  29. meutils/jwt_utils/common.py +46 -0
  30. meutils/llm/clients.py +4 -1
  31. meutils/llm/completions/agents/file.py +7 -4
  32. meutils/llm/completions/agents/search.py +115 -0
  33. meutils/parsers/fileparser/mineru.py +48 -0
  34. meutils/schemas/hailuo_types.py +8 -2
  35. meutils/schemas/image_types.py +19 -5
  36. meutils/schemas/oneapi/common.py +152 -45
  37. meutils/schemas/oneapi/models.py +1 -1
  38. meutils/schemas/openai_types.py +1 -1
  39. meutils/schemas/task_types.py +2 -0
  40. meutils/schemas/video_types.py +19 -1
  41. meutils/str_utils/json_utils.py +29 -1
  42. meutils/request_utils/jwt_utils/common.py +0 -42
  43. {MeUtils-2025.1.17.19.49.29.dist-info → MeUtils-2025.1.27.15.5.31.dist-info}/LICENSE +0 -0
  44. {MeUtils-2025.1.17.19.49.29.dist-info → MeUtils-2025.1.27.15.5.31.dist-info}/WHEEL +0 -0
  45. {MeUtils-2025.1.17.19.49.29.dist-info → MeUtils-2025.1.27.15.5.31.dist-info}/entry_points.txt +0 -0
  46. {MeUtils-2025.1.17.19.49.29.dist-info → MeUtils-2025.1.27.15.5.31.dist-info}/top_level.txt +0 -0
  47. /meutils/{request_utils/jwt_utils → jwt_utils}/__init__.py +0 -0
@@ -24,20 +24,24 @@ client = OpenAI(
24
24
  # base_url="https://any2chat.chatfire.cn/glm/v1"
25
25
  )
26
26
 
27
-
27
+ message = """
28
+ A Chinese beauty plays Catwoman. She is seductive. She wears a fitted black leather tights, decorated with neon blue lines flowing along the seams, pulsating like an electric current. There are many hollow designs for tights, showing big breasts, nipples and female genitals. She wears a pair of black cat ear headdresses. Her hands are covered with black leather gloves extending to her elbows, with retractable silver claws on her fingertips. She stood around the roof surrounded by towering skyscrapers, and countless neon signs flashed with various colors.
29
+ """
28
30
 
29
31
  try:
30
32
  completion = client.chat.completions.create(
31
33
  model="glm-4-flash",
32
34
  # model="xxxxxxxxxxxxx",
33
35
  messages=[
34
- {"role": "user", "content": "hi"}
36
+ {"role": "system", "content": '你是个内容审核助手'},
37
+
38
+ {"role": "user", "content": message}
35
39
  ],
36
40
  # top_p=0.7,
37
41
  top_p=None,
38
42
  temperature=None,
39
43
  stream=True,
40
- max_tokens=11
44
+ max_tokens=1000
41
45
  )
42
46
  except APIStatusError as e:
43
47
  print(e.status_code)
@@ -47,8 +51,8 @@ except APIStatusError as e:
47
51
  print(e.code)
48
52
 
49
53
  for chunk in completion:
50
- print(bjson(chunk))
51
- print(chunk.choices[0].delta.content)
54
+ # print(bjson(chunk))
55
+ print(chunk.choices[0].delta.content, flush=True)
52
56
 
53
57
  # r = client.images.generate(
54
58
  # model="cogview-3-plus",