python-fastllm 0.0.28__py3-none-any.whl → 0.0.29__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.
- fastllm/__init__.py +1 -1
- fastllm/types.py +12 -6
- {python_fastllm-0.0.28.dist-info → python_fastllm-0.0.29.dist-info}/METADATA +1 -1
- {python_fastllm-0.0.28.dist-info → python_fastllm-0.0.29.dist-info}/RECORD +7 -7
- {python_fastllm-0.0.28.dist-info → python_fastllm-0.0.29.dist-info}/WHEEL +0 -0
- {python_fastllm-0.0.28.dist-info → python_fastllm-0.0.29.dist-info}/entry_points.txt +0 -0
- {python_fastllm-0.0.28.dist-info → python_fastllm-0.0.29.dist-info}/top_level.txt +0 -0
fastllm/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.29"
|
fastllm/types.py
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
# %% auto #0
|
|
6
6
|
__all__ = ['PartType', 'FinishReason', 'api_registry', 'model_prices_url', 'haik45', 'sonn45', 'sonn', 'sonn46', 'sonn5',
|
|
7
7
|
'opus46', 'opus', 'gpt54', 'gpt54m', 'gpt55', 'codex54', 'codex54m', 'codex55', 'codex53spark',
|
|
8
|
-
'model_info_registry', 'modern_llm', 'deepseek_v4_common', 'mimo_v25_common', 'codex_pricing', '
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
'get_model_pricing', 'approx_pricing', 'is_deepseek_peak_hour']
|
|
8
|
+
'model_info_registry', 'modern_llm', 'deepseek_v4_common', 'mimo_v25_common', 'codex_pricing', 'sol',
|
|
9
|
+
'terra', 'luna', 'gpt56s', 'Part', 'Msg', 'ToolCall', 'display_list', 'Usage', 'Completion', 'APIRegistry',
|
|
10
|
+
'mk_completion', 'mk_tool_res_msg', 'fn_schema', 'sys_text', 'part_txt', 'data_url', 'url_mime',
|
|
11
|
+
'payload_kwargs', 'get_api_key', 'resize_b64', 'model_prices_meta', 'infer_api_name', 'get_model_meta',
|
|
12
|
+
'register_model_info', 'get_model_info', 'get_model_pricing', 'approx_pricing', 'is_deepseek_peak_hour']
|
|
13
13
|
|
|
14
14
|
# %% ../nbs/00_types.ipynb #b4d047fd
|
|
15
15
|
import httpx, base64, io
|
|
@@ -417,6 +417,12 @@ for model in (haik45, sonn45, sonn46, sonn5, opus46, opus):
|
|
|
417
417
|
# %% ../nbs/00_types.ipynb #60630540
|
|
418
418
|
register_model_info(sonn5, base=sonn5, max_input_tokens=760_000)
|
|
419
419
|
|
|
420
|
+
# %% ../nbs/00_types.ipynb #bb0c4c2a
|
|
421
|
+
sol,terra,luna = gpt56s = 'gpt-5.6-sol gpt-5.6-terra gpt-5.6-luna'.split()
|
|
422
|
+
for model in ['gpt-5.6']+gpt56s:
|
|
423
|
+
register_model_info(model, 'openai', base=model, base_vendor_name='openai', max_input_tokens=272_000)
|
|
424
|
+
register_model_info(model, 'codex', base=model, base_vendor_name='openai', max_input_tokens=272_000, **codex_pricing)
|
|
425
|
+
|
|
420
426
|
# %% ../nbs/00_types.ipynb #24cc47ec
|
|
421
427
|
def get_model_pricing(mn, vendor_name, million=True):
|
|
422
428
|
return {k:round(v * (1e6 if million else 1), 6)
|
|
@@ -429,7 +435,7 @@ def approx_pricing(nm, vendor_name, out=10, cache=80, inp=10, markup=0):
|
|
|
429
435
|
p = get_model_pricing(nm, vendor_name)
|
|
430
436
|
ic = p.get('cache_creation_input_token_cost', p['input_cost_per_token'])
|
|
431
437
|
res = (p['output_cost_per_token']*out + p['cache_read_input_token_cost']*cache + ic*inp) / (out+cache+inp)
|
|
432
|
-
if
|
|
438
|
+
if vendor_name=='anthropic': res *= 1.5
|
|
433
439
|
return res*(1+markup)
|
|
434
440
|
|
|
435
441
|
# %% ../nbs/00_types.ipynb #d2a310fb
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
fastllm/__init__.py,sha256=
|
|
1
|
+
fastllm/__init__.py,sha256=x-mEbDNfu7r2SKAGR0A7P0FwPyhhSxJRlutHkucLsHk,23
|
|
2
2
|
fastllm/_modidx.py,sha256=CSM0Rinlot1qnSPrsvAAyaT-4VdalydB85Nyp9V8eOI,35091
|
|
3
3
|
fastllm/acomplete.py,sha256=XR_wEHBGy0jWXrKbqM1AsnpJlVh8Coq6O5CBBsUNY5Y,9279
|
|
4
4
|
fastllm/anthropic.py,sha256=OHyazPPsXro3ooS0dBy-tk2g8fwXaAS_Cq-7hnc4E6M,15453
|
|
@@ -8,15 +8,15 @@ fastllm/gemini.py,sha256=Zw6zIsaQ0yht2qNyuntcaNFDPpGPO3sfi6v_izzXd_4,15044
|
|
|
8
8
|
fastllm/openai_chat.py,sha256=b3JHumjX-DAxLB02IeKjcUeUkpM7k4SLQ_qdvcfDcwk,10965
|
|
9
9
|
fastllm/openai_responses.py,sha256=5oUtrYtSd4WChkGhwmVC7LilPAguTx0EnpH4lEqYP40,13307
|
|
10
10
|
fastllm/streaming.py,sha256=mDyaK2JJ5mIjtS0SkAx-iFFL0cN4XkXcdWHaY8w5H3M,7597
|
|
11
|
-
fastllm/types.py,sha256=
|
|
11
|
+
fastllm/types.py,sha256=K0kg_ZCZXteSgrdhOF_K9S9dgcSKjAUhKUGhxRYrtmY,20790
|
|
12
12
|
fastllm/specs/anthropic.json,sha256=VCgTjM2_HoDpCkeu3q_TCOEZLMHriJZLAG3LnDBAgGM,541035
|
|
13
13
|
fastllm/specs/anthropic.yml,sha256=3S3NAKdXB1Nwp-Sn9Gmh4tBnwhGGhMO3DXkGqPXPUYs,724122
|
|
14
14
|
fastllm/specs/gemini.json,sha256=zJGOdvZ2BvCiTENZt0-BDEvNBMl8h6EBmEskle_WBto,309331
|
|
15
15
|
fastllm/specs/openai.with-code-samples.json,sha256=Kto19AW1u8MfxVDJ4cFVBIdZQOIyy8NWylswo57eABU,1995929
|
|
16
16
|
fastllm/specs/openai.with-code-samples.yml,sha256=DlcWGdaeP4k7smVjt6UbyehJ-2XGU3rn3nCIBMDRfYU,2553630
|
|
17
17
|
fastllm/specs/spec_manifest.json,sha256=9tVFwojXFnNqsAxQzCRTP1lgSIM0fXixnrXdv4Cmb0c,653
|
|
18
|
-
python_fastllm-0.0.
|
|
19
|
-
python_fastllm-0.0.
|
|
20
|
-
python_fastllm-0.0.
|
|
21
|
-
python_fastllm-0.0.
|
|
22
|
-
python_fastllm-0.0.
|
|
18
|
+
python_fastllm-0.0.29.dist-info/METADATA,sha256=AlueOLo7VXhyfhXJXwzn8IdLC-LMykqcTBLM9Ac0Ekw,19577
|
|
19
|
+
python_fastllm-0.0.29.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
20
|
+
python_fastllm-0.0.29.dist-info/entry_points.txt,sha256=_cVRbpVkvyxdZfR7UCXa0lIXZtTSsZQWoBPhDwMqrHs,80
|
|
21
|
+
python_fastllm-0.0.29.dist-info/top_level.txt,sha256=F8qodL7nEGUHGmzzqfhNKCTIr1i0D6cvudOnm3z7o0Y,8
|
|
22
|
+
python_fastllm-0.0.29.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|