lm-deluge 0.0.41__tar.gz → 0.0.106__tar.gz

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 (180) hide show
  1. {lm_deluge-0.0.41/src/lm_deluge.egg-info → lm_deluge-0.0.106}/PKG-INFO +34 -19
  2. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/README.md +16 -16
  3. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/pyproject.toml +16 -7
  4. lm_deluge-0.0.106/src/lm_deluge/__init__.py +19 -0
  5. lm_deluge-0.0.106/src/lm_deluge/api_requests/anthropic.py +433 -0
  6. lm_deluge-0.0.106/src/lm_deluge/api_requests/base.py +325 -0
  7. lm_deluge-0.0.106/src/lm_deluge/api_requests/bedrock.py +459 -0
  8. lm_deluge-0.0.41/src/lm_deluge/api_requests/bedrock.py → lm_deluge-0.0.106/src/lm_deluge/api_requests/bedrock_nova.py +95 -87
  9. lm_deluge-0.0.106/src/lm_deluge/api_requests/chat_reasoning.py +4 -0
  10. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/api_requests/common.py +2 -0
  11. lm_deluge-0.0.41/src/lm_deluge/request_context.py → lm_deluge-0.0.106/src/lm_deluge/api_requests/context.py +24 -17
  12. lm_deluge-0.0.106/src/lm_deluge/api_requests/gemini.py +367 -0
  13. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/api_requests/mistral.py +17 -10
  14. lm_deluge-0.0.106/src/lm_deluge/api_requests/openai.py +769 -0
  15. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/api_requests/response.py +31 -2
  16. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/batches.py +43 -57
  17. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/cache.py +11 -2
  18. lm_deluge-0.0.106/src/lm_deluge/cli.py +746 -0
  19. lm_deluge-0.0.106/src/lm_deluge/client/__init__.py +1737 -0
  20. lm_deluge-0.0.106/src/lm_deluge/config.py +23 -0
  21. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/embed.py +2 -6
  22. lm_deluge-0.0.106/src/lm_deluge/mcp/__init__.py +38 -0
  23. lm_deluge-0.0.106/src/lm_deluge/mcp/client.py +204 -0
  24. lm_deluge-0.0.106/src/lm_deluge/mcp/sse.py +92 -0
  25. lm_deluge-0.0.106/src/lm_deluge/mcp/transports.py +245 -0
  26. lm_deluge-0.0.106/src/lm_deluge/mcp/types.py +59 -0
  27. lm_deluge-0.0.106/src/lm_deluge/models/__init__.py +278 -0
  28. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/anthropic.py +86 -41
  29. lm_deluge-0.0.106/src/lm_deluge/models/arcee.py +16 -0
  30. lm_deluge-0.0.106/src/lm_deluge/models/azure.py +269 -0
  31. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/bedrock.py +77 -14
  32. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/cerebras.py +29 -21
  33. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/cohere.py +2 -16
  34. lm_deluge-0.0.106/src/lm_deluge/models/deepseek.py +59 -0
  35. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/google.py +75 -32
  36. lm_deluge-0.0.106/src/lm_deluge/models/grok.py +110 -0
  37. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/groq.py +4 -2
  38. lm_deluge-0.0.106/src/lm_deluge/models/kimi.py +59 -0
  39. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/meta.py +2 -8
  40. lm_deluge-0.0.106/src/lm_deluge/models/minimax.py +18 -0
  41. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/openai.py +170 -43
  42. lm_deluge-0.0.106/src/lm_deluge/models/openrouter.py +329 -0
  43. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/together.py +14 -16
  44. lm_deluge-0.0.106/src/lm_deluge/models/zai.py +62 -0
  45. {lm_deluge-0.0.41/src/lm_deluge/llm_tools → lm_deluge-0.0.106/src/lm_deluge/pipelines}/extract.py +11 -10
  46. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/__init__.py +95 -0
  47. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/core.py +354 -0
  48. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/docs/samples.py +705 -0
  49. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/examples/01_synthetic_keywords.py +140 -0
  50. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/examples/02_gsm8k_math.py +261 -0
  51. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/examples/03_hotpotqa_multihop.py +300 -0
  52. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/examples/04_batch_classification.py +271 -0
  53. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/examples/simple_qa.py +129 -0
  54. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/optimizer.py +435 -0
  55. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/proposer.py +235 -0
  56. lm_deluge-0.0.106/src/lm_deluge/pipelines/gepa/util.py +165 -0
  57. lm_deluge-0.0.106/src/lm_deluge/pipelines/heartbeat.py +29 -0
  58. {lm_deluge-0.0.41/src/lm_deluge/llm_tools → lm_deluge-0.0.106/src/lm_deluge/pipelines}/score.py +2 -2
  59. {lm_deluge-0.0.41/src/lm_deluge/llm_tools → lm_deluge-0.0.106/src/lm_deluge/pipelines}/translate.py +5 -3
  60. lm_deluge-0.0.106/src/lm_deluge/prompt/__init__.py +47 -0
  61. lm_deluge-0.0.106/src/lm_deluge/prompt/conversation.py +1230 -0
  62. lm_deluge-0.0.106/src/lm_deluge/prompt/file.py +531 -0
  63. {lm_deluge-0.0.41/src/lm_deluge → lm_deluge-0.0.106/src/lm_deluge/prompt}/image.py +40 -1
  64. lm_deluge-0.0.106/src/lm_deluge/prompt/message.py +596 -0
  65. lm_deluge-0.0.106/src/lm_deluge/prompt/serialization.py +21 -0
  66. lm_deluge-0.0.106/src/lm_deluge/prompt/signatures.py +77 -0
  67. lm_deluge-0.0.106/src/lm_deluge/prompt/text.py +50 -0
  68. lm_deluge-0.0.106/src/lm_deluge/prompt/thinking.py +68 -0
  69. lm_deluge-0.0.106/src/lm_deluge/prompt/tool_calls.py +301 -0
  70. lm_deluge-0.0.106/src/lm_deluge/server/__init__.py +24 -0
  71. lm_deluge-0.0.106/src/lm_deluge/server/__main__.py +144 -0
  72. lm_deluge-0.0.106/src/lm_deluge/server/adapters.py +369 -0
  73. lm_deluge-0.0.106/src/lm_deluge/server/app.py +388 -0
  74. lm_deluge-0.0.106/src/lm_deluge/server/auth.py +71 -0
  75. lm_deluge-0.0.106/src/lm_deluge/server/model_policy.py +215 -0
  76. lm_deluge-0.0.106/src/lm_deluge/server/models_anthropic.py +172 -0
  77. lm_deluge-0.0.106/src/lm_deluge/server/models_openai.py +175 -0
  78. lm_deluge-0.0.106/src/lm_deluge/skill/SKILL.md +196 -0
  79. lm_deluge-0.0.106/src/lm_deluge/skill/__init__.py +1 -0
  80. lm_deluge-0.0.106/src/lm_deluge/tool/__init__.py +1296 -0
  81. lm_deluge-0.0.106/src/lm_deluge/tool/builtin/anthropic/__init__.py +300 -0
  82. lm_deluge-0.0.106/src/lm_deluge/tool/builtin/anthropic/computer_use.py +0 -0
  83. lm_deluge-0.0.106/src/lm_deluge/tool/builtin/gemini.py +59 -0
  84. lm_deluge-0.0.106/src/lm_deluge/tool/builtin/openai.py +74 -0
  85. lm_deluge-0.0.106/src/lm_deluge/tool/cua/__init__.py +173 -0
  86. lm_deluge-0.0.106/src/lm_deluge/tool/cua/actions.py +148 -0
  87. lm_deluge-0.0.106/src/lm_deluge/tool/cua/base.py +27 -0
  88. lm_deluge-0.0.106/src/lm_deluge/tool/cua/batch.py +214 -0
  89. lm_deluge-0.0.106/src/lm_deluge/tool/cua/converters.py +466 -0
  90. lm_deluge-0.0.106/src/lm_deluge/tool/cua/kernel.py +702 -0
  91. lm_deluge-0.0.106/src/lm_deluge/tool/cua/trycua.py +989 -0
  92. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/__init__.py +119 -0
  93. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/batch_tool.py +156 -0
  94. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/curl.py +343 -0
  95. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/docs.py +1119 -0
  96. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/email.py +294 -0
  97. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/filesystem.py +1721 -0
  98. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/full_text_search/__init__.py +286 -0
  99. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/full_text_search/tantivy_index.py +396 -0
  100. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/memory.py +460 -0
  101. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/otc/__init__.py +165 -0
  102. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/otc/executor.py +281 -0
  103. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/otc/parse.py +188 -0
  104. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/philips_hue.py +428 -0
  105. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/random.py +188 -0
  106. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/rlm/__init__.py +296 -0
  107. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/rlm/executor.py +349 -0
  108. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/rlm/parse.py +144 -0
  109. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/sandbox/__init__.py +58 -0
  110. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/sandbox/daytona_sandbox.py +483 -0
  111. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/sandbox/docker_sandbox.py +609 -0
  112. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/sandbox/fargate_sandbox.py +546 -0
  113. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/sandbox/modal_sandbox.py +469 -0
  114. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/sandbox/seatbelt_sandbox.py +829 -0
  115. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/sheets.py +385 -0
  116. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/skills.py +0 -0
  117. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/subagents.py +233 -0
  118. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/todos.py +342 -0
  119. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/tool_search.py +169 -0
  120. lm_deluge-0.0.106/src/lm_deluge/tool/prefab/web_search.py +1020 -0
  121. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/tracker.py +87 -10
  122. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/usage.py +30 -21
  123. lm_deluge-0.0.106/src/lm_deluge/util/anthropic_files.py +228 -0
  124. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/util/json.py +1 -2
  125. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/util/logprobs.py +4 -4
  126. lm_deluge-0.0.106/src/lm_deluge/util/schema.py +412 -0
  127. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/util/validation.py +14 -9
  128. lm_deluge-0.0.106/src/lm_deluge/warnings.py +54 -0
  129. {lm_deluge-0.0.41 → lm_deluge-0.0.106/src/lm_deluge.egg-info}/PKG-INFO +34 -19
  130. lm_deluge-0.0.106/src/lm_deluge.egg-info/SOURCES.txt +156 -0
  131. lm_deluge-0.0.106/src/lm_deluge.egg-info/entry_points.txt +3 -0
  132. lm_deluge-0.0.106/src/lm_deluge.egg-info/requires.txt +38 -0
  133. lm_deluge-0.0.41/src/lm_deluge/__init__.py +0 -17
  134. lm_deluge-0.0.41/src/lm_deluge/api_requests/anthropic.py +0 -217
  135. lm_deluge-0.0.41/src/lm_deluge/api_requests/base.py +0 -151
  136. lm_deluge-0.0.41/src/lm_deluge/api_requests/gemini.py +0 -206
  137. lm_deluge-0.0.41/src/lm_deluge/api_requests/openai.py +0 -529
  138. lm_deluge-0.0.41/src/lm_deluge/built_in_tools/anthropic/__init__.py +0 -128
  139. lm_deluge-0.0.41/src/lm_deluge/built_in_tools/openai.py +0 -28
  140. lm_deluge-0.0.41/src/lm_deluge/cli.py +0 -300
  141. lm_deluge-0.0.41/src/lm_deluge/client.py +0 -870
  142. lm_deluge-0.0.41/src/lm_deluge/config.py +0 -33
  143. lm_deluge-0.0.41/src/lm_deluge/file.py +0 -158
  144. lm_deluge-0.0.41/src/lm_deluge/gemini_limits.py +0 -65
  145. lm_deluge-0.0.41/src/lm_deluge/models/__init__.py +0 -144
  146. lm_deluge-0.0.41/src/lm_deluge/models/deepseek.py +0 -27
  147. lm_deluge-0.0.41/src/lm_deluge/models/grok.py +0 -38
  148. lm_deluge-0.0.41/src/lm_deluge/models/openrouter.py +0 -1
  149. lm_deluge-0.0.41/src/lm_deluge/prompt.py +0 -989
  150. lm_deluge-0.0.41/src/lm_deluge/tool.py +0 -461
  151. lm_deluge-0.0.41/src/lm_deluge.egg-info/SOURCES.txt +0 -76
  152. lm_deluge-0.0.41/src/lm_deluge.egg-info/requires.txt +0 -17
  153. lm_deluge-0.0.41/tests/test_builtin_tools.py +0 -58
  154. lm_deluge-0.0.41/tests/test_native_mcp_server.py +0 -66
  155. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/LICENSE +0 -0
  156. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/setup.cfg +0 -0
  157. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/api_requests/__init__.py +0 -0
  158. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/api_requests/deprecated/bedrock.py +0 -0
  159. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/api_requests/deprecated/cohere.py +0 -0
  160. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/api_requests/deprecated/deepseek.py +0 -0
  161. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/api_requests/deprecated/mistral.py +0 -0
  162. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/api_requests/deprecated/vertex.py +0 -0
  163. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/errors.py +0 -0
  164. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/fireworks.py +0 -0
  165. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/models/mistral.py +0 -0
  166. {lm_deluge-0.0.41/src/lm_deluge/llm_tools → lm_deluge-0.0.106/src/lm_deluge/pipelines}/__init__.py +1 -1
  167. {lm_deluge-0.0.41/src/lm_deluge/llm_tools → lm_deluge-0.0.106/src/lm_deluge/pipelines}/classify.py +0 -0
  168. {lm_deluge-0.0.41/src/lm_deluge/llm_tools → lm_deluge-0.0.106/src/lm_deluge/pipelines}/locate.py +0 -0
  169. {lm_deluge-0.0.41/src/lm_deluge/llm_tools → lm_deluge-0.0.106/src/lm_deluge/pipelines}/ocr.py +0 -0
  170. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/rerank.py +0 -0
  171. /lm_deluge-0.0.41/src/lm_deluge/agent.py → /lm_deluge-0.0.106/src/lm_deluge/skills/anthropic.py +0 -0
  172. /lm_deluge-0.0.41/src/lm_deluge/built_in_tools/anthropic/bash.py → /lm_deluge-0.0.106/src/lm_deluge/skills/compat.py +0 -0
  173. /lm_deluge-0.0.41/src/lm_deluge/built_in_tools/anthropic/computer_use.py → /lm_deluge-0.0.106/src/lm_deluge/tool/builtin/anthropic/bash.py +0 -0
  174. {lm_deluge-0.0.41/src/lm_deluge/built_in_tools → lm_deluge-0.0.106/src/lm_deluge/tool/builtin}/anthropic/editor.py +0 -0
  175. {lm_deluge-0.0.41/src/lm_deluge/built_in_tools → lm_deluge-0.0.106/src/lm_deluge/tool/builtin}/base.py +0 -0
  176. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/util/harmony.py +0 -0
  177. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/util/spatial.py +0 -0
  178. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge/util/xml.py +0 -0
  179. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge.egg-info/dependency_links.txt +0 -0
  180. {lm_deluge-0.0.41 → lm_deluge-0.0.106}/src/lm_deluge.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lm_deluge
