python-fastllm 0.0.15__tar.gz → 0.0.17__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.
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/PKG-INFO +2 -2
- python_fastllm-0.0.17/fastllm/__init__.py +1 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/acomplete.py +2 -1
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/chat.py +5 -4
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/types.py +14 -5
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/pyproject.toml +2 -2
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/python_fastllm.egg-info/PKG-INFO +2 -2
- python_fastllm-0.0.17/python_fastllm.egg-info/requires.txt +3 -0
- python_fastllm-0.0.15/fastllm/__init__.py +0 -1
- python_fastllm-0.0.15/python_fastllm.egg-info/requires.txt +0 -3
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/README.md +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/_modidx.py +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/anthropic.py +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/codex.py +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/gemini.py +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/openai_chat.py +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/openai_responses.py +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/specs/anthropic.json +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/specs/anthropic.yml +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/specs/gemini.json +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/specs/openai.with-code-samples.json +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/specs/openai.with-code-samples.yml +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/specs/spec_manifest.json +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/fastllm/streaming.py +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/python_fastllm.egg-info/SOURCES.txt +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/python_fastllm.egg-info/dependency_links.txt +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/python_fastllm.egg-info/entry_points.txt +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/python_fastllm.egg-info/top_level.txt +0 -0
- {python_fastllm-0.0.15 → python_fastllm-0.0.17}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-fastllm
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.17
|
|
4
4
|
Author-email: Kerem Turgutlu <keremturgutlu@gmail.com>
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Project-URL: Repository, https://github.com/AnswerDotAI/fastllm
|
|
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
10
10
|
Requires-Python: >=3.10
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
|
-
Requires-Dist: fastspec
|
|
12
|
+
Requires-Dist: fastspec>=0.0.9
|
|
13
13
|
Requires-Dist: toolslm
|
|
14
14
|
Requires-Dist: pillow
|
|
15
15
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.17"
|
|
@@ -43,7 +43,8 @@ vendor_mapping = {
|
|
|
43
43
|
"openrouter": ('openai_chat', "https://openrouter.ai/api/v1", "OPENROUTER_API_KEY"),
|
|
44
44
|
"together": ('openai_chat', "https://api.together.xyz/v1", "TOGETHER_API_KEY"),
|
|
45
45
|
"fireworks_ai": ('openai_chat', "https://api.fireworks.ai/inference/v1", "FIREWORKS_API_KEY"),
|
|
46
|
-
"qwen": ('openai_chat', "https://dashscope.aliyuncs.com/compatible-mode/v1", "QWEN_API_KEY")
|
|
46
|
+
"qwen": ('openai_chat', "https://dashscope.aliyuncs.com/compatible-mode/v1", "QWEN_API_KEY"),
|
|
47
|
+
"minimax": ('anthropic', "https://api.minimax.io/anthropic", "MINIMAX_API_KEY")
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
# %% ../nbs/06_acomplete.ipynb #77d27ea7
|
|
@@ -620,10 +620,11 @@ def _handle_stop_reason(res):
|
|
|
620
620
|
# %% ../nbs/07_chat.ipynb #daf876f4
|
|
621
621
|
class StopReasonCallback(ChatCallback):
|
|
622
622
|
order = 40
|
|
623
|
-
async def after_acomplete(self):
|
|
624
|
-
action,
|
|
625
|
-
if action
|
|
626
|
-
|
|
623
|
+
async def after_acomplete(self):
|
|
624
|
+
action,msg = _handle_stop_reason(self.turn_res)
|
|
625
|
+
if action != 'warning': return
|
|
626
|
+
add_warning(self.chat.turn_res, msg)
|
|
627
|
+
if self.stream: yield dict(text=f"warning: {msg}\n\n")
|
|
627
628
|
|
|
628
629
|
# %% ../nbs/07_chat.ipynb #aa7630b2
|
|
629
630
|
def _active_fence_langs(tool_schemas):
|
|
@@ -340,10 +340,12 @@ for model in ('kimi-k2.5', 'kimi-k2.6'):
|
|
|
340
340
|
register_model_info('gemini-3.1-flash-lite', vendor_name='gemini', base='gemini-3.1-flash-lite-preview')
|
|
341
341
|
register_model_info('models/gemini-3.1-flash-lite', vendor_name='gemini', base='gemini-3.1-flash-lite-preview')
|
|
342
342
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
343
|
+
register_model_info('accounts/fireworks/models/kimi-k2p5', vendor_name='fireworks_ai', base='accounts/fireworks/models/kimi-k2p5',
|
|
344
|
+
supports_reasoning=True, supports_vision=True,
|
|
345
|
+
input_cost_per_token=0.60e-6, cache_read_input_token_cost=0.10e-6, output_cost_per_token=3.0e-6)
|
|
346
|
+
register_model_info('accounts/fireworks/models/kimi-k2p6', vendor_name='fireworks_ai', base='accounts/fireworks/models/kimi-k2p5',
|
|
347
|
+
supports_reasoning=True, supports_vision=True,
|
|
348
|
+
input_cost_per_token=0.95e-6, cache_read_input_token_cost=0.16e-6, output_cost_per_token=4.0e-6)
|
|
347
349
|
|
|
348
350
|
# %% ../nbs/00_types.ipynb #948d55d0
|
|
349
351
|
deepseek_v4_common = dict(**modern_llm, supports_assistant_prefill=True,
|
|
@@ -364,6 +366,13 @@ register_model_info('mimo-v2.5', vendor_name='mimo', **mimo_v25_common, base='de
|
|
|
364
366
|
input_cost_per_token=0.14e-6, output_cost_per_token=0.28e-6, cache_read_input_token_cost=0.0028e-6, search_context_cost_per_query=0.005,
|
|
365
367
|
supports_vision=True, supports_image_input=True)
|
|
366
368
|
|
|
369
|
+
# %% ../nbs/00_types.ipynb #defb1c5c
|
|
370
|
+
register_model_info('MiniMax-M3', vendor_name='minimax', **modern_llm, max_input_tokens=512_000, max_output_tokens=512_000, max_tokens=512_000, input_cost_per_token=0.3e-6, output_cost_per_token=1.2e-6, cache_read_input_token_cost=0.06e-6, supports_vision=True, supports_video_input=True)
|
|
371
|
+
|
|
372
|
+
register_model_info('claude-fable-5', vendor_name='anthropic', base="claude-opus-4-8",
|
|
373
|
+
input_cost_per_token=10e-6, cache_creation_input_token_cost=12.5e-6, output_cost_per_token=50e-6,
|
|
374
|
+
cache_read_input_token_cost=1e-6, search_context_cost_per_query=0.005)
|
|
375
|
+
|
|
367
376
|
# %% ../nbs/00_types.ipynb #2c23d11e
|
|
368
377
|
codex_pricing = dict(
|
|
369
378
|
input_cost_per_token = 0.10/1_000_000, output_cost_per_token = 0.50/1_000_000,
|
|
@@ -388,7 +397,7 @@ def approx_pricing(nm, vendor_name, out=10, cache=80, inp=10, markup=0):
|
|
|
388
397
|
p = get_model_pricing(nm, vendor_name)
|
|
389
398
|
ic = p.get('cache_creation_input_token_cost', p['input_cost_per_token'])
|
|
390
399
|
res = (p['output_cost_per_token']*out + p['cache_read_input_token_cost']*cache + ic*inp) / (out+cache+inp)
|
|
391
|
-
if nm in ('claude-opus-4-7','claude-opus-4-8'): res *= 1.5
|
|
400
|
+
if nm in ('claude-opus-4-7','claude-opus-4-8','claude-fable-5'): res *= 1.5
|
|
392
401
|
return res*(1+markup)
|
|
393
402
|
|
|
394
403
|
# %% ../nbs/00_types.ipynb #8bfca02d
|
|
@@ -15,7 +15,7 @@ classifiers = [
|
|
|
15
15
|
"Programming Language :: Python :: 3",
|
|
16
16
|
"Programming Language :: Python :: 3 :: Only",
|
|
17
17
|
]
|
|
18
|
-
dependencies = ['fastspec', 'toolslm', 'pillow']
|
|
18
|
+
dependencies = ['fastspec>=0.0.9', 'toolslm', 'pillow']
|
|
19
19
|
|
|
20
20
|
[project.urls]
|
|
21
21
|
Repository = "https://github.com/AnswerDotAI/fastllm"
|
|
@@ -36,4 +36,4 @@ fastllm = ["specs/*.yml", "specs/*.json"]
|
|
|
36
36
|
allowed_metadata_keys = ['solveit']
|
|
37
37
|
allowed_cell_metadata_keys = ['solveit_ai']
|
|
38
38
|
custom_sidebar = false
|
|
39
|
-
lib_path = "fastllm"
|
|
39
|
+
lib_path = "fastllm"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-fastllm
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.17
|
|
4
4
|
Author-email: Kerem Turgutlu <keremturgutlu@gmail.com>
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Project-URL: Repository, https://github.com/AnswerDotAI/fastllm
|
|
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
10
10
|
Requires-Python: >=3.10
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
|
-
Requires-Dist: fastspec
|
|
12
|
+
Requires-Dist: fastspec>=0.0.9
|
|
13
13
|
Requires-Dist: toolslm
|
|
14
14
|
Requires-Dist: pillow
|
|
15
15
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.15"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fastllm-0.0.15 → python_fastllm-0.0.17}/python_fastllm.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|