langfun 0.1.2.dev202504060803__py3-none-any.whl → 0.1.2.dev202504080804__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.
@@ -40,6 +40,7 @@ from langfun.core.llms.azure_openai import AzureOpenAI
40
40
 
41
41
  # Gemini models.
42
42
  from langfun.core.llms.google_genai import GenAI
43
+ from langfun.core.llms.google_genai import Gemini25ProPreview_20250325
43
44
  from langfun.core.llms.google_genai import Gemini2Flash
44
45
  from langfun.core.llms.google_genai import Gemini2Flash_001
45
46
  from langfun.core.llms.google_genai import Gemini2FlashLitePreview_20250205
@@ -72,6 +73,7 @@ from langfun.core.llms.vertexai import VertexAIGemini15Flash8B_001
72
73
  from langfun.core.llms.vertexai import VertexAIGemini2ProExp_20250205
73
74
  from langfun.core.llms.vertexai import VertexAIGemini2FlashThinkingExp_20250121
74
75
  from langfun.core.llms.vertexai import VertexAIGeminiExp_20241206
76
+ from langfun.core.llms.vertexai import VertexAIGemini25ProExp_20250325
75
77
 
76
78
  # For backward compatibility.
77
79
  GeminiPro1_5 = Gemini15Pro
@@ -148,20 +148,61 @@ class GeminiModelInfo(lf.ModelInfo):
148
148
 
149
149
 