3
- Version: 0.0.41
3
+ Version: 0.0.106
4
4
  Summary: Python utility for using LLM API models.
5
5
  Author-email: Benjamin Anderson <ben@trytaylor.ai>
6
6
  Requires-Python: >=3.10
@@ -9,7 +9,6 @@ License-File: LICENSE
9
9
  Requires-Dist: python-dotenv
10
10
  Requires-Dist: json5
11
11
  Requires-Dist: PyYAML
12
- Requires-Dist: pandas
13
12
  Requires-Dist: aiohttp
14
13
  Requires-Dist: tiktoken
15
14
  Requires-Dist: xxhash
@@ -21,8 +20,24 @@ Requires-Dist: bs4
21
20
  Requires-Dist: lxml
22
21
  Requires-Dist: pdf2image
23
22
  Requires-Dist: pillow
24
- Requires-Dist: fastmcp>=2.4
25
23
  Requires-Dist: rich
24
+ Provides-Extra: aws
25
+ Requires-Dist: boto3>=1.28.0; extra == "aws"
26
+ Provides-Extra: docker
27
+ Requires-Dist: docker>=7.0.0; extra == "docker"
28
+ Provides-Extra: full-text-search
29
+ Requires-Dist: tantivy>=0.21.0; extra == "full-text-search"
30
+ Requires-Dist: lenlp>=0.1.0; extra == "full-text-search"
31
+ Provides-Extra: sandbox
32
+ Requires-Dist: modal>=0.64.0; extra == "sandbox"
33
+ Requires-Dist: daytona-sdk>=0.1.4; extra == "sandbox"
34
+ Requires-Dist: docker>=7.0.0; extra == "sandbox"
35
+ Provides-Extra: server
36
+ Requires-Dist: fastapi>=0.100.0; extra == "server"
37
+ Requires-Dist: uvicorn>=0.20.0; extra == "server"
38
+ Provides-Extra: dev
39
+ Requires-Dist: ty; extra == "dev"
40
+ Requires-Dist: pre-commit; extra == "dev"
26
41
  Dynamic: license-file
