MeUtils 2025.3.14.8.43.3__py3-none-any.whl → 2025.3.19.19.13.35__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 (51) hide show
  1. {MeUtils-2025.3.14.8.43.3.dist-info → MeUtils-2025.3.19.19.13.35.dist-info}/METADATA +264 -264
  2. {MeUtils-2025.3.14.8.43.3.dist-info → MeUtils-2025.3.19.19.13.35.dist-info}/RECORD +43 -45
  3. apps/xfPPT_demo.py +251 -0
  4. examples/_openaisdk/4v.py +11 -6
  5. examples/_openaisdk/openai_chatfire.py +4 -3
  6. examples/_openaisdk/openai_embeddings.py +25 -7
  7. examples/_openaisdk/openai_siliconflow.py +1 -1
  8. examples/_openaisdk/zhipu_/346/231/272/350/203/275/344/275/223.py +76 -13
  9. meutils/apis/jimeng/common.py +2 -0
  10. meutils/apis/jimeng/images.py +6 -6
  11. meutils/apis/jina/__init__.py +11 -0
  12. meutils/apis/jina/common.py +43 -0
  13. meutils/apis/oneapi/channel.py +3 -2
  14. meutils/apis/oneapi/user.py +1 -1
  15. meutils/apis/search/_web_search.py +87 -0
  16. meutils/apis/search/metaso.py +9 -2
  17. meutils/apis/search/web_search.py +132 -0
  18. meutils/apis/siliconflow/image_to_image.py +3 -3
  19. meutils/apis/siliconflow/images.py +4 -2
  20. meutils/apis/siliconflow/text_to_image.py +1 -1
  21. meutils/apis/siliconflow/utils.py +1 -1
  22. meutils/config_utils/lark_utils/common.py +6 -2
  23. meutils/data/VERSION +1 -1
  24. meutils/data/oneapi/index.html +9 -0
  25. meutils/io/files_utils.py +12 -1
  26. meutils/io/openai_files.py +26 -1
  27. meutils/llm/check_api.py +1 -1
  28. meutils/llm/check_utils.py +13 -4
  29. meutils/llm/clients.py +23 -0
  30. meutils/llm/completions/{oi.py → assistants/__init__.py} +2 -7
  31. meutils/llm/completions/assistants/ppt.py +11 -0
  32. meutils/llm/completions/chat_gemini.py +1 -0
  33. meutils/llm/completions/chat_plus.py +162 -49
  34. meutils/llm/completions/chat_spark.py +3 -10
  35. meutils/llm/completions/qwenllm.py +11 -6
  36. meutils/request_utils/crawler.py +11 -11
  37. meutils/schemas/oneapi/common.py +9 -1
  38. meutils/schemas/openai_types.py +26 -4
  39. meutils/schemas/siliconflow_types.py +1 -1
  40. meutils/apis/search/zhipu.py +0 -80
  41. meutils/llm/completions/qwen_demo.py +0 -26
  42. meutils/other/aiomultiprocess/__init__.py +0 -14
  43. meutils/other/aiomultiprocess/__version__.py +0 -1
  44. meutils/other/aiomultiprocess/core.py +0 -241
  45. meutils/other/aiomultiprocess/pool.py +0 -379
  46. meutils/other/aiomultiprocess/scheduler.py +0 -83
  47. meutils/other/aiomultiprocess/types.py +0 -48
  48. {MeUtils-2025.3.14.8.43.3.dist-info → MeUtils-2025.3.19.19.13.35.dist-info}/LICENSE +0 -0
  49. {MeUtils-2025.3.14.8.43.3.dist-info → MeUtils-2025.3.19.19.13.35.dist-info}/WHEEL +0 -0
  50. {MeUtils-2025.3.14.8.43.3.dist-info → MeUtils-2025.3.19.19.13.35.dist-info}/entry_points.txt +0 -0
  51. {MeUtils-2025.3.14.8.43.3.dist-info → MeUtils-2025.3.19.19.13.35.dist-info}/top_level.txt +0 -0