150
150
  SUPPORTED_MODELS = [
151
-
152
151
  #
153
152
  # Production models.
154
153
  #
155
-
154
+ # Gemini 2.5 Pro
155
+ GeminiModelInfo(
156
+ model_id='gemini-2.5-pro-preview-03-25',
157
+ in_service=True,
158
+ provider=pg.oneof(['Google GenAI']),
159
+ model_type='instruction-tuned',
160
+ description='Gemini 2.5 Pro.',
161
+ release_date=datetime.datetime(2025, 3, 25),
162
+ input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
163
+ context_length=lf.ModelInfo.ContextLength(
164
+ max_input_tokens=1_048_576,
165
+ max_output_tokens=65_536,
166
+ ),
167
+ pricing=GeminiModelInfo.Pricing(
168
+ cost_per_1m_cached_input_tokens=1.25,
169
+ cost_per_1m_input_tokens=1.25,
170
+ cost_per_1m_output_tokens=10.0,
171
+ ),
172
+ rate_limits=lf.ModelInfo.RateLimits(
173
+ max_requests_per_minute=20,
174
+ max_tokens_per_minute=1_000_000,
175
+ ),
176
+ ),
177
+ GeminiModelInfo(
178
+ model_id='gemini-2.5-pro-exp-03-25',
179
+ in_service=True,
180
+ provider=pg.oneof(['VertexAI']),
181
+ model_type='instruction-tuned',
182
+ description='Gemini 2.5 Pro.',
183
+ release_date=datetime.datetime(2025, 3, 25),
184
+ input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
185
+ context_length=lf.ModelInfo.ContextLength(
186
+ max_input_tokens=1_048_576,
187
+ max_output_tokens=65_536,
188
+ ),
189
+ pricing=GeminiModelInfo.Pricing(
190
+ cost_per_1m_cached_input_tokens=1.25,
191
+ cost_per_1m_input_tokens=1.25,
192
+ cost_per_1m_output_tokens=10.0,
193
+ ),
194
+ rate_limits=lf.ModelInfo.RateLimits(
195
+ max_requests_per_minute=20,
196
+ max_tokens_per_minute=1_000_000,
197
+ ),
198
+ ),
156
199
  # Gemini 2.0 Flash.
157
200
  GeminiModelInfo(
158
201
  model_id='gemini-2.0-flash',
159
202
  in_service=True,
160
203
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
161
204
  model_type='instruction-tuned',
162
- description=(
163
- 'Gemini 2.0 Flash model.'
164
- ),
205
+ description='Gemini 2.0 Flash model.',
165
206
  release_date=datetime.datetime(2025, 2, 5),
166
207
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
167
208
  context_length=lf.ModelInfo.ContextLength(
@@ -184,9 +225,7 @@ SUPPORTED_MODELS = [
184
225
  in_service=True,
185
226
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
186
227
  model_type='instruction-tuned',
187
- description=(
188
- 'Gemini 2.0 Flash model (version 001).'
189
- ),
228
+ description='Gemini 2.0 Flash model (version 001).',
190
229
  release_date=datetime.datetime(2025, 2, 5),
191
230
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
192
231
  context_length=lf.ModelInfo.ContextLength(
@@ -210,9 +249,7 @@ SUPPORTED_MODELS = [
210
249
  in_service=True,
211
250
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
212
251
  model_type='instruction-tuned',
213
- description=(
214
- 'Gemini 2.0 Lite preview model.'
215
- ),
252
+ description='Gemini 2.0 Lite preview model.',
216
253
  release_date=datetime.datetime(2025, 2, 5),
217
254
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
218
255
  context_length=lf.ModelInfo.ContextLength(
@@ -237,9 +274,7 @@ SUPPORTED_MODELS = [
237
274
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
238
275
  in_service=True,
239
276
  model_type='instruction-tuned',
240
- description=(
241
- 'Gemini 1.5 Flash model (latest stable).'
242
- ),
277
+ description='Gemini 1.5 Flash model (latest stable).',
243
278
  release_date=datetime.datetime(2024, 9, 30),
244
279
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
245
280
  context_length=lf.ModelInfo.ContextLength(
@@ -265,9 +300,7 @@ SUPPORTED_MODELS = [
265
300
  in_service=True,
266
301
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
267
302
  model_type='instruction-tuned',
268
- description=(
269
- 'Gemini 1.5 Flash model (version 001).'
270
- ),
303
+ description='Gemini 1.5 Flash model (version 001).',
271
304
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
272
305
  context_length=lf.ModelInfo.ContextLength(
273
306
  max_input_tokens=1_048_576,
@@ -292,9 +325,7 @@ SUPPORTED_MODELS = [
292
325
  in_service=True,
293
326
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
294
327
  model_type='instruction-tuned',
295
- description=(
296
- 'Gemini 1.5 Flash model (version 002).'
297
- ),
328
+ description='Gemini 1.5 Flash model (version 002).',
298
329
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
299
330
  context_length=lf.ModelInfo.ContextLength(
300
331
  max_input_tokens=1_048_576,
@@ -320,9 +351,7 @@ SUPPORTED_MODELS = [
320
351
  in_service=True,
321
352
  provider='Google GenAI',
322
353
  model_type='instruction-tuned',
323
- description=(
324
- 'Gemini 1.5 Flash 8B model (latest stable).'
325
- ),
354
+ description='Gemini 1.5 Flash 8B model (latest stable).',
326
355
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
327
356
  context_length=lf.ModelInfo.ContextLength(
328
357
  max_input_tokens=1_048_576,
@@ -347,9 +376,7 @@ SUPPORTED_MODELS = [
347
376
  in_service=True,
348
377
  provider='Google GenAI',
349
378
  model_type='instruction-tuned',
350
- description=(
351
- 'Gemini 1.5 Flash 8B model (version 001).'
352
- ),
379
+ description='Gemini 1.5 Flash 8B model (version 001).',
353
380
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
354
381
  context_length=lf.ModelInfo.ContextLength(
355
382
  max_input_tokens=1_048_576,
@@ -376,9 +403,7 @@ SUPPORTED_MODELS = [
376
403
  in_service=True,
377
404
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
378
405
  model_type='instruction-tuned',
379
- description=(
380
- 'Gemini 1.5 Pro model (latest stable).'
381
- ),
406
+ description='Gemini 1.5 Pro model (latest stable).',
382
407
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
383
408
  context_length=lf.ModelInfo.ContextLength(
384
409
  max_input_tokens=2_097_152,
@@ -403,9 +428,7 @@ SUPPORTED_MODELS = [
403
428
  in_service=True,
404
429
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
405
430
  model_type='instruction-tuned',
406
- description=(
407
- 'Gemini 1.5 Pro model (version 001).'
408
- ),
431
+ description='Gemini 1.5 Pro model (version 001).',
409
432
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
410
433
  context_length=lf.ModelInfo.ContextLength(
411
434
  max_input_tokens=2_097_152,
@@ -430,9 +453,7 @@ SUPPORTED_MODELS = [
430
453
  in_service=True,
431
454
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
432
455
  model_type='instruction-tuned',
433
- description=(
434
- 'Gemini 1.5 Pro model (version 002).'
435
- ),
456
+ description='Gemini 1.5 Pro model (version 002).',
436
457
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
437
458
  context_length=lf.ModelInfo.ContextLength(
438
459
  max_input_tokens=2_097_152,
@@ -452,20 +473,16 @@ SUPPORTED_MODELS = [
452
473
  max_tokens_per_minute=4_000_000,
453
474
  ),
454
475
  ),
455
-
456
476
  #
457
477
  # Experimental models.
458
478
  #
459
-
460
479
  GeminiModelInfo(
461
480
  model_id='gemini-2.0-pro-exp-02-05',
462
481
  in_service=True,
463
482
  experimental=True,
464
483
  provider=pg.oneof(['Google GenAI', 'VertexAI']),
465
484
  model_type='instruction-tuned',
466
- description=(
467
- 'Gemini 2.0 Pro experimental model (02/05/2025).'
468
- ),
485
+ description='Gemini 2.0 Pro experimental model (02/05/2025).',
469
486
  release_date=datetime.datetime(2025, 2, 5),
470
487
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
471
488
  context_length=lf.ModelInfo.ContextLength(
@@ -495,9 +512,7 @@ SUPPORTED_MODELS = [
495
512
  experimental=True,
496
513
  provider='Google GenAI',
497
514
  model_type='instruction-tuned',
498
- description=(
499
- 'Gemini year 1 experimental model (12/06/2024)'
500
- ),
515
+ description='Gemini year 1 experimental model (12/06/2024)',
501
516
  release_date=datetime.datetime(2025, 1, 21),
502
517
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
503
518
  context_length=lf.ModelInfo.ContextLength(
@@ -511,9 +526,7 @@ SUPPORTED_MODELS = [
511
526
  experimental=True,
512
527
  provider='Google GenAI',
513
528
  model_type='instruction-tuned',
514
- description=(
515
- 'Gemini experimental model on learning science principles.'
516
- ),
529
+ description='Gemini experimental model on learning science principles.',
517
530
  url='https://ai.google.dev/gemini-api/docs/learnlm',
518
531
  release_date=datetime.datetime(2024, 11, 19),
519
532
  input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
@@ -108,6 +108,11 @@ class GeminiExp_20241206(GenAI):
108
108
  #
109
109
 
110
110
 
111
+ class Gemini25ProPreview_20250325(GenAI):
112
+ """Gemini 2.5 Pro model launched on 03/25/2025."""
113
+ model = 'gemini-2.5-pro-preview-03-25'
114
+
115
+
111
116
  class Gemini2Flash(GenAI):
112
117
  """Gemini 2.0 Flash model (latest stable)."""
113
118
  model = 'gemini-2.0-flash'
@@ -166,6 +166,11 @@ class VertexAIGemini(VertexAI, gemini.Gemini):
166
166
  #
167
167
 
168
168
 
169
+ class VertexAIGemini25ProExp_20250325(VertexAIGemini): # pylint: disable=invalid-name
170
+ """Gemini 2.5 Pro model launched on 03/25/2025."""
171
+ model = 'gemini-2.5-pro-exp-03-25'
172
+
173
+
169
174
  class VertexAIGemini2Flash(VertexAIGemini): # pylint: disable=invalid-name
170
175
  """Gemini Flash 2.0 model (latest stable)."""
171
176
  model = 'gemini-2.0-flash'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langfun
3
- Version: 0.1.2.dev202504060803
3
+ Version: 0.1.2.dev202504080804
4
4
  Summary: Langfun: Language as Functions.
5
5
  Home-page: https://github.com/google/langfun
6
6
  Author: Langfun Authors
@@ -81,7 +81,7 @@ langfun/core/eval/v2/reporting.py,sha256=yUIPCAMnp7InIzpv1DDWrcLO-75iiOUTpscj7sm
81
81
  langfun/core/eval/v2/reporting_test.py,sha256=hcPJJaMtPulqERvHYTpId83WXdqDKnnexmULtK7WKwk,5686
82
82
  langfun/core/eval/v2/runners.py,sha256=De4d5QQ-Tpw0nPDODQexDPy0ti-FEgzHBvfH78zqdtg,15945
83
83
  langfun/core/eval/v2/runners_test.py,sha256=A37fKK2MvAVTiShsg_laluJzJ9AuAQn52k7HPbfD0Ks,11666
84
- langfun/core/llms/__init__.py,sha256=F2nqEv9Cc-1QALrlPnIEp-TZiSVTi6U8WWb1YwDt1w0,8038
84
+ langfun/core/llms/__init__.py,sha256=joLhl55EU2BURQGomT6HYYDdkm1hBmgt7SuUfpsyTkw,8180
85
85
  langfun/core/llms/anthropic.py,sha256=K8la8U7g26ibvk_Cy9U7Z8or-kaqQIpaEJ4An9FrXPQ,21690
86
86
  langfun/core/llms/anthropic_test.py,sha256=SSK7OTx3gMYE1NMAi_PqQqeNsCkZAcVJvl_OCEOhyzk,7145
87
87
  langfun/core/llms/azure_openai.py,sha256=-KkSLaR54MlsIqz_XIwv0TnsBnvNTAxnjA2Q2O2u5KM,2733
@@ -92,9 +92,9 @@ 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=xBZEIPTKzWNscomrGhBVBxfEMuMSz48tl2FzCgtaWvU,21334
95
+ langfun/core/llms/gemini.py,sha256=W2W1pqa4-XkrktGDosRV_jJjAukAvR9_jhwfEGN12VM,22641
96
96
  langfun/core/llms/gemini_test.py,sha256=WVdE1_X1cuicUEYd9YnIlV-dO_k_MMIHecBhWQtBNWE,5526
97
- langfun/core/llms/google_genai.py,sha256=mzUdWAShRzz2k_foUo0eIdNOyHs_xjEtbewqYyuD0k0,4768
97
+ langfun/core/llms/google_genai.py,sha256=IANJlhTEvBNAgmK8Rsc_6xguQmwgE76GayESqae4NMk,4906
98
98
  langfun/core/llms/google_genai_test.py,sha256=NKNtpebArQ9ZR7Qsnhd2prFIpMjleojy6o6VMXkJ1zY,1502
99
99
  langfun/core/llms/groq.py,sha256=S9V10kFo3cgX89qPgt_umq-SpRnxEDLTt_hJmpERfbo,12066
100
100
  langfun/core/llms/groq_test.py,sha256=P4EgexCqsh4K2x11w0UL_vz-YYNaPdQU0WsDAdnTRQ8,2045
@@ -106,7 +106,7 @@ langfun/core/llms/openai_compatible_test.py,sha256=I5WWL3lRo-WXnSoUKLkIEjXfwjoiH
106
106
  langfun/core/llms/openai_test.py,sha256=gwuO6aoa296iM2welWV9ua4KF8gEVGsEPakgbtkWkFQ,2687
107
107
  langfun/core/llms/rest.py,sha256=ucMKHXlmg6pYSIMhQSktLmTSGMSIiqO8fp1r_GiEhaU,4333
108
108
  langfun/core/llms/rest_test.py,sha256=_zM7nV8DEVyoXNiQOnuwJ917mWjki0614H88rNmDboE,5020
109
- langfun/core/llms/vertexai.py,sha256=Cf_QeFybIF-dALxdtwy7-ElepSv1ryd6im5-NijwUGE,17646
109
+ langfun/core/llms/vertexai.py,sha256=lzPkv9I71vw4wVWA8vCqWJS74VRi65Gkw_egVgidpXM,17825
110
110
  langfun/core/llms/vertexai_test.py,sha256=dOprP_uLNmXHYxMoX_hMPMsjKR-e_B5nKHjhlMCQoOQ,4252
111
111
  langfun/core/llms/cache/__init__.py,sha256=QAo3InUMDM_YpteNnVCSejI4zOsnjSMWKJKzkb3VY64,993
112
112
  langfun/core/llms/cache/base.py,sha256=rt3zwmyw0y9jsSGW-ZbV1vAfLxQ7_3AVk0l2EySlse4,3918
@@ -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.dev202504060803.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
160
- langfun-0.1.2.dev202504060803.dist-info/METADATA,sha256=4-hkMRxJ8W5j4bAHBFL5wkqa0RuRpIET8DVeqgzbYtU,7692
161
- langfun-0.1.2.dev202504060803.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
162
- langfun-0.1.2.dev202504060803.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
163
- langfun-0.1.2.dev202504060803.dist-info/RECORD,,
159
+ langfun-0.1.2.dev202504080804.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
160
+ langfun-0.1.2.dev202504080804.dist-info/METADATA,sha256=Qq4joLhwX1FKwWkLzatcVGDNwYaGLLyyn113vyKNa1I,7692
161
+ langfun-0.1.2.dev202504080804.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
162
+ langfun-0.1.2.dev202504080804.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
163
+ langfun-0.1.2.dev202504080804.dist-info/RECORD,,