27
42
 
28
43
  # lm-deluge
@@ -35,9 +50,9 @@ Dynamic: license-file
35
50
  - **Spray across models/providers** – Configure a client with multiple models from any provider(s), and sampling weights. The client samples a model for each request.
36
51
  - **Tool Use** – Unified API for defining tools for all providers, and creating tools automatically from python functions.
37
52
  - **MCP Support** – Instantiate a `Tool` from a local or remote MCP server so that any LLM can use it, whether or not that provider natively supports MCP.
38
- - **Computer Use** – We support Claude Computer Use via the computer_use argument to process_prompts_sync/async. It works with Anthropic's API; Bedrock's API is broken right now and rejects the tool definitions, but in principle this will work there too when Bedrock gets their sh*t together.
39
- - **Caching** – Save completions in a local or distributed cache to avoid repeated LLM calls to process the same input.
40
- - **Convenient message constructor** – No more looking up how to build an Anthropic messages list with images. Our `Conversation` and `Message` classes work great with our client or with the `openai` and `anthropic` packages.
53
+ - **Computer Use** – We support computer use for all major providers, and have pre-fabricated tools to integrate with Kernel, TryCUA, and more.
54
+ - **Local & Remote Caching** – Use Anthropic caching more easily with common patterns (system-only, tools-only, last N messages, etc.) Use client-side caching to save completions to avoid repeated LLM calls to process the same input.
55
+ - **Convenient message constructor** – No more looking up how to build an Anthropic messages list with images. Our `Conversation` and `Message` classes work great with our `LLMClient` or with the `openai` and `anthropic` packages.
41
56
  - **Sync and async APIs** – Use the client from sync or async code.
