lm-deluge 0.0.67__py3-none-any.whl → 0.0.88__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.

Potentially problematic release.


This version of lm-deluge might be problematic. Click here for more details.

Files changed (92) hide show
  1. lm_deluge/__init__.py +25 -2
  2. lm_deluge/api_requests/anthropic.py +92 -17
  3. lm_deluge/api_requests/base.py +47 -11
  4. lm_deluge/api_requests/bedrock.py +7 -4
  5. lm_deluge/api_requests/chat_reasoning.py +4 -0
  6. lm_deluge/api_requests/gemini.py +138 -18
  7. lm_deluge/api_requests/openai.py +114 -21
  8. lm_deluge/client.py +282 -49
  9. lm_deluge/config.py +15 -3
  10. lm_deluge/mock_openai.py +643 -0
  11. lm_deluge/models/__init__.py +12 -1
  12. lm_deluge/models/anthropic.py +17 -2
  13. lm_deluge/models/arcee.py +16 -0
  14. lm_deluge/models/deepseek.py +36 -4
  15. lm_deluge/models/google.py +29 -0
  16. lm_deluge/models/grok.py +24 -0
  17. lm_deluge/models/kimi.py +36 -0
  18. lm_deluge/models/minimax.py +10 -0
  19. lm_deluge/models/openai.py +100 -0
  20. lm_deluge/models/openrouter.py +86 -8
  21. lm_deluge/models/together.py +11 -0
  22. lm_deluge/models/zai.py +1 -0
  23. lm_deluge/pipelines/gepa/__init__.py +95 -0
  24. lm_deluge/pipelines/gepa/core.py +354 -0
  25. lm_deluge/pipelines/gepa/docs/samples.py +696 -0
  26. lm_deluge/pipelines/gepa/examples/01_synthetic_keywords.py +140 -0
  27. lm_deluge/pipelines/gepa/examples/02_gsm8k_math.py +261 -0
  28. lm_deluge/pipelines/gepa/examples/03_hotpotqa_multihop.py +300 -0
  29. lm_deluge/pipelines/gepa/examples/04_batch_classification.py +271 -0
  30. lm_deluge/pipelines/gepa/examples/simple_qa.py +129 -0
  31. lm_deluge/pipelines/gepa/optimizer.py +435 -0
  32. lm_deluge/pipelines/gepa/proposer.py +235 -0
  33. lm_deluge/pipelines/gepa/util.py +165 -0
  34. lm_deluge/{llm_tools → pipelines}/score.py +2 -2
  35. lm_deluge/{llm_tools → pipelines}/translate.py +5 -3
  36. lm_deluge/prompt.py +224 -40
  37. lm_deluge/request_context.py +7 -2
  38. lm_deluge/tool/__init__.py +1118 -0
  39. lm_deluge/tool/builtin/anthropic/__init__.py +300 -0
  40. lm_deluge/tool/builtin/gemini.py +59 -0
  41. lm_deluge/tool/builtin/openai.py +74 -0
  42. lm_deluge/tool/cua/__init__.py +173 -0
  43. lm_deluge/tool/cua/actions.py +148 -0
  44. lm_deluge/tool/cua/base.py +27 -0
  45. lm_deluge/tool/cua/batch.py +215 -0
  46. lm_deluge/tool/cua/converters.py +466 -0
  47. lm_deluge/tool/cua/kernel.py +702 -0
  48. lm_deluge/tool/cua/trycua.py +989 -0
  49. lm_deluge/tool/prefab/__init__.py +45 -0
  50. lm_deluge/tool/prefab/batch_tool.py +156 -0
  51. lm_deluge/tool/prefab/docs.py +1119 -0
  52. lm_deluge/tool/prefab/email.py +294 -0
  53. lm_deluge/tool/prefab/filesystem.py +1711 -0
  54. lm_deluge/tool/prefab/full_text_search/__init__.py +285 -0
  55. lm_deluge/tool/prefab/full_text_search/tantivy_index.py +396 -0
  56. lm_deluge/tool/prefab/memory.py +458 -0
  57. lm_deluge/tool/prefab/otc/__init__.py +165 -0
  58. lm_deluge/tool/prefab/otc/executor.py +281 -0
  59. lm_deluge/tool/prefab/otc/parse.py +188 -0
  60. lm_deluge/tool/prefab/random.py +212 -0
  61. lm_deluge/tool/prefab/rlm/__init__.py +296 -0
  62. lm_deluge/tool/prefab/rlm/executor.py +349 -0
  63. lm_deluge/tool/prefab/rlm/parse.py +144 -0
  64. lm_deluge/tool/prefab/sandbox.py +1621 -0
  65. lm_deluge/tool/prefab/sheets.py +385 -0
  66. lm_deluge/tool/prefab/subagents.py +233 -0
  67. lm_deluge/tool/prefab/todos.py +342 -0
  68. lm_deluge/tool/prefab/tool_search.py +169 -0
  69. lm_deluge/tool/prefab/web_search.py +199 -0
  70. lm_deluge/tracker.py +16 -13
  71. lm_deluge/util/schema.py +412 -0
  72. lm_deluge/warnings.py +8 -0
  73. {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.88.dist-info}/METADATA +22 -9
  74. lm_deluge-0.0.88.dist-info/RECORD +117 -0
  75. lm_deluge/built_in_tools/anthropic/__init__.py +0 -128
  76. lm_deluge/built_in_tools/openai.py +0 -28
  77. lm_deluge/presets/cerebras.py +0 -17
  78. lm_deluge/presets/meta.py +0 -13
  79. lm_deluge/tool.py +0 -849
  80. lm_deluge-0.0.67.dist-info/RECORD +0 -72
  81. lm_deluge/{llm_tools → pipelines}/__init__.py +1 -1
  82. /lm_deluge/{llm_tools → pipelines}/classify.py +0 -0
  83. /lm_deluge/{llm_tools → pipelines}/extract.py +0 -0
  84. /lm_deluge/{llm_tools → pipelines}/locate.py +0 -0
  85. /lm_deluge/{llm_tools → pipelines}/ocr.py +0 -0
  86. /lm_deluge/{built_in_tools → tool/builtin}/anthropic/bash.py +0 -0
  87. /lm_deluge/{built_in_tools → tool/builtin}/anthropic/computer_use.py +0 -0
  88. /lm_deluge/{built_in_tools → tool/builtin}/anthropic/editor.py +0 -0
  89. /lm_deluge/{built_in_tools → tool/builtin}/base.py +0 -0
  90. {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.88.dist-info}/WHEEL +0 -0
  91. {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.88.dist-info}/licenses/LICENSE +0 -0
  92. {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.88.dist-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.67
3
+ Version: 0.0.88
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
@@ -23,6 +23,19 @@ Requires-Dist: pdf2image
23
23
  Requires-Dist: pillow
24
24
  Requires-Dist: fastmcp>=2.4
25
25
  Requires-Dist: rich
26
+ Provides-Extra: openai
27
+ Requires-Dist: openai>=1.0.0; extra == "openai"
28
+ Provides-Extra: aws
29
+ Requires-Dist: boto3>=1.28.0; extra == "aws"
30
+ Provides-Extra: docker
31
+ Requires-Dist: docker>=7.0.0; extra == "docker"
32
+ Provides-Extra: full-text-search
33
+ Requires-Dist: tantivy>=0.21.0; extra == "full-text-search"
34
+ Requires-Dist: lenlp>=0.1.0; extra == "full-text-search"
35
+ Provides-Extra: sandbox
36
+ Requires-Dist: modal>=0.64.0; extra == "sandbox"
37
+ Requires-Dist: daytona-sdk>=0.1.4; extra == "sandbox"
38
+ Requires-Dist: docker>=7.0.0; extra == "sandbox"
26
39
  Dynamic: license-file
27
40
 
28
41
  # lm-deluge
@@ -50,7 +63,7 @@ Dynamic: license-file
50
63
  pip install lm-deluge
51
64
  ```
52
65
 
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`.
66
+ 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
67
 
55
68
  ## Quickstart
56
69
 
@@ -59,9 +72,9 @@ The package relies on environment variables for API keys. Typical variables incl
59
72
  ```python
60
73
  from lm_deluge import LLMClient
61
74
 
62
- client = LLMClient("gpt-4o-mini")
75
+ client = LLMClient("gpt-4.1-mini")
63
76
  resps = client.process_prompts_sync(["Hello, world!"])
64
- print(resp[0].completion)
77
+ print(resps[0].completion)
65
78
  ```
66
79
 
67
80
  ## Spraying Across Models
@@ -72,13 +85,13 @@ To distribute your requests across models, just provide a list of more than one
72
85
  from lm_deluge import LLMClient
73
86
 
74
87
  client = LLMClient(
75
- ["gpt-4o-mini", "claude-3-haiku"],
88
+ ["gpt-4.1-mini", "claude-4.5-haiku"],
76
89
  max_requests_per_minute=10_000
77
90
  )
78
91
  resps = client.process_prompts_sync(
79
92
  ["Hello, ChatGPT!", "Hello, Claude!"]
80
93
  )
81
- print(resp[0].completion)
94
+ print(resps[0].completion)
82
95
  ```
83
96
 
84
97
  ## Configuration
@@ -179,7 +192,7 @@ def get_weather(city: str) -> str:
179
192
  return f"The weather in {city} is sunny and 72°F"
180
193
 
181
194
  tool = Tool.from_function(get_weather)
182
- client = LLMClient("claude-3-haiku")
195
+ client = LLMClient("claude-4.5-haiku")
183
196
  resps = client.process_prompts_sync(
184
197
  ["What's the weather in Paris?"],
185
198
  tools=[tool]
@@ -253,7 +266,7 @@ conv = (
253
266
  )
254
267
 
255
268
  # Use prompt caching to cache system message and tools
256
- client = LLMClient("claude-3-5-sonnet")
269
+ client = LLMClient("claude-4.5-sonnet")
257
270
  resps = client.process_prompts_sync(
258
271
  [conv],
259
272
  cache="system_and_tools" # Cache system message and any tools
@@ -294,7 +307,7 @@ We support structured outputs via `json_mode` parameter provided to `SamplingPar
294
307
 
295
308
  ## Built‑in tools
296
309
 
297
- The `lm_deluge.llm_tools` package exposes a few helper functions:
310
+ The `lm_deluge.pipelines` module exposes a few helper functions that combine LLMClient with prompt and output parsing to accomplish tasks:
298
311
 
299
312
  - `extract` – structure text or images into a Pydantic model based on a schema.
300
313
  - `translate` – translate a list of strings to English.
@@ -0,0 +1,117 @@
1
+ lm_deluge/__init__.py,sha256=ye2mm-8r9bveEAMWyV13F6APAu2cNzHROU0LOULyPfY,792
2
+ lm_deluge/batches.py,sha256=Km6QM5_7BlF2qEyo4WPlhkaZkpzrLqf50AaveHXQOoY,25127
3
+ lm_deluge/cache.py,sha256=xO2AIYvP3tUpTMKQjwQQYfGRJSRi6e7sMlRhLjsS-u4,4873
4
+ lm_deluge/cli.py,sha256=Ilww5gOw3J5v0NReq_Ra4hhxU4BCIJBl1oTGxJZKedc,12065
5
+ lm_deluge/client.py,sha256=gsmb3LlsiffAfohtHzMzY-5JvYdCFe6zUzUZaOJteMo,49440
6
+ lm_deluge/config.py,sha256=Fh7hL0A7HS3zIXd7pkv2Gewkjf1h31QZmCscL1q1yRc,1380
7
+ lm_deluge/embed.py,sha256=CO-TOlC5kOTAM8lcnicoG4u4K664vCBwHF1vHa-nAGg,13382
8
+ lm_deluge/errors.py,sha256=oHjt7YnxWbh-eXMScIzov4NvpJMo0-2r5J6Wh5DQ1tk,209
9
+ lm_deluge/file.py,sha256=PTmlJQ-IaYcYUFun9V0bJ1NPVP84edJrR0hvCMWFylY,19697
10
+ lm_deluge/image.py,sha256=5AMXmn2x47yXeYNfMSMAOWcnlrOxxOel-4L8QCJwU70,8928
11
+ lm_deluge/mock_openai.py,sha256=-u4kxSzwoxDt_2fLh5LaiqETnu0Jg_VDL7TWAAYHGNw,21762
12
+ lm_deluge/prompt.py,sha256=aOHNDGQv9UEpyxTLFkMvnpAOef_Yh1XDmgB__vQeH6Y,71763
13
+ lm_deluge/request_context.py,sha256=CX15dT4Jxz77C-w5EKNyJCfYEa69wNKHbfNi47iG8W4,2771
14
+ lm_deluge/rerank.py,sha256=-NBAJdHz9OB-SWWJnHzkFmeVO4wR6lFV7Vw-SxG7aVo,11457
15
+ lm_deluge/tracker.py,sha256=B53KIsrK10L9L73cYbVB2pNSC0-FdvJGpIfw735CvaA,14808
16
+ lm_deluge/usage.py,sha256=xz9tAw2hqaJvv9aAVhnQ6N1Arn7fS8Shb28VwCW26wI,5136
17
+ lm_deluge/warnings.py,sha256=mLAZRbsRmT7XjgMRvztEWdtCGsgiAamTdHZ-toi8hUY,2614
18
+ lm_deluge/api_requests/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
19
+ lm_deluge/api_requests/anthropic.py,sha256=U6sFSKT6Op6roIPGinNxlBHz7HFfRUELmv-vsS_1hiE,11975
20
+ lm_deluge/api_requests/base.py,sha256=05j5nrZhgNon2YRFXT_L-yVXKlvdodwOJan6Z6WpSp8,10911
21
+ lm_deluge/api_requests/bedrock.py,sha256=mY1xTvgfCLyqLlfFFmu_baKgkVq1Df1_MJXeN_G1jWQ,15597
22
+ lm_deluge/api_requests/chat_reasoning.py,sha256=sJvstvKFqsSBUjYcwxzGt2_FH4cEp3Z6gKcBPyPjGwk,236
23
+ lm_deluge/api_requests/common.py,sha256=BZ3vRO5TB669_UsNKugkkuFSzoLHOYJIKt4nV4sf4vc,422
24
+ lm_deluge/api_requests/gemini.py,sha256=_L1V1O7N70rvnp28kXfCaWXluQXEBfMbvSk3S7SrZcI,12730
25
+ lm_deluge/api_requests/mistral.py,sha256=8JZP2CDf1XZfaPcTk0WS4q-VfYYj58ptpoH8LD3MQG4,4528
26
+ lm_deluge/api_requests/openai.py,sha256=cEoMpMPKrVTz2Zjm5pdD8sQpOHDB9O8ndwf9TGqLPcA,29889
27
+ lm_deluge/api_requests/response.py,sha256=vG194gAH5p7ulpNy4qy5Pryfb1p3ZV21-YGoj__ru3E,7436
28
+ lm_deluge/api_requests/deprecated/bedrock.py,sha256=WrcIShCoO8JCUSlFOCHxg6KQCNTZfw3TpYTvSpYk4mA,11320
29
+ lm_deluge/api_requests/deprecated/cohere.py,sha256=KgDScD6_bWhAzOY5BHZQKSA3kurt4KGENqC4wLsGmcU,5142
30
+ lm_deluge/api_requests/deprecated/deepseek.py,sha256=FEApI93VAWDwuaqTooIyKMgONYqRhdUmiAPBRme-IYs,4582
31
+ lm_deluge/api_requests/deprecated/mistral.py,sha256=pOfOZUM4U35I3Plch84SnAFpDAzouHcSNNMtgxRvjy4,4709
32
+ lm_deluge/api_requests/deprecated/vertex.py,sha256=ygXz2RjdXErPCSBbiHLEWbf5_sSTIi31WoX0UaoYzRI,15275
33
+ lm_deluge/models/__init__.py,sha256=_xygx3WwtWbLNmczz7Isl8xwfiVnl8D_4PJwYG-Ya10,4855
34
+ lm_deluge/models/anthropic.py,sha256=X92EYIapos-8LXnIYiypPJcFhI0tqmXja_w8e9H4CF8,6781
35
+ lm_deluge/models/arcee.py,sha256=4OI8eA8RoA-zYww4fWwhVZDFWB2Kd4-KQTTPl9r3Ay4,465
36
+ lm_deluge/models/bedrock.py,sha256=g1PbfceSRH2lWST3ja0mUlF3oTq4e4T-si6RMe7qXgg,4888
37
+ lm_deluge/models/cerebras.py,sha256=u2FMXJF6xMr0euDRKLKMo_NVTOcvSrrEpehbHr8sSeE,2050
38
+ lm_deluge/models/cohere.py,sha256=iXjYtM6jy_YL73Op8OfNsrMNopwae9y-Sw-4vF9cEBw,3406
39
+ lm_deluge/models/deepseek.py,sha256=b5t_ep6fE-2cKD2mmImBaLcJUbYrfizYnjG96sfKNTk,2072
40
+ lm_deluge/models/fireworks.py,sha256=yvt2Ggzye4aUqCqY74ta67Vu7FrQaLFjdFtN4P7D-dc,638
41
+ lm_deluge/models/google.py,sha256=IDePlNOvF0lvpv3UhkUD8g30TUJqoaJHQGzTglyGg80,6560
42
+ lm_deluge/models/grok.py,sha256=rSvN3fKiO_WPNa5O_TzVTDj9-RqqjeXFBiC9OAcGZ4Q,3340
43
+ lm_deluge/models/groq.py,sha256=Mi5WE1xOBGoZlymD0UN6kzhH_NOmfJYU4N2l-TO0Z8Q,2552
44
+ lm_deluge/models/kimi.py,sha256=B_ZL4_0q6hS1VVskBWlBR569nNSjC8RgA2lj1eCjRRE,1183
45
+ lm_deluge/models/meta.py,sha256=BBgnscL1gMcIdPbRqrlDl_q9YAYGSrkw9JkAIabXtLs,1883
46
+ lm_deluge/models/minimax.py,sha256=rwW9gNotAYfDVtMlqmSYegN6GoZM_9DSNNZU2yPOmaU,275
47
+ lm_deluge/models/mistral.py,sha256=x67o5gckBGmPcIGdVbS26XZAYFKBYM4tsxEAahGp8bk,4323
48
+ lm_deluge/models/openai.py,sha256=ihSBjuu1QEn-voxEmDUgKn82AuDxrtRCJvFdj-XEZmU,14280
49
+ lm_deluge/models/openrouter.py,sha256=Wf0NZcuU8_SA4mYlNNez_yS7NUK4ljYbEtMJYaIE5i0,4819
50
+ lm_deluge/models/together.py,sha256=wrGs4wO65on-dSlU9AARAA-rc4GDuWkidPjRQ7GScNg,4749
51
+ lm_deluge/models/zai.py,sha256=BIde8TwjvmkfEi-6bSSBSFIh7KVnlJ7_aNdlqNZRGGI,16
52
+ lm_deluge/pipelines/__init__.py,sha256=U97UmEq4iQKPDH83xA5PztpRBQtXzITtG1A6PaDeyG0,231
53
+ lm_deluge/pipelines/classify.py,sha256=OdMwV5u4XoPlVhjOHX0sng5KPBIKFJmQeOE2fmnPgLU,21
54
+ lm_deluge/pipelines/extract.py,sha256=p61JW8yv5gQxPp4P8Hkm90ERgfD_Ek5IABzjIIlX-M0,4631
55
+ lm_deluge/pipelines/locate.py,sha256=lYNbKTmy9dTvj0lEQkOQ7yrxyqsgYzjD0C_byJKI_4w,6271
56
+ lm_deluge/pipelines/ocr.py,sha256=7fDlvs6uUOvbxMasvGGNJx5Fj6biM6z3lijKZaGN26k,23
57
+ lm_deluge/pipelines/score.py,sha256=hkLMroJMfQ92HPlTBNOHrDRtvdYUBWK0MBlhOfvFTMk,2582
58
+ lm_deluge/pipelines/translate.py,sha256=v_OvBQA2RB-QcWf0aopKHpYc2PDmckxzJGSmSuUX3Sw,1461
59
+ lm_deluge/pipelines/gepa/__init__.py,sha256=PZSch82ulEUEZscEYhsII7mr78ePlraaJM5ZJrQDk_0,2843
60
+ lm_deluge/pipelines/gepa/core.py,sha256=1KyJBF51H_EYxEx2KI3DewJfhqyV04dYm9iPuoOh4m4,10978
61
+ lm_deluge/pipelines/gepa/optimizer.py,sha256=T44RGSsv4uE8qb4ZfXJ7H4aausTvKsVnH8mlzb1dWpc,14803
62
+ lm_deluge/pipelines/gepa/proposer.py,sha256=EqA56kgg9M4A6qX5gBmQh_tsVH9NVkvUdcXoKCMvDAU,6709
63
+ lm_deluge/pipelines/gepa/util.py,sha256=PCrARH_pYGNSZa9aUmfTzFmGW2PPN50fQGf10E_yTeE,4909
64
+ lm_deluge/pipelines/gepa/docs/samples.py,sha256=VSDDhr2UiC9wqV-UweUZPTyBYy8hqpfLpEscoESwbwY,24305
65
+ lm_deluge/pipelines/gepa/examples/01_synthetic_keywords.py,sha256=wVy8OUuR4DAobb3ZCVO9-_sPbFVhdnUpnbradqsWKrA,4415
66
+ lm_deluge/pipelines/gepa/examples/02_gsm8k_math.py,sha256=7ri3IyzkNxizyi8NmOwvGsT2OBOOFKW2iehuHPLbDgA,7690
67
+ lm_deluge/pipelines/gepa/examples/03_hotpotqa_multihop.py,sha256=YmGMsaEKOfX_2Bzc2XH9iOXDA5w_mmxjThAvxLv1sdg,8843
68
+ lm_deluge/pipelines/gepa/examples/04_batch_classification.py,sha256=_-SlQrV4o9EYOr5uXJqJAyVbzPCasKCK-ZqB_0nF4hg,7918
69
+ lm_deluge/pipelines/gepa/examples/simple_qa.py,sha256=RH1kcV4G16FUXVokLKn3ufRRj_C4qYSwyRxJykKwwmA,4366
70
+ lm_deluge/tool/__init__.py,sha256=_GD2RAK0wYnKsAPdrM2w8X4xKtugBEm-eSZTboGRL9s,40260
71
+ lm_deluge/tool/builtin/base.py,sha256=FLYdKVAqlffA6WOu4j8wQVRd0iHMsyBW_T3vfl--aXo,276
72
+ lm_deluge/tool/builtin/gemini.py,sha256=uKrzzEZ0RO5EHddYYFvRKoMk7O6YOSWFDojhzbpQSfs,1724
73
+ lm_deluge/tool/builtin/openai.py,sha256=a6Y4TX_iqghDTnbL-HeFeVGq1nRdBosYJcLZzfCTy9g,2499
74
+ lm_deluge/tool/builtin/anthropic/__init__.py,sha256=U-5VdcRS_ITjTBCoFoeABZOoG4nfBTgRvhT5eo1UY1g,10675
75
+ lm_deluge/tool/builtin/anthropic/bash.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
+ lm_deluge/tool/builtin/anthropic/computer_use.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
+ lm_deluge/tool/builtin/anthropic/editor.py,sha256=DyC_DrHVTm1khU9QDL39vBuhu4tO5mS5H7xMRIT0Ng4,23327
78
+ lm_deluge/tool/cua/__init__.py,sha256=HDXXwCqPRNm_-Wh6JCsIT89CYwioHdRSZcu2WQWYaCo,4756
79
+ lm_deluge/tool/cua/actions.py,sha256=ZeQheCJ9F5nHLu3teL14_qr8mr4UuaR78EhgrvYw_G8,3191
80
+ lm_deluge/tool/cua/base.py,sha256=DwOTHp8AGu5-ZRzg_6RdOu9Bh4cgAbK5EMPEusJlDrI,799
81
+ lm_deluge/tool/cua/batch.py,sha256=ddYHbg72y4e62G6-B6BMM1SNq5zI9WYsnC6jzKNJiOU,7312
82
+ lm_deluge/tool/cua/converters.py,sha256=O1wO4u_78ZZNBrXuyjh4vZreYckhh-e3J304C-d6uOA,13741
83
+ lm_deluge/tool/cua/kernel.py,sha256=8klzaCTBB-4yYvZTzroi-t5ABNX81jAjc5uCCKG3Kvc,25654
84
+ lm_deluge/tool/cua/trycua.py,sha256=SvdA5DkAVweegQ3r_SI_AbKKX242mFOxsBDf5CNiRkY,36954
85
+ lm_deluge/tool/prefab/__init__.py,sha256=TWxzXA91nBwhUM0hhogGklauRobSLtHAQzQl4xzn1D4,1170
86
+ lm_deluge/tool/prefab/batch_tool.py,sha256=VTMoW7ImQYmeDHrbB4BKSw3WeHXhsjp9XqFHz4ytjcc,5584
87
+ lm_deluge/tool/prefab/docs.py,sha256=5X3EVUH4ws72og4TxDpgIjN3clroqUsR1Wx8fIuQWd0,41566
88
+ lm_deluge/tool/prefab/email.py,sha256=OHZEMAw90Bb5UusGw_3ltKZBc2bShWDEDkRQCzSkRd4,10568
89
+ lm_deluge/tool/prefab/filesystem.py,sha256=AvPWr1GmZBp0nMamNRDf0cfQYu33mLLUvHNUrHncQWk,59473
90
+ lm_deluge/tool/prefab/memory.py,sha256=FH3RkossG_3TqlZf6ZULPJCIBwiVfLXdYHql17O1zPg,16402
91
+ lm_deluge/tool/prefab/random.py,sha256=Q6DqvorcHE82rqn9jAofyz32MUQGCfmlx_7Kc04CDFk,6695
92
+ lm_deluge/tool/prefab/sandbox.py,sha256=YF3-k-WJ5SpIzozOtLmazqx3lKvNOsZxKpiVdDvNurc,57572
93
+ lm_deluge/tool/prefab/sheets.py,sha256=RhH4PgRI4E6WYKfJpScflT7HtAULvp88ZA94NmJyEn4,13632
94
+ lm_deluge/tool/prefab/subagents.py,sha256=srJ7On7YR0Y8WuNvf5TJl_7IUfEtG3zlxZeLgmn_-NI,8484
95
+ lm_deluge/tool/prefab/todos.py,sha256=mrtv68uRc-grc0xKP6xKpfPSA2yXYU7FLNy6fDzEbG8,14902
96
+ lm_deluge/tool/prefab/tool_search.py,sha256=EJL5R5BgnO6owspk7F01Yzr8C9q9oJqmfMrWBjLE_bA,6151
97
+ lm_deluge/tool/prefab/web_search.py,sha256=TQ_-WK6axCG38qInm5bLVEywHfu2sAq-DGIIl1H0Hzw,6255
98
+ lm_deluge/tool/prefab/full_text_search/__init__.py,sha256=ScWuXl7sd1HLPUcQjmsCmh2onaGSBf53wvv7M0voTZI,9411
99
+ lm_deluge/tool/prefab/full_text_search/tantivy_index.py,sha256=jyR8XoxvR9IVporxsBq24kOVTWEm6Bvt69KX8y63nYg,14109
100
+ lm_deluge/tool/prefab/otc/__init__.py,sha256=33AcwAt9ycECxonnvkcyh13w9Sr2Cbs6OOlBjzBvl54,6373
101
+ lm_deluge/tool/prefab/otc/executor.py,sha256=4IROA_0un3HaV4GK7r4vQiVxJvcoHkqVii-4asGH-Cw,10508
102
+ lm_deluge/tool/prefab/otc/parse.py,sha256=lSAtez-pBFcJVQMW2evRvV9KlduRtPevzGCEB1fmUMo,4517
103
+ lm_deluge/tool/prefab/rlm/__init__.py,sha256=8Y5Ng1YjVGUptznNbIAWdFO2XZsy7aAezg2alySt4Yw,10198
104
+ lm_deluge/tool/prefab/rlm/executor.py,sha256=bpVxXfRjgkH16D1IXSfvWPV5NXpmYUOrkj3ztam5Hjg,11907
105
+ lm_deluge/tool/prefab/rlm/parse.py,sha256=nzDXTe-X-Pz3nI6JHml_4Wlj_2t-UMAf3PJLG-J0CFU,4507
106
+ lm_deluge/util/harmony.py,sha256=XBfJck6q-5HbOqMhEjdfy1i17i0QtpHG8ruXV4EsHl0,2731
107
+ lm_deluge/util/json.py,sha256=_4Oar2Cmz2L1DK3EtPLPDxD6rsYHxjROmV8ZpmMjQ-4,5822
108
+ lm_deluge/util/logprobs.py,sha256=UkBZakOxWluaLqHrjARu7xnJ0uCHVfLGHJdnYlEcutk,11768
109
+ lm_deluge/util/schema.py,sha256=q6uwhA4s1lM2dHT1Kwc46E7OY1VecMOtTEI0PTFn6tA,13206
110
+ lm_deluge/util/spatial.py,sha256=BsF_UKhE-x0xBirc-bV1xSKZRTUhsOBdGqsMKme20C8,4099
111
+ lm_deluge/util/validation.py,sha256=hz5dDb3ebvZrZhnaWxOxbNSVMI6nmaOODBkk0htAUhs,1575
112
+ lm_deluge/util/xml.py,sha256=Ft4zajoYBJR3HHCt2oHwGfymGLdvp_gegVmJ-Wqk4Ck,10547
113
+ lm_deluge-0.0.88.dist-info/licenses/LICENSE,sha256=uNNXGXPCw2TC7CUs7SEBkA-Mz6QBQFWUUEWDMgEs1dU,1058
114
+ lm_deluge-0.0.88.dist-info/METADATA,sha256=SNJZGw7OHpfMUVG5CvYyeBQ0lNiLUg1FbZis2XXj2eg,14057
115
+ lm_deluge-0.0.88.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
116
+ lm_deluge-0.0.88.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
117
+ lm_deluge-0.0.88.dist-info/RECORD,,
@@ -1,128 +0,0 @@
1
- from typing import Literal
2
-
3
- # from lm_deluge.prompt import ToolCall
4
-
5
- ToolVersion = Literal["2024-10-22", "2025-01-24", "2025-04-29"]
6
- ToolType = Literal["bash", "computer", "editor"]
7
-
8
-
9
- def model_to_version(model: str) -> ToolVersion:
10
- if "opus" not in model and "sonnet" not in model:
11
- raise ValueError("cannot use computer tools with incompatible model")
12
- if "claude-4" in model:
13
- return "2025-04-29"
14
- elif "3.7" in model:
15
- return "2025-01-24"
16
- elif "3.6" in model:
17
- return "2024-10-22"
18
- else:
19
- raise ValueError("unsupported model for anthropic CUA")
20
-
21
-
22
- def get_anthropic_cu_tools(
23
- model: str,
24
- display_width: int = 1024,
25
- display_height: int = 768,
26
- exclude_tools: list[ToolType] | None = None,
27
- ):
28
- version = model_to_version(model)
29
- if version == "2024-10-22":
30
- result = [
31
- {
32
- "name": "computer",
33
- "type": "computer_20241022",
34
- "display_width_px": display_width,
35
- "display_height_px": display_height,
36
- "display_number": None,
37
- },
38
- {"name": "str_replace_editor", "type": "text_editor_20241022"},
39
- {"name": "bash", "type": "bash_20241022"},
40
- ]
41
- elif version == "2025-01-24":
42
- result = [
43
- {
44
- "name": "computer",
45
- "type": "computer_20250124",
46
- "display_width_px": display_width,
47
- "display_height_px": display_height,
48
- "display_number": None,
49
- },
50
- {"name": "str_replace_editor", "type": "text_editor_20250124"},
51
- {"type": "bash_20250124", "name": "bash"},
52
- ]
53
- elif version == "2025-04-29":
54
- result = [
55
- {
56
- "name": "computer",
57
- "type": "computer_20250124",
58
- "display_width_px": display_width,
59
- "display_height_px": display_height,
60
- "display_number": None,
61
- },
62
- {"name": "str_replace_based_edit_tool", "type": "text_editor_20250429"},
63
- {
64
- "name": "bash",
65
- "type": "bash_20250124",
66
- },
67
- ]
68
- else:
69
- raise ValueError("invalid tool version")
70
-
71
- if exclude_tools is None:
72
- return result
73
- if "bash" in exclude_tools:
74
- result = [x for x in result if x["name"] != "bash"]
75
- if "editor" in exclude_tools:
76
- result = [x for x in result if "edit" not in x["name"]]
77
- if "computer" in exclude_tools:
78
- result = [x for x in result if "computer" not in x["name"]]
79
- return result
80
-
81
-
82
- def bash_tool(model: str = "claude-4-sonnet"):
83
- # Claude Sonnet 3.5 requires the computer-use-2024-10-22 beta header when using the bash tool.
84
- # The bash tool is generally available in Claude 4 and Sonnet 3.7.
85
- if "claude-4" in model:
86
- return {"type": "text_editor_20250429", "name": "str_replace_based_edit_tool"}
87
- elif "3.7" in model:
88
- return {"type": "text_editor_20250124", "name": "str_replace_editor"}
89
- else:
90
- return {"type": "text_editor_20241022", "name": "str_replace_editor"}
91
-
92
-
93
- def text_editor_tool(model: str = "claude-4-sonnet"):
94
- if "claude-4" in model:
95
- return {"type": "bash_20250124", "name": "bash"}
96
- elif "3.7" in model:
97
- return {"type": "bash_20250124", "name": "bash"}
98
- else:
99
- return {"type": "bash_20241022", "name": "bash"}
100
-
101
-
102
- def web_search_tool(max_uses: int = 5):
103
- res = {
104
- "type": "web_search_20250305",
105
- "name": "web_search",
106
- # Optional: Limit the number of searches per request
107
- "max_uses": max_uses,
108
- # You can use either allowed_domains or blocked_domains, but not both in the same request.
109
- # Optional: Only include results from these domains
110
- # "allowed_domains": ["example.com", "trusteddomain.org"],
111
- # Optional: Never include results from these domains
112
- # "blocked_domains": ["untrustedsource.com"],
113
- # Optional: Localize search results
114
- # "user_location": {
115
- # "type": "approximate",
116
- # "city": "San Francisco",
117
- # "region": "California",
118
- # "country": "US",
119
- # "timezone": "America/Los_Angeles"
120
- # }
121
- }
122
- return res
123
-
124
-
125
- def code_execution_tool():
126
- # The code execution tool is currently in beta.
127
- # This feature requires the beta header: "anthropic-beta": "code-execution-2025-05-22"
128
- return {"type": "code_execution_20250522", "name": "code_execution"}
@@ -1,28 +0,0 @@
1
- def image_generation_openai():
2
- # TODO: handle result properly
3
- return {"type": "image_generation"}
4
-
5
-
6
- def code_interpreter_openai(container: dict | None = None):
7
- if container is None:
8
- container = {"type": "auto"}
9
- return {"type": "code_interpreter", "container": container}
10
-
11
-
12
- def local_shell_openai():
13
- return {"type": "local_shell"}
14
-
15
-
16
- def web_search_openai():
17
- return {"type": "web_search_preview"}
18
-
19
-
20
- def computer_use_openai(
21
- display_width: int = 1024, display_height: int = 768, environment: str = "browser"
22
- ):
23
- return {
24
- "type": "computer_use_preview",
25
- "display_width": display_width,
26
- "display_height": display_height,
27
- "environment": environment,
28
- }
@@ -1,17 +0,0 @@
1
- from lm_deluge import LLMClient
2
-
3
- mixture_of_cerebras = LLMClient(
4
- [
5
- "gpt-oss-120b-cerebras",
6
- "llama-4-scout-cerebras",
7
- "llama-3.3-70b-cerebras",
8
- "qwen-3-32b-cerebras",
9
- "llama-4-maverick-cerebras",
10
- "qwen-3-235b-instruct-cerebras",
11
- "qwen-3-235b-thinking-cerebras",
12
- "qwen-3-coder-cerebras",
13
- ],
14
- model_weights=[3, 3, 3, 3, 3, 3, 3, 1],
15
- max_requests_per_minute=250,
16
- max_tokens_per_minute=1_000_000,
17
- )
lm_deluge/presets/meta.py DELETED
@@ -1,13 +0,0 @@
1
- from lm_deluge import LLMClient
2
-
3
- mixture_of_llamas = LLMClient(
4
- ["llama-4-scout", "llama-4-maverick", "llama-3.3-70b", "llama-3.3-8b"],
5
- max_requests_per_minute=12_000,
6
- max_tokens_per_minute=4_000_000,
7
- )
8
-
9
- multimodal_llamas = LLMClient(
10
- ["llama-4-scout", "llama-4-maverick"],
11
- max_requests_per_minute=6_000,
12
- max_tokens_per_minute=2_000_000,
13
- )