langfun 0.1.2.dev202505040804__py3-none-any.whl → 0.1.2.dev202505050805__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.
- langfun/core/language_model.py +2 -1
- langfun/core/llms/gemini.py +1 -1
- {langfun-0.1.2.dev202505040804.dist-info → langfun-0.1.2.dev202505050805.dist-info}/METADATA +1 -1
- {langfun-0.1.2.dev202505040804.dist-info → langfun-0.1.2.dev202505050805.dist-info}/RECORD +7 -7
- {langfun-0.1.2.dev202505040804.dist-info → langfun-0.1.2.dev202505050805.dist-info}/WHEEL +1 -1
- {langfun-0.1.2.dev202505040804.dist-info → langfun-0.1.2.dev202505050805.dist-info}/licenses/LICENSE +0 -0
- {langfun-0.1.2.dev202505040804.dist-info → langfun-0.1.2.dev202505050805.dist-info}/top_level.txt +0 -0
langfun/core/language_model.py
CHANGED
@@ -213,7 +213,8 @@ class ModelInfo(pg.Object):
|
|
213
213
|
return None
|
214
214
|
return (
|
215
215
|
self.cost_per_1m_input_tokens * usage.prompt_tokens
|
216
|
-
+ self.cost_per_1m_output_tokens
|
216
|
+
+ self.cost_per_1m_output_tokens
|
217
|
+
* (usage.total_tokens - usage.prompt_tokens)
|
217
218
|
) / 1000_000
|
218
219
|
|
219
220
|
pricing: Annotated[
|
langfun/core/llms/gemini.py
CHANGED
@@ -133,7 +133,7 @@ class GeminiModelInfo(lf.ModelInfo):
|
|
133
133
|
self.cost_per_1m_input_tokens_with_prompt_longer_than_128k
|
134
134
|
* usage.prompt_tokens
|
135
135
|
+ self.cost_per_1m_output_tokens_with_prompt_longer_than_128k
|
136
|
-
* usage.
|
136
|
+
* (usage.total_tokens - usage.prompt_tokens)
|
137
137
|
) / 1000_000
|
138
138
|
|
139
139
|
experimental: Annotated[
|
@@ -8,7 +8,7 @@ langfun/core/console.py,sha256=V_mOiFi9oGh8gLsUeR56pdFDkuvYOpvQt7DY1KUTWTA,2535
|
|
8
8
|
langfun/core/console_test.py,sha256=pBOcuNMJdVELywvroptfcRtJMsegMm3wSlHAL2TdxVk,1679
|
9
9
|
langfun/core/langfunc.py,sha256=G50YgoVZ0y1GFw2ev41MlOqr6qa8YakbvNC0h_E0PiA,11140
|
10
10
|
langfun/core/langfunc_test.py,sha256=CDn-gJCa5EnjN7cotAVCfSCbuzddq2o-HzEt7kV8HbY,8882
|
11
|
-
langfun/core/language_model.py,sha256=
|
11
|
+
langfun/core/language_model.py,sha256=c6Vds9qXuC0BiHeZstxCTTsoU8ZL9K4w4co_hXA3-RI,46336
|
12
12
|
langfun/core/language_model_test.py,sha256=iA5uo7rIj2jAtCYzMzhyNg1fWqE2Onn60bOO58q72C0,36454
|
13
13
|
langfun/core/logging.py,sha256=ypjSwGzQpIhadewEKkIH5VWS55rfU4e6mlni41PMHlw,9116
|
14
14
|
langfun/core/logging_test.py,sha256=vbVGOQxwMmVSiFfbt2897gUt-8nqDpV64jCAeUG_q5U,6924
|
@@ -92,7 +92,7 @@ langfun/core/llms/deepseek.py,sha256=jvTxdXPr-vH6HNakn_Ootx1heDg8Fen2FUkUW36bpCs
|
|
92
92
|
langfun/core/llms/deepseek_test.py,sha256=DvROWPlDuow5E1lfoSkhyGt_ELA19JoQoDsTnRgDtTg,1847
|
93
93
|
langfun/core/llms/fake.py,sha256=xmgCkk9y0I4x0IT32SZ9_OT27aLadXH8PRiYNo5VTd4,3265
|
94
94
|
langfun/core/llms/fake_test.py,sha256=2h13qkwEz_JR0mtUDPxdAhQo7MueXaFSwsD2DIRDW9g,7653
|
95
|
-
langfun/core/llms/gemini.py,sha256=
|
95
|
+
langfun/core/llms/gemini.py,sha256=54C_rbAOgMXHe_X9MrZCMCaLHEdrikjX2mq6zRkJ3as,24491
|
96
96
|
langfun/core/llms/gemini_test.py,sha256=Ve9X2Wvwu9wVFHpKZDP-qoM1_hzB4kgt6_HR9wxtNkg,7592
|
97
97
|
langfun/core/llms/google_genai.py,sha256=j8W22WFvkT80Fw-r7Rg-e7MKhcSwljZkmtuufwSEn5s,5051
|
98
98
|
langfun/core/llms/google_genai_test.py,sha256=NKNtpebArQ9ZR7Qsnhd2prFIpMjleojy6o6VMXkJ1zY,1502
|
@@ -156,8 +156,8 @@ langfun/core/templates/demonstration.py,sha256=vCrgYubdZM5Umqcgp8NUVGXgr4P_c-fik
|
|
156
156
|
langfun/core/templates/demonstration_test.py,sha256=SafcDQ0WgI7pw05EmPI2S4v1t3ABKzup8jReCljHeK4,2162
|
157
157
|
langfun/core/templates/selfplay.py,sha256=yhgrJbiYwq47TgzThmHrDQTF4nDrTI09CWGhuQPNv-s,2273
|
158
158
|
langfun/core/templates/selfplay_test.py,sha256=Ot__1P1M8oJfoTp-M9-PQ6HUXqZKyMwvZ5f7yQ3yfyM,2326
|
159
|
-
langfun-0.1.2.
|
160
|
-
langfun-0.1.2.
|
161
|
-
langfun-0.1.2.
|
162
|
-
langfun-0.1.2.
|
163
|
-
langfun-0.1.2.
|
159
|
+
langfun-0.1.2.dev202505050805.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
160
|
+
langfun-0.1.2.dev202505050805.dist-info/METADATA,sha256=bhWHxi4ysmA7AbYsj4OQlHgfQ_cTQ1GCflqdlICgoD4,8178
|
161
|
+
langfun-0.1.2.dev202505050805.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
162
|
+
langfun-0.1.2.dev202505050805.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
|
163
|
+
langfun-0.1.2.dev202505050805.dist-info/RECORD,,
|
{langfun-0.1.2.dev202505040804.dist-info → langfun-0.1.2.dev202505050805.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
{langfun-0.1.2.dev202505040804.dist-info → langfun-0.1.2.dev202505050805.dist-info}/top_level.txt
RENAMED
File without changes
|