42
57
 
43
58
  **STREAMING IS NOT IN SCOPE.** There are plenty of packages that let you stream chat completions across providers. The sole purpose of this package is to do very fast batch inference using APIs. Sorry!
@@ -50,7 +65,7 @@ Dynamic: license-file
50
65
  pip install lm-deluge
51
66
  ```
52
67
 
53
- The package relies on environment variables for API keys. Typical variables include `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `COHERE_API_KEY`, `META_API_KEY`, and `GOOGLE_API_KEY`. `LLMClient` will automatically load the `.env` file when imported; we recommend using that to set the environment variables. For Bedrock, you'll need to set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
68
+ The package relies on environment variables for API keys. Typical variables include `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `COHERE_API_KEY`, `META_API_KEY`, and `GEMINI_API_KEY`. `LLMClient` will automatically load the `.env` file when imported; we recommend using that to set the environment variables. For Bedrock, you'll need to set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
54
69
 
55
70
  ## Quickstart
56
71
 
@@ -59,9 +74,9 @@ The package relies on environment variables for API keys. Typical variables incl
59
74
  ```python
60
75
  from lm_deluge import LLMClient
61
76
 
62
- client = LLMClient("gpt-4o-mini")
77
+ client = LLMClient("gpt-4.1-mini")
63
78
  resps = client.process_prompts_sync(["Hello, world!"])
