lm-deluge 0.0.67__py3-none-any.whl → 0.0.90__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 (108) hide show
  1. lm_deluge/__init__.py +1 -2
  2. lm_deluge/api_requests/anthropic.py +117 -22
  3. lm_deluge/api_requests/base.py +84 -11
  4. lm_deluge/api_requests/bedrock.py +30 -6
  5. lm_deluge/api_requests/chat_reasoning.py +4 -0
  6. lm_deluge/api_requests/gemini.py +166 -20
  7. lm_deluge/api_requests/openai.py +145 -25
  8. lm_deluge/batches.py +15 -45
  9. lm_deluge/client.py +309 -50
  10. lm_deluge/config.py +15 -3
  11. lm_deluge/models/__init__.py +14 -1
  12. lm_deluge/models/anthropic.py +29 -14
  13. lm_deluge/models/arcee.py +16 -0
  14. lm_deluge/models/deepseek.py +36 -4
  15. lm_deluge/models/google.py +42 -0
  16. lm_deluge/models/grok.py +24 -0
  17. lm_deluge/models/kimi.py +36 -0
  18. lm_deluge/models/minimax.py +18 -0
  19. lm_deluge/models/openai.py +100 -0
  20. lm_deluge/models/openrouter.py +133 -7
  21. lm_deluge/models/together.py +11 -0
  22. lm_deluge/models/zai.py +50 -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 +705 -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 +537 -88
  37. lm_deluge/request_context.py +7 -2
  38. lm_deluge/server/__init__.py +24 -0
  39. lm_deluge/server/__main__.py +144 -0
  40. lm_deluge/server/adapters.py +369 -0
  41. lm_deluge/server/app.py +388 -0
  42. lm_deluge/server/auth.py +71 -0
  43. lm_deluge/server/model_policy.py +215 -0
  44. lm_deluge/server/models_anthropic.py +172 -0
  45. lm_deluge/server/models_openai.py +175 -0
  46. lm_deluge/tool/__init__.py +1130 -0
  47. lm_deluge/tool/builtin/anthropic/__init__.py +300 -0
  48. lm_deluge/tool/builtin/anthropic/bash.py +0 -0
  49. lm_deluge/tool/builtin/anthropic/computer_use.py +0 -0
  50. lm_deluge/tool/builtin/gemini.py +59 -0
  51. lm_deluge/tool/builtin/openai.py +74 -0
  52. lm_deluge/tool/cua/__init__.py +173 -0
  53. lm_deluge/tool/cua/actions.py +148 -0
  54. lm_deluge/tool/cua/base.py +27 -0
  55. lm_deluge/tool/cua/batch.py +215 -0
  56. lm_deluge/tool/cua/converters.py +466 -0
  57. lm_deluge/tool/cua/kernel.py +702 -0
  58. lm_deluge/tool/cua/trycua.py +989 -0
  59. lm_deluge/tool/prefab/__init__.py +45 -0
  60. lm_deluge/tool/prefab/batch_tool.py +156 -0
  61. lm_deluge/tool/prefab/docs.py +1119 -0
  62. lm_deluge/tool/prefab/email.py +294 -0
  63. lm_deluge/tool/prefab/filesystem.py +1711 -0
  64. lm_deluge/tool/prefab/full_text_search/__init__.py +285 -0
  65. lm_deluge/tool/prefab/full_text_search/tantivy_index.py +396 -0
  66. lm_deluge/tool/prefab/memory.py +458 -0
  67. lm_deluge/tool/prefab/otc/__init__.py +165 -0
  68. lm_deluge/tool/prefab/otc/executor.py +281 -0
  69. lm_deluge/tool/prefab/otc/parse.py +188 -0
  70. lm_deluge/tool/prefab/random.py +212 -0
  71. lm_deluge/tool/prefab/rlm/__init__.py +296 -0
  72. lm_deluge/tool/prefab/rlm/executor.py +349 -0
  73. lm_deluge/tool/prefab/rlm/parse.py +144 -0
  74. lm_deluge/tool/prefab/sandbox/__init__.py +19 -0
  75. lm_deluge/tool/prefab/sandbox/daytona_sandbox.py +483 -0
  76. lm_deluge/tool/prefab/sandbox/docker_sandbox.py +609 -0
  77. lm_deluge/tool/prefab/sandbox/fargate_sandbox.py +546 -0
  78. lm_deluge/tool/prefab/sandbox/modal_sandbox.py +469 -0
  79. lm_deluge/tool/prefab/sandbox/seatbelt_sandbox.py +827 -0
  80. lm_deluge/tool/prefab/sheets.py +385 -0
  81. lm_deluge/tool/prefab/skills.py +0 -0
  82. lm_deluge/tool/prefab/subagents.py +233 -0
  83. lm_deluge/tool/prefab/todos.py +342 -0
  84. lm_deluge/tool/prefab/tool_search.py +169 -0
  85. lm_deluge/tool/prefab/web_search.py +199 -0
  86. lm_deluge/tracker.py +16 -13
  87. lm_deluge/util/schema.py +412 -0
  88. lm_deluge/warnings.py +8 -0
  89. {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.90.dist-info}/METADATA +23 -9
  90. lm_deluge-0.0.90.dist-info/RECORD +132 -0
  91. lm_deluge/built_in_tools/anthropic/__init__.py +0 -128
  92. lm_deluge/built_in_tools/openai.py +0 -28
  93. lm_deluge/presets/cerebras.py +0 -17
  94. lm_deluge/presets/meta.py +0 -13
  95. lm_deluge/tool.py +0 -849
  96. lm_deluge-0.0.67.dist-info/RECORD +0 -72
  97. lm_deluge/{llm_tools → pipelines}/__init__.py +1 -1
  98. /lm_deluge/{llm_tools → pipelines}/classify.py +0 -0
  99. /lm_deluge/{llm_tools → pipelines}/extract.py +0 -0
  100. /lm_deluge/{llm_tools → pipelines}/locate.py +0 -0
  101. /lm_deluge/{llm_tools → pipelines}/ocr.py +0 -0
  102. /lm_deluge/{built_in_tools/anthropic/bash.py → skills/anthropic.py} +0 -0
  103. /lm_deluge/{built_in_tools/anthropic/computer_use.py → skills/compat.py} +0 -0
  104. /lm_deluge/{built_in_tools → tool/builtin}/anthropic/editor.py +0 -0
  105. /lm_deluge/{built_in_tools → tool/builtin}/base.py +0 -0
  106. {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.90.dist-info}/WHEEL +0 -0
  107. {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.90.dist-info}/licenses/LICENSE +0 -0
  108. {lm_deluge-0.0.67.dist-info → lm_deluge-0.0.90.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.90
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,20 @@ Requires-Dist: pdf2image
23
23
  Requires-Dist: pillow
24
24
  Requires-Dist: fastmcp>=2.4
25
25
  Requires-Dist: rich
26
+ Provides-Extra: aws
27
+ Requires-Dist: boto3>=1.28.0; extra == "aws"
28
+ Provides-Extra: docker
29
+ Requires-Dist: docker>=7.0.0; extra == "docker"
30
+ Provides-Extra: full-text-search
31
+ Requires-Dist: tantivy>=0.21.0; extra == "full-text-search"
32
+ Requires-Dist: lenlp>=0.1.0; extra == "full-text-search"
33
+ Provides-Extra: sandbox
34
+ Requires-Dist: modal>=0.64.0; extra == "sandbox"
35
+ Requires-Dist: daytona-sdk>=0.1.4; extra == "sandbox"
36
+ Requires-Dist: docker>=7.0.0; extra == "sandbox"
37
+ Provides-Extra: server
38
+ Requires-Dist: fastapi>=0.100.0; extra == "server"
39
+ Requires-Dist: uvicorn>=0.20.0; extra == "server"
26
40
  Dynamic: license-file
27
41
 
28
42
  # lm-deluge
@@ -50,7 +64,7 @@ Dynamic: license-file
50
64
  pip install lm-deluge
51
65
  ```
52
66
 
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`.
67
+ 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
68
 
55
69
  ## Quickstart
56
70
 
@@ -59,9 +73,9 @@ The package relies on environment variables for API keys. Typical variables incl
59
73
  ```python
60
74
  from lm_deluge import LLMClient
61
75
 
62
- client = LLMClient("gpt-4o-mini")
76
+ client = LLMClient("gpt-4.1-mini")
63
77
  resps = client.process_prompts_sync(["Hello, world!"])
64
- print(resp[0].completion)
78
+ print(resps[0].completion)
65
79
  ```
66
80
 
67
81
  ## Spraying Across Models
@@ -72,13 +86,13 @@ To distribute your requests across models, just provide a list of more than one
72
86
  from lm_deluge import LLMClient
73
87
 
74
88
  client = LLMClient(
75
- ["gpt-4o-mini", "claude-3-haiku"],
89
+ ["gpt-4.1-mini", "claude-4.5-haiku"],
76
90
  max_requests_per_minute=10_000
77
91
  )
78
92
  resps = client.process_prompts_sync(
79
93
  ["Hello, ChatGPT!", "Hello, Claude!"]
80
94
  )
81
- print(resp[0].completion)
95
+ print(resps[0].completion)
82
96
  ```
83
97
 
84
98
  ## Configuration
@@ -179,7 +193,7 @@ def get_weather(city: str) -> str:
179
193
  return f"The weather in {city} is sunny and 72°F"
180
194
 
181
195
  tool = Tool.from_function(get_weather)
182
- client = LLMClient("claude-3-haiku")
196
+ client = LLMClient("claude-4.5-haiku")
183
197
  resps = client.process_prompts_sync(
184
198
  ["What's the weather in Paris?"],
185
199
  tools=[tool]
@@ -253,7 +267,7 @@ conv = (
253
267
  )
254
268
 
255
269
  # Use prompt caching to cache system message and tools
256
- client = LLMClient("claude-3-5-sonnet")
270
+ client = LLMClient("claude-4.5-sonnet")
257
271
  resps = client.process_prompts_sync(
258
272
  [conv],
259
273
  cache="system_and_tools" # Cache system message and any tools
@@ -294,7 +308,7 @@ We support structured outputs via `json_mode` parameter provided to `SamplingPar
294
308
 
295
309
  ## Built‑in tools
296
310
 
297
- The `lm_deluge.llm_tools` package exposes a few helper functions:
311
+ The `lm_deluge.pipelines` module exposes a few helper functions that combine LLMClient with prompt and output parsing to accomplish tasks:
298
312
 
299
313
  - `extract` – structure text or images into a Pydantic model based on a schema.
300
314
  - `translate` – translate a list of strings to English.
@@ -0,0 +1,132 @@
1
+ lm_deluge/__init__.py,sha256=D01sxqvAuW1QPYQfdSOlBFVhf7QUr78fGgCNPvKXbAc,346
2
+ lm_deluge/batches.py,sha256=qBKKkwm78k7vUxc3EsppARTG2ecmSMW3jGVg9NKPccQ,24045
3
+ lm_deluge/cache.py,sha256=xO2AIYvP3tUpTMKQjwQQYfGRJSRi6e7sMlRhLjsS-u4,4873
4
+ lm_deluge/cli.py,sha256=Ilww5gOw3J5v0NReq_Ra4hhxU4BCIJBl1oTGxJZKedc,12065
5
+ lm_deluge/client.py,sha256=mJb_QuWrzQoBwWF_OEaezfVz5O3EwVwnxBDpXlORXAM,50432
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/prompt.py,sha256=nZG6pIQLcOo59BN5m01WM1sNker3QpfDsHM22bDIQD0,81889
12
+ lm_deluge/request_context.py,sha256=CX15dT4Jxz77C-w5EKNyJCfYEa69wNKHbfNi47iG8W4,2771
13
+ lm_deluge/rerank.py,sha256=-NBAJdHz9OB-SWWJnHzkFmeVO4wR6lFV7Vw-SxG7aVo,11457
14
+ lm_deluge/tracker.py,sha256=B53KIsrK10L9L73cYbVB2pNSC0-FdvJGpIfw735CvaA,14808
15
+ lm_deluge/usage.py,sha256=xz9tAw2hqaJvv9aAVhnQ6N1Arn7fS8Shb28VwCW26wI,5136
16
+ lm_deluge/warnings.py,sha256=mLAZRbsRmT7XjgMRvztEWdtCGsgiAamTdHZ-toi8hUY,2614
17
+ lm_deluge/api_requests/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
18
+ lm_deluge/api_requests/anthropic.py,sha256=gE-pBwekBHwOk5iXojDAZS_JNtGsDIKrYUlq6mL7eXI,12947
19
+ lm_deluge/api_requests/base.py,sha256=QyO37PL2JQcDE-gQMf0oeARYpnhpl2qAlyzfLeOiiXU,12189
20
+ lm_deluge/api_requests/bedrock.py,sha256=OgjjkTF2hMMA89ktOox5qkoyIRXMmsxvj_-ROPLMU0c,16597
21
+ lm_deluge/api_requests/chat_reasoning.py,sha256=sJvstvKFqsSBUjYcwxzGt2_FH4cEp3Z6gKcBPyPjGwk,236
22
+ lm_deluge/api_requests/common.py,sha256=BZ3vRO5TB669_UsNKugkkuFSzoLHOYJIKt4nV4sf4vc,422
23
+ lm_deluge/api_requests/gemini.py,sha256=GTDMtm6u3DDVkcIF0bcNWZ5U3d6ftkWEGiWTtTW-bHI,13929
24
+ lm_deluge/api_requests/mistral.py,sha256=8JZP2CDf1XZfaPcTk0WS4q-VfYYj58ptpoH8LD3MQG4,4528
25
+ lm_deluge/api_requests/openai.py,sha256=D8NkDakjDMoEa72S1TNdt3VbCcFymkbeK3oLE29BShU,30725
26
+ lm_deluge/api_requests/response.py,sha256=vG194gAH5p7ulpNy4qy5Pryfb1p3ZV21-YGoj__ru3E,7436
27
+ lm_deluge/api_requests/deprecated/bedrock.py,sha256=WrcIShCoO8JCUSlFOCHxg6KQCNTZfw3TpYTvSpYk4mA,11320
28
+ lm_deluge/api_requests/deprecated/cohere.py,sha256=KgDScD6_bWhAzOY5BHZQKSA3kurt4KGENqC4wLsGmcU,5142
29
+ lm_deluge/api_requests/deprecated/deepseek.py,sha256=FEApI93VAWDwuaqTooIyKMgONYqRhdUmiAPBRme-IYs,4582
30
+ lm_deluge/api_requests/deprecated/mistral.py,sha256=pOfOZUM4U35I3Plch84SnAFpDAzouHcSNNMtgxRvjy4,4709
31
+ lm_deluge/api_requests/deprecated/vertex.py,sha256=ygXz2RjdXErPCSBbiHLEWbf5_sSTIi31WoX0UaoYzRI,15275
32
+ lm_deluge/models/__init__.py,sha256=zE24wthxSGAwJDcRkDxjUWAzjwtWe7RPqdDaECsjilY,4899
33
+ lm_deluge/models/anthropic.py,sha256=SnLpvYPg0iONuQPShmi45JTDbxfw3QRku9qFVy3gth8,6805
34
+ lm_deluge/models/arcee.py,sha256=4OI8eA8RoA-zYww4fWwhVZDFWB2Kd4-KQTTPl9r3Ay4,465
35
+ lm_deluge/models/bedrock.py,sha256=g1PbfceSRH2lWST3ja0mUlF3oTq4e4T-si6RMe7qXgg,4888
36
+ lm_deluge/models/cerebras.py,sha256=u2FMXJF6xMr0euDRKLKMo_NVTOcvSrrEpehbHr8sSeE,2050
37
+ lm_deluge/models/cohere.py,sha256=iXjYtM6jy_YL73Op8OfNsrMNopwae9y-Sw-4vF9cEBw,3406
38
+ lm_deluge/models/deepseek.py,sha256=b5t_ep6fE-2cKD2mmImBaLcJUbYrfizYnjG96sfKNTk,2072
39
+ lm_deluge/models/fireworks.py,sha256=yvt2Ggzye4aUqCqY74ta67Vu7FrQaLFjdFtN4P7D-dc,638
40
+ lm_deluge/models/google.py,sha256=ka5tBdpYT26zxsE1wzrl81Rt5XgpBQkPIOXOq5pSpRE,7033
41
+ lm_deluge/models/grok.py,sha256=rSvN3fKiO_WPNa5O_TzVTDj9-RqqjeXFBiC9OAcGZ4Q,3340
42
+ lm_deluge/models/groq.py,sha256=Mi5WE1xOBGoZlymD0UN6kzhH_NOmfJYU4N2l-TO0Z8Q,2552
43
+ lm_deluge/models/kimi.py,sha256=B_ZL4_0q6hS1VVskBWlBR569nNSjC8RgA2lj1eCjRRE,1183
44
+ lm_deluge/models/meta.py,sha256=BBgnscL1gMcIdPbRqrlDl_q9YAYGSrkw9JkAIabXtLs,1883
45
+ lm_deluge/models/minimax.py,sha256=HQsnNWCguTsRUFRMdQLMm3I8MeuWRwDDakh8mjVhM9o,537
46
+ lm_deluge/models/mistral.py,sha256=x67o5gckBGmPcIGdVbS26XZAYFKBYM4tsxEAahGp8bk,4323
47
+ lm_deluge/models/openai.py,sha256=ihSBjuu1QEn-voxEmDUgKn82AuDxrtRCJvFdj-XEZmU,14280
48
+ lm_deluge/models/openrouter.py,sha256=BOwUhV0_VWVIxaf4hRaejpkrq7OIY_yYF7SelFcViaE,6446
49
+ lm_deluge/models/together.py,sha256=wrGs4wO65on-dSlU9AARAA-rc4GDuWkidPjRQ7GScNg,4749
50
+ lm_deluge/models/zai.py,sha256=CDqb0TPulYHDlNjx2xjF6rAIAYbgB94m688qK1Vtahg,1477
51
+ lm_deluge/pipelines/__init__.py,sha256=U97UmEq4iQKPDH83xA5PztpRBQtXzITtG1A6PaDeyG0,231
52
+ lm_deluge/pipelines/classify.py,sha256=OdMwV5u4XoPlVhjOHX0sng5KPBIKFJmQeOE2fmnPgLU,21
53
+ lm_deluge/pipelines/extract.py,sha256=p61JW8yv5gQxPp4P8Hkm90ERgfD_Ek5IABzjIIlX-M0,4631
54
+ lm_deluge/pipelines/locate.py,sha256=lYNbKTmy9dTvj0lEQkOQ7yrxyqsgYzjD0C_byJKI_4w,6271
55
+ lm_deluge/pipelines/ocr.py,sha256=7fDlvs6uUOvbxMasvGGNJx5Fj6biM6z3lijKZaGN26k,23
56
+ lm_deluge/pipelines/score.py,sha256=hkLMroJMfQ92HPlTBNOHrDRtvdYUBWK0MBlhOfvFTMk,2582
57
+ lm_deluge/pipelines/translate.py,sha256=v_OvBQA2RB-QcWf0aopKHpYc2PDmckxzJGSmSuUX3Sw,1461
58
+ lm_deluge/pipelines/gepa/__init__.py,sha256=PZSch82ulEUEZscEYhsII7mr78ePlraaJM5ZJrQDk_0,2843
59
+ lm_deluge/pipelines/gepa/core.py,sha256=1KyJBF51H_EYxEx2KI3DewJfhqyV04dYm9iPuoOh4m4,10978
60
+ lm_deluge/pipelines/gepa/optimizer.py,sha256=T44RGSsv4uE8qb4ZfXJ7H4aausTvKsVnH8mlzb1dWpc,14803
61
+ lm_deluge/pipelines/gepa/proposer.py,sha256=EqA56kgg9M4A6qX5gBmQh_tsVH9NVkvUdcXoKCMvDAU,6709
62
+ lm_deluge/pipelines/gepa/util.py,sha256=PCrARH_pYGNSZa9aUmfTzFmGW2PPN50fQGf10E_yTeE,4909
63
+ lm_deluge/pipelines/gepa/docs/samples.py,sha256=tdFDeNR0Cfd_7aDJhw-tNDweBQPBw_tBnUf8HYCkO4M,24591
64
+ lm_deluge/pipelines/gepa/examples/01_synthetic_keywords.py,sha256=wVy8OUuR4DAobb3ZCVO9-_sPbFVhdnUpnbradqsWKrA,4415
65
+ lm_deluge/pipelines/gepa/examples/02_gsm8k_math.py,sha256=7ri3IyzkNxizyi8NmOwvGsT2OBOOFKW2iehuHPLbDgA,7690
66
+ lm_deluge/pipelines/gepa/examples/03_hotpotqa_multihop.py,sha256=YmGMsaEKOfX_2Bzc2XH9iOXDA5w_mmxjThAvxLv1sdg,8843
67
+ lm_deluge/pipelines/gepa/examples/04_batch_classification.py,sha256=_-SlQrV4o9EYOr5uXJqJAyVbzPCasKCK-ZqB_0nF4hg,7918
68
+ lm_deluge/pipelines/gepa/examples/simple_qa.py,sha256=RH1kcV4G16FUXVokLKn3ufRRj_C4qYSwyRxJykKwwmA,4366
69
+ lm_deluge/server/__init__.py,sha256=XCbOkrtQpcY__t-U3usffMzRo9OLxCNcuYBA2wG2Oo8,743
70
+ lm_deluge/server/__main__.py,sha256=fd3u5yS9w4TvFirEseqJuFv_LqkFJdWvr-kHrAAvJbA,4302
71
+ lm_deluge/server/adapters.py,sha256=il-itb4mDYlCUiub0_1ml7DHnFhWzLjGPCQDPuyd38c,12354
72
+ lm_deluge/server/app.py,sha256=FGs1h66f672kxtNsTZyWoM1XW2xEDnWgxspMV_BXM9Y,13041
73
+ lm_deluge/server/auth.py,sha256=h1h3H2OtVqmrR89soyG9AIts9TtcpEm6wePsIZiKTKY,1826
74
+ lm_deluge/server/model_policy.py,sha256=aEpNhXwNMP5UV-QGp_PgfNMgExCOIKPshdr0yJVkNUQ,7607
75
+ lm_deluge/server/models_anthropic.py,sha256=vuMtwaWCEHlPMglVBMowcVHsshLhkhnI4J3kCzsndTY,4356
76
+ lm_deluge/server/models_openai.py,sha256=SCAWT9Tj5s9XkXitHiR5JK2yJOljtNmzO0li2jb669Q,4587
77
+ lm_deluge/skills/anthropic.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
+ lm_deluge/skills/compat.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
+ lm_deluge/tool/__init__.py,sha256=z2f0QjMSKNEgJn0K20bl9OKnbD-2VsrpqI3PRBMKJoA,40751
80
+ lm_deluge/tool/builtin/base.py,sha256=FLYdKVAqlffA6WOu4j8wQVRd0iHMsyBW_T3vfl--aXo,276
81
+ lm_deluge/tool/builtin/gemini.py,sha256=uKrzzEZ0RO5EHddYYFvRKoMk7O6YOSWFDojhzbpQSfs,1724
82
+ lm_deluge/tool/builtin/openai.py,sha256=a6Y4TX_iqghDTnbL-HeFeVGq1nRdBosYJcLZzfCTy9g,2499
83
+ lm_deluge/tool/builtin/anthropic/__init__.py,sha256=U-5VdcRS_ITjTBCoFoeABZOoG4nfBTgRvhT5eo1UY1g,10675
84
+ lm_deluge/tool/builtin/anthropic/bash.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
85
+ lm_deluge/tool/builtin/anthropic/computer_use.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
86
+ lm_deluge/tool/builtin/anthropic/editor.py,sha256=DyC_DrHVTm1khU9QDL39vBuhu4tO5mS5H7xMRIT0Ng4,23327
87
+ lm_deluge/tool/cua/__init__.py,sha256=HDXXwCqPRNm_-Wh6JCsIT89CYwioHdRSZcu2WQWYaCo,4756
88
+ lm_deluge/tool/cua/actions.py,sha256=ZeQheCJ9F5nHLu3teL14_qr8mr4UuaR78EhgrvYw_G8,3191
89
+ lm_deluge/tool/cua/base.py,sha256=DwOTHp8AGu5-ZRzg_6RdOu9Bh4cgAbK5EMPEusJlDrI,799
90
+ lm_deluge/tool/cua/batch.py,sha256=ddYHbg72y4e62G6-B6BMM1SNq5zI9WYsnC6jzKNJiOU,7312
91
+ lm_deluge/tool/cua/converters.py,sha256=O1wO4u_78ZZNBrXuyjh4vZreYckhh-e3J304C-d6uOA,13741
92
+ lm_deluge/tool/cua/kernel.py,sha256=8klzaCTBB-4yYvZTzroi-t5ABNX81jAjc5uCCKG3Kvc,25654
93
+ lm_deluge/tool/cua/trycua.py,sha256=SvdA5DkAVweegQ3r_SI_AbKKX242mFOxsBDf5CNiRkY,36954
94
+ lm_deluge/tool/prefab/__init__.py,sha256=TWxzXA91nBwhUM0hhogGklauRobSLtHAQzQl4xzn1D4,1170
95
+ lm_deluge/tool/prefab/batch_tool.py,sha256=VTMoW7ImQYmeDHrbB4BKSw3WeHXhsjp9XqFHz4ytjcc,5584
96
+ lm_deluge/tool/prefab/docs.py,sha256=5X3EVUH4ws72og4TxDpgIjN3clroqUsR1Wx8fIuQWd0,41566
97
+ lm_deluge/tool/prefab/email.py,sha256=OHZEMAw90Bb5UusGw_3ltKZBc2bShWDEDkRQCzSkRd4,10568
98
+ lm_deluge/tool/prefab/filesystem.py,sha256=AvPWr1GmZBp0nMamNRDf0cfQYu33mLLUvHNUrHncQWk,59473
99
+ lm_deluge/tool/prefab/memory.py,sha256=FH3RkossG_3TqlZf6ZULPJCIBwiVfLXdYHql17O1zPg,16402
100
+ lm_deluge/tool/prefab/random.py,sha256=Q6DqvorcHE82rqn9jAofyz32MUQGCfmlx_7Kc04CDFk,6695
101
+ lm_deluge/tool/prefab/sheets.py,sha256=RhH4PgRI4E6WYKfJpScflT7HtAULvp88ZA94NmJyEn4,13632
102
+ lm_deluge/tool/prefab/skills.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
+ lm_deluge/tool/prefab/subagents.py,sha256=srJ7On7YR0Y8WuNvf5TJl_7IUfEtG3zlxZeLgmn_-NI,8484
104
+ lm_deluge/tool/prefab/todos.py,sha256=mrtv68uRc-grc0xKP6xKpfPSA2yXYU7FLNy6fDzEbG8,14902
105
+ lm_deluge/tool/prefab/tool_search.py,sha256=EJL5R5BgnO6owspk7F01Yzr8C9q9oJqmfMrWBjLE_bA,6151
106
+ lm_deluge/tool/prefab/web_search.py,sha256=TQ_-WK6axCG38qInm5bLVEywHfu2sAq-DGIIl1H0Hzw,6255
107
+ lm_deluge/tool/prefab/full_text_search/__init__.py,sha256=ScWuXl7sd1HLPUcQjmsCmh2onaGSBf53wvv7M0voTZI,9411
108
+ lm_deluge/tool/prefab/full_text_search/tantivy_index.py,sha256=jyR8XoxvR9IVporxsBq24kOVTWEm6Bvt69KX8y63nYg,14109
109
+ lm_deluge/tool/prefab/otc/__init__.py,sha256=33AcwAt9ycECxonnvkcyh13w9Sr2Cbs6OOlBjzBvl54,6373
110
+ lm_deluge/tool/prefab/otc/executor.py,sha256=4IROA_0un3HaV4GK7r4vQiVxJvcoHkqVii-4asGH-Cw,10508
111
+ lm_deluge/tool/prefab/otc/parse.py,sha256=lSAtez-pBFcJVQMW2evRvV9KlduRtPevzGCEB1fmUMo,4517
112
+ lm_deluge/tool/prefab/rlm/__init__.py,sha256=8Y5Ng1YjVGUptznNbIAWdFO2XZsy7aAezg2alySt4Yw,10198
113
+ lm_deluge/tool/prefab/rlm/executor.py,sha256=bpVxXfRjgkH16D1IXSfvWPV5NXpmYUOrkj3ztam5Hjg,11907
114
+ lm_deluge/tool/prefab/rlm/parse.py,sha256=nzDXTe-X-Pz3nI6JHml_4Wlj_2t-UMAf3PJLG-J0CFU,4507
115
+ lm_deluge/tool/prefab/sandbox/__init__.py,sha256=BPS5z6c9GzRAkkQqsQv90F9hRET5UJKtQ2pADGVPpq0,471
116
+ lm_deluge/tool/prefab/sandbox/daytona_sandbox.py,sha256=f0quJyLa0TWn6cjmkN0cuXO4S_qUCJkVhyKNi-onih4,17162
117
+ lm_deluge/tool/prefab/sandbox/docker_sandbox.py,sha256=zI1AbvdADXl49WLBKJ10JcBOx2tHFHI-XTkCmTCuLH4,21991
118
+ lm_deluge/tool/prefab/sandbox/fargate_sandbox.py,sha256=z8Sj4Jk0oan36vOaWUy9xioGkbePckYNxatUGFtlUwA,19435
119
+ lm_deluge/tool/prefab/sandbox/modal_sandbox.py,sha256=ofuY2SQC-ZSb428mF6LNz8zN9OdbQ3MjY9Yx2pt7oOo,17413
120
+ lm_deluge/tool/prefab/sandbox/seatbelt_sandbox.py,sha256=mrjNSIzxZpPkwBTAHzCnymtsoODXzkOhTSiK-epWtEU,28782
121
+ lm_deluge/util/harmony.py,sha256=XBfJck6q-5HbOqMhEjdfy1i17i0QtpHG8ruXV4EsHl0,2731
122
+ lm_deluge/util/json.py,sha256=_4Oar2Cmz2L1DK3EtPLPDxD6rsYHxjROmV8ZpmMjQ-4,5822
123
+ lm_deluge/util/logprobs.py,sha256=UkBZakOxWluaLqHrjARu7xnJ0uCHVfLGHJdnYlEcutk,11768
124
+ lm_deluge/util/schema.py,sha256=q6uwhA4s1lM2dHT1Kwc46E7OY1VecMOtTEI0PTFn6tA,13206
125
+ lm_deluge/util/spatial.py,sha256=BsF_UKhE-x0xBirc-bV1xSKZRTUhsOBdGqsMKme20C8,4099
126
+ lm_deluge/util/validation.py,sha256=hz5dDb3ebvZrZhnaWxOxbNSVMI6nmaOODBkk0htAUhs,1575
127
+ lm_deluge/util/xml.py,sha256=Ft4zajoYBJR3HHCt2oHwGfymGLdvp_gegVmJ-Wqk4Ck,10547
128
+ lm_deluge-0.0.90.dist-info/licenses/LICENSE,sha256=uNNXGXPCw2TC7CUs7SEBkA-Mz6QBQFWUUEWDMgEs1dU,1058
129
+ lm_deluge-0.0.90.dist-info/METADATA,sha256=wig-nvEcWV0TOwa6laxs2l9AIACFCl9KcVeaf1Z9WBo,14110
130
+ lm_deluge-0.0.90.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
131
+ lm_deluge-0.0.90.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
132
+ lm_deluge-0.0.90.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
- )