@@ -1,83 +0,0 @@
1
- # Copyright 2019 John Reese
2
- # Licensed under the MIT license
3
-
4
- import itertools
5
- from abc import ABC, abstractmethod
6
- from typing import Any, Awaitable, Callable, Dict, Iterator, List, Sequence
7
-
8
- from .types import Queue, QueueID, R, TaskID
9
-
10
-
11
- class Scheduler(ABC):
12
- @abstractmethod
13
- def register_queue(self, tx: Queue) -> QueueID:
14
- """
15
- Notify the scheduler when the pool creates a new transmit queue.
16
- """
17
-
18
- @abstractmethod
19
- def register_process(self, qid: QueueID) -> None:
20
- """
21
- Notify the scheduler when a process is assigned to a queue.
22
-
23
- This should be used for determining weights for the scheduler.
24
- It will only be called during initial process mapping.
25
- """
26
-
27
- @abstractmethod
28
- def schedule_task(
29
- self,
30
- task_id: TaskID,
31
- func: Callable[..., Awaitable[R]],
32
- args: Sequence[Any],
33
- kwargs: Dict[str, Any],
34
- ) -> QueueID:
35
- """
36
- Given a task, return a queue ID that it should be sent to.
37
-
38
- `func`, `args` and `kwargs` are just the exact same arguments
39
- that `queue_work` takes, not every scheduler would be benefit from this.
40
- Example that they would be useful, highly customized schedule may want
41
- to schedule according to function/arguments weights.
42
- """
43
-
44
- @abstractmethod
45
- def complete_task(self, task_id: TaskID) -> None:
46
- """
47
- Notify the scheduler that a task has been completed.
48
- """
49
-
50
-
51
- class RoundRobin(Scheduler):
52
- """
53
- The default scheduling algorithm that assigns tasks to queues in round robin order.
54
-
55
- When multiple processes are assigned to the same queue, this will weight tasks
56
- accordingly. For example, 12 processes over 8 queues should result in four queues
57
- receiving double the number tasks compared to the other eight.
58
- """
59
-
60
- def __init__(self) -> None:
61
- super().__init__()
62
- self.qids: List[QueueID] = []
63
- self.next_id = itertools.count()
64
- self.cycler: Iterator[QueueID] = itertools.cycle([])
65
-
66
- def register_queue(self, tx: Queue) -> QueueID:
67
- return QueueID(next(self.next_id))
68
-
69
- def register_process(self, qid: QueueID) -> None:
70
- self.qids.append(qid)
71
- self.cycler = itertools.cycle(self.qids)
72
-
73
- def schedule_task(
74
- self,
75
- _task_id: TaskID,
76
- _func: Callable[..., Awaitable[R]],
77
- _args: Sequence[Any],
78
- _kwargs: Dict[str, Any],
79
- ) -> QueueID:
80
- return next(self.cycler)
81
-
82
- def complete_task(self, _task_id: TaskID) -> None:
83
- pass
@@ -1,48 +0,0 @@
1
- # Copyright 2018 John Reese
2
- # Licensed under the MIT license
3
-
4
- import multiprocessing
5
- from asyncio import BaseEventLoop
6
- from typing import (
7
- Any,
8
- Callable,
9
- Dict,
10
- NamedTuple,
11
- NewType,
12
- Optional,
13
- Sequence,
14
- Tuple,
15
- TypeVar,
16
- )
17
-
18
- T = TypeVar("T")
19
- R = TypeVar("R")
20
-
21
- Context = multiprocessing.context.BaseContext
22
- Queue = multiprocessing.Queue
23
-
24
- TaskID = NewType("TaskID", int)
25
- QueueID = NewType("QueueID", int)
26
-
27
- TracebackStr = str
28
-
29
- LoopInitializer = Callable[..., BaseEventLoop]
30
- PoolTask = Optional[Tuple[TaskID, Callable[..., R], Sequence[T], Dict[str, T]]]
31
- PoolResult = Tuple[TaskID, Optional[R], Optional[TracebackStr]]
32
-
33
-
34
- class Unit(NamedTuple):
35
- """Container for what to call on the child process."""
36
-
37
- target: Callable
38
- args: Sequence[Any]
39
- kwargs: Dict[str, Any]
40
- namespace: Any
41
- initializer: Optional[Callable] = None
42
- initargs: Sequence[Any] = ()
43
- loop_initializer: Optional[LoopInitializer] = None
44
- runner: Optional[Callable] = None
45
-
46
-
47
- class ProxyException(Exception):
48
- pass