64
- print(resp[0].completion)
79
+ print(resps[0].completion)
65
80
  ```
66
81
 
67
82
  ## Spraying Across Models
@@ -72,13 +87,13 @@ To distribute your requests across models, just provide a list of more than one
72
87
  from lm_deluge import LLMClient
73
88
 
74
89
  client = LLMClient(
75
- ["gpt-4o-mini", "claude-3-haiku"],
90
+ ["gpt-4.1-mini", "claude-4.5-haiku"],
76
91
  max_requests_per_minute=10_000
77
92
  )
78
93
  resps = client.process_prompts_sync(
79
94
  ["Hello, ChatGPT!", "Hello, Claude!"]
80
95
  )
81
- print(resp[0].completion)
96
+ print(resps[0].completion)
82
97
  ```
83
98
 
84
99
  ## Configuration
@@ -132,7 +147,7 @@ Constructing conversations to pass to models is notoriously annoying. Each provi
132
147
  ```python
133
148
  from lm_deluge import Message, Conversation
134
149
 
135
- prompt = Conversation.system("You are a helpful assistant.").add(
150
+ prompt = Conversation().system("You are a helpful assistant.").add(
136
151
  Message.user("What's in this image?").add_image("tests/image.jpg")
137
152
  )
138
153
 
@@ -153,7 +168,7 @@ from lm_deluge import LLMClient, Conversation
153
168
 
154
169
  # Simple file upload
155
170
  client = LLMClient("gpt-4.1-mini")
156
- conversation = Conversation.user(
171
+ conversation = Conversation().user(
157
172
  "Please summarize this document",
158
173
  file="path/to/document.pdf"
159
174
  )
@@ -162,7 +177,7 @@ resps = client.process_prompts_sync([conversation])
162
177
  # You can also create File objects for more control
163
178
  from lm_deluge import File
164
179
  file = File("path/to/report.pdf", filename="Q4_Report.pdf")
165
- conversation = Conversation.user("Analyze this financial report")
180
+ conversation = Conversation().user("Analyze this financial report")
166
181
  conversation.messages[0].parts.append(file)
167
182
  ```
