python-fastllm 0.0.28__tar.gz → 0.0.30__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.28 → python_fastllm-0.0.30}/PKG-INFO +1 -1
- python_fastllm-0.0.30/fastllm/__init__.py +1 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/chat.py +1 -1
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/types.py +12 -6
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/python_fastllm.egg-info/PKG-INFO +1 -1
- python_fastllm-0.0.28/fastllm/__init__.py +0 -1
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/README.md +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/_modidx.py +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/acomplete.py +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/anthropic.py +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/codex.py +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/gemini.py +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/openai_chat.py +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/openai_responses.py +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/specs/anthropic.json +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/specs/anthropic.yml +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/specs/gemini.json +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/specs/openai.with-code-samples.json +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/specs/openai.with-code-samples.yml +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/specs/spec_manifest.json +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/fastllm/streaming.py +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/pyproject.toml +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/python_fastllm.egg-info/SOURCES.txt +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/python_fastllm.egg-info/dependency_links.txt +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/python_fastllm.egg-info/entry_points.txt +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/python_fastllm.egg-info/requires.txt +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/python_fastllm.egg-info/top_level.txt +0 -0
- {python_fastllm-0.0.28 → python_fastllm-0.0.30}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.30"
|
|
@@ -319,12 +319,12 @@ def _has_stop(tres_parts): return any(isinstance(p.text, StopResponse) for p in
|
|
|
319
319
|
# %% ../nbs/07_chat.ipynb #f58ce348
|
|
320
320
|
def _trunc_str(s, mx=2000, skip=10, replace="TRUNCATED"):
|
|
321
321
|
"Truncate `s` to `mx` chars max, adding `replace` if truncated; `mx=None` disables truncation"
|
|
322
|
+
if mx is None or isinstance_str(s, ('FullResponse','Safe','PrettyString')): return s
|
|
322
323
|
if not isinstance(s, str): s = str(s)
|
|
323
324
|
s = type(s)(s.rstrip())
|
|
324
325
|
if len(s)>2 and s[0]=='𝍁' and s[-1]=='𝍁':
|
|
325
326
|
s = s[1:-1]
|
|
326
327
|
if replace: return s
|
|
327
|
-
if isinstance_str(s, ('FullResponse','Safe','PrettyString')): return s
|
|
328
328
|
if mx is None or len(s)<=mx: return s
|
|
329
329
|
s = s[skip:mx-skip]
|
|
330
330
|
ss = s.split(' ')
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.28"
|
|
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
|
|
File without changes
|
|
File without changes
|
{python_fastllm-0.0.28 → python_fastllm-0.0.30}/python_fastllm.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|