168
183
 
@@ -179,7 +194,7 @@ def get_weather(city: str) -> str:
179
194
  return f"The weather in {city} is sunny and 72°F"
180
195
 
181
196
  tool = Tool.from_function(get_weather)
182
- client = LLMClient("claude-3-haiku")
197
+ client = LLMClient("claude-4.5-haiku")
183
198
  resps = client.process_prompts_sync(
184
199
  ["What's the weather in Paris?"],
185
200
  tools=[tool]
@@ -232,7 +247,7 @@ for tool_call in resps[0].tool_calls:
232
247
  import asyncio
233
248
 
234
249
  async def main():
235
- conv = Conversation.user("List the files in the current directory")
250
+ conv = Conversation().user("List the files in the current directory")
236
251
  conv, resp = await client.run_agent_loop(conv, tools=tools)
237
252
  print(resp.content.completion)
238
253
 
@@ -248,12 +263,12 @@ from lm_deluge import LLMClient, Conversation, Message
248
263
 
249
264
  # Create a conversation with system message
250
265
  conv = (
251
- Conversation.system("You are an expert Python developer with deep knowledge of async programming.")
266
+ Conversation().system("You are an expert Python developer with deep knowledge of async programming.")
252
267
  .add(Message.user("How do I use asyncio.gather?"))
253
268
  )
254
269
 
255
270
  # Use prompt caching to cache system message and tools
256
- client = LLMClient("claude-3-5-sonnet")
271
+ client = LLMClient("claude-4.5-sonnet")
257
272
  resps = client.process_prompts_sync(
258
273
  [conv],
259
274
  cache="system_and_tools" # Cache system message and any tools
@@ -294,7 +309,7 @@ We support structured outputs via `json_mode` parameter provided to `SamplingPar
294
309
 
295
310
  ## Built‑in tools
296
311
 
297
- The `lm_deluge.llm_tools` package exposes a few helper functions:
312
+ The `lm_deluge.pipelines` module exposes a few helper functions that combine LLMClient with prompt and output parsing to accomplish tasks:
298
313
 
299
314
  - `extract` – structure text or images into a Pydantic model based on a schema.
300
315
  - `translate` – translate a list of strings to English.
@@ -8,9 +8,9 @@
8
8
  - **Spray across models/providers** – Configure a client with multiple models from any provider(s), and sampling weights. The client samples a model for each request.
9
9
  - **Tool Use** – Unified API for defining tools for all providers, and creating tools automatically from python functions.
10
10
  - **MCP Support** – Instantiate a `Tool` from a local or remote MCP server so that any LLM can use it, whether or not that provider natively supports MCP.
11
- - **Computer Use** – We support Claude Computer Use via the computer_use argument to process_prompts_sync/async. It works with Anthropic's API; Bedrock's API is broken right now and rejects the tool definitions, but in principle this will work there too when Bedrock gets their sh*t together.
12
- - **Caching** – Save completions in a local or distributed cache to avoid repeated LLM calls to process the same input.
13
- - **Convenient message constructor** – No more looking up how to build an Anthropic messages list with images. Our `Conversation` and `Message` classes work great with our client or with the `openai` and `anthropic` packages.
11
+ - **Computer Use** – We support computer use for all major providers, and have pre-fabricated tools to integrate with Kernel, TryCUA, and more.
12
+ - **Local & Remote Caching** – Use Anthropic caching more easily with common patterns (system-only, tools-only, last N messages, etc.) Use client-side caching to save completions to avoid repeated LLM calls to process the same input.
13
+ - **Convenient message constructor** – No more looking up how to build an Anthropic messages list with images. Our `Conversation` and `Message` classes work great with our `LLMClient` or with the `openai` and `anthropic` packages.
14
14
  - **Sync and async APIs** – Use the client from sync or async code.
15
15
 
16
16
  **STREAMING IS NOT IN SCOPE.** There are plenty of packages that let you stream chat completions across providers. The sole purpose of this package is to do very fast batch inference using APIs. Sorry!
@@ -23,7 +23,7 @@
23
23
  pip install lm-deluge
24
24
  ```
25
25
 
26
- The package relies on environment variables for API keys. Typical variables include `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `COHERE_API_KEY`, `META_API_KEY`, and `GOOGLE_API_KEY`. `LLMClient` will automatically load the `.env` file when imported; we recommend using that to set the environment variables. For Bedrock, you'll need to set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
26
+ The package relies on environment variables for API keys. Typical variables include `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `COHERE_API_KEY`, `META_API_KEY`, and `GEMINI_API_KEY`. `LLMClient` will automatically load the `.env` file when imported; we recommend using that to set the environment variables. For Bedrock, you'll need to set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
27
27
 
28
28
  ## Quickstart
29
29
 
@@ -32,9 +32,9 @@ The package relies on environment variables for API keys. Typical variables incl
32
32
  ```python
33
33
  from lm_deluge import LLMClient
34
34
 
35
- client = LLMClient("gpt-4o-mini")
35
+ client = LLMClient("gpt-4.1-mini")
36
36
  resps = client.process_prompts_sync(["Hello, world!"])
37
- print(resp[0].completion)
37
+ print(resps[0].completion)
38
38
  ```
39
39
 
40
40
  ## Spraying Across Models
@@ -45,13 +45,13 @@ To distribute your requests across models, just provide a list of more than one
45
45
  from lm_deluge import LLMClient
46
46
 
47
47
  client = LLMClient(
48
- ["gpt-4o-mini", "claude-3-haiku"],
48
+ ["gpt-4.1-mini", "claude-4.5-haiku"],
49
49
  max_requests_per_minute=10_000
50
50
  )
51
51
  resps = client.process_prompts_sync(
52
52
  ["Hello, ChatGPT!", "Hello, Claude!"]
53
53
  )
54
- print(resp[0].completion)
54
+ print(resps[0].completion)
55
55
  ```
56
56
 
57
57
  ## Configuration
@@ -105,7 +105,7 @@ Constructing conversations to pass to models is notoriously annoying. Each provi
105
105
  ```python
106
106
  from lm_deluge import Message, Conversation
107
107
 
108
- prompt = Conversation.system("You are a helpful assistant.").add(
108
+ prompt = Conversation().system("You are a helpful assistant.").add(
109
109
  Message.user("What's in this image?").add_image("tests/image.jpg")
110
110
  )
111
111
 
@@ -126,7 +126,7 @@ from lm_deluge import LLMClient, Conversation
126
126
 
127
127
  # Simple file upload
128
128
  client = LLMClient("gpt-4.1-mini")
129
- conversation = Conversation.user(
129
+ conversation = Conversation().user(
130
130
  "Please summarize this document",
131
131
  file="path/to/document.pdf"
132
132
  )
@@ -135,7 +135,7 @@ resps = client.process_prompts_sync([conversation])
135
135
  # You can also create File objects for more control
136
136
  from lm_deluge import File
137
137
  file = File("path/to/report.pdf", filename="Q4_Report.pdf")
138
- conversation = Conversation.user("Analyze this financial report")
138
+ conversation = Conversation().user("Analyze this financial report")
139
139
  conversation.messages[0].parts.append(file)
140
140
  ```
141
141
 
@@ -152,7 +152,7 @@ def get_weather(city: str) -> str:
152
152
  return f"The weather in {city} is sunny and 72°F"
153
153
 
154
154
  tool = Tool.from_function(get_weather)
155
- client = LLMClient("claude-3-haiku")
155
+ client = LLMClient("claude-4.5-haiku")
156
156
  resps = client.process_prompts_sync(
157
157
  ["What's the weather in Paris?"],
158
158
  tools=[tool]
@@ -205,7 +205,7 @@ for tool_call in resps[0].tool_calls:
205
205
  import asyncio
206
206
 
207
207
  async def main():
208
- conv = Conversation.user("List the files in the current directory")
208
+ conv = Conversation().user("List the files in the current directory")
209
209
  conv, resp = await client.run_agent_loop(conv, tools=tools)
210
210
  print(resp.content.completion)
211
211
 
@@ -221,12 +221,12 @@ from lm_deluge import LLMClient, Conversation, Message
221
221
 
222
222
  # Create a conversation with system message
223
223
  conv = (
224
- Conversation.system("You are an expert Python developer with deep knowledge of async programming.")
224
+ Conversation().system("You are an expert Python developer with deep knowledge of async programming.")
225
225
  .add(Message.user("How do I use asyncio.gather?"))
226
226
  )
227
227
 
228
228
  # Use prompt caching to cache system message and tools
229
- client = LLMClient("claude-3-5-sonnet")
229
+ client = LLMClient("claude-4.5-sonnet")
230
230
  resps = client.process_prompts_sync(
231
231
  [conv],
232
232
  cache="system_and_tools" # Cache system message and any tools
@@ -267,7 +267,7 @@ We support structured outputs via `json_mode` parameter provided to `SamplingPar
267
267
 
268
268
  ## Built‑in tools
269
269
 
270
- The `lm_deluge.llm_tools` package exposes a few helper functions:
270
+ The `lm_deluge.pipelines` module exposes a few helper functions that combine LLMClient with prompt and output parsing to accomplish tasks:
271
271
 
272
272
  - `extract` – structure text or images into a Pydantic model based on a schema.
273
273
  - `translate` – translate a list of strings to English.
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "lm_deluge"
6
- version = "0.0.41"
6
+ version = "0.0.106"
7
7
  authors = [{ name = "Benjamin Anderson", email = "ben@trytaylor.ai" }]
8
8
  description = "Python utility for using LLM API models."
9
9
  readme = "README.md"
@@ -15,7 +15,6 @@ dependencies = [
15
15
  "python-dotenv",
16
16
  "json5",
17
17
  "PyYAML",
18
- "pandas",
19
18
  "aiohttp",
20
19
  "tiktoken",
21
20
  "xxhash",
@@ -27,10 +26,20 @@ dependencies = [
27
26
  "lxml",
28
27
  "pdf2image",
29
28
  "pillow",
30
- "fastmcp>=2.4",
31
- "rich",
32
- # "textual>=0.58.0"
29
+ "rich"
33
30
  ]
34
31
 
35
- # [project.scripts]
36
- # deluge = "lm_deluge.cli:main"
32
+ [project.optional-dependencies]
33
+ aws = ["boto3>=1.28.0"]
34
+ docker = ["docker>=7.0.0"]
35
+ full_text_search = ["tantivy>=0.21.0", "lenlp>=0.1.0"]
36
+ sandbox = ["modal>=0.64.0", "daytona-sdk>=0.1.4", "docker>=7.0.0"]
37
+ server = ["fastapi>=0.100.0", "uvicorn>=0.20.0"]
38
+ dev = ["ty", "pre-commit"]
39
+
40
+ [project.scripts]
41
+ deluge = "lm_deluge.cli:main"
42
+ deluge-server = "lm_deluge.server.__main__:main"
43
+
44
+ [tool.setuptools.package-data]
45
+ lm_deluge = ["skill/*.md"]
@@ -0,0 +1,19 @@
1
+ from .client import AgentLoopCallback, APIResponse, LLMClient, SamplingParams
2
+ from .prompt import Conversation, Message, File
3
+ from .tool import Tool, MCPServer, Skill, execute_tool_calls
4
+
5
+ # dotenv.load_dotenv() - don't do this, fucks with other packages
6
+
7
+ __all__ = [
8
+ "LLMClient",
9
+ "SamplingParams",
10
+ "APIResponse",
11
+ "AgentLoopCallback",
12
+ "Conversation",
13
+ "Message",
14
+ "Tool",
15
+ "MCPServer",
16
+ "Skill",
17
+ "File",
18
+ "execute_tool_calls",
19
+ ]