langfun 0.1.2.dev202506190804__py3-none-any.whl → 0.1.2.dev202506210804__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/llms/__init__.py +4 -1
- langfun/core/llms/gemini.py +47 -1
- langfun/core/llms/google_genai.py +12 -0
- langfun/core/llms/vertexai.py +14 -0
- {langfun-0.1.2.dev202506190804.dist-info → langfun-0.1.2.dev202506210804.dist-info}/METADATA +1 -1
- {langfun-0.1.2.dev202506190804.dist-info → langfun-0.1.2.dev202506210804.dist-info}/RECORD +9 -9
- {langfun-0.1.2.dev202506190804.dist-info → langfun-0.1.2.dev202506210804.dist-info}/WHEEL +0 -0
- {langfun-0.1.2.dev202506190804.dist-info → langfun-0.1.2.dev202506210804.dist-info}/licenses/LICENSE +0 -0
- {langfun-0.1.2.dev202506190804.dist-info → langfun-0.1.2.dev202506210804.dist-info}/top_level.txt +0 -0
langfun/core/llms/__init__.py
CHANGED
@@ -40,6 +40,8 @@ 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 Gemini25Pro
|
44
|
+
from langfun.core.llms.google_genai import Gemini25Flash
|
43
45
|
from langfun.core.llms.google_genai import Gemini25ProPreview_20250605
|
44
46
|
from langfun.core.llms.google_genai import Gemini25FlashPreview_20250520
|
45
47
|
from langfun.core.llms.google_genai import Gemini25ProPreview_20250506
|
@@ -56,7 +58,6 @@ from langfun.core.llms.google_genai import Gemini15Flash_002
|
|
56
58
|
from langfun.core.llms.google_genai import Gemini15Flash_001
|
57
59
|
from langfun.core.llms.google_genai import Gemini15Flash8B
|
58
60
|
from langfun.core.llms.google_genai import Gemini15Flash8B_001
|
59
|
-
|
60
61
|
from langfun.core.llms.google_genai import Gemini2ProExp_20250205
|
61
62
|
from langfun.core.llms.google_genai import Gemini2FlashThinkingExp_20250121
|
62
63
|
from langfun.core.llms.google_genai import GeminiExp_20241206
|
@@ -83,6 +84,8 @@ from langfun.core.llms.vertexai import VertexAIGemini25FlashPreview_20250417
|
|
83
84
|
from langfun.core.llms.vertexai import VertexAIGemini25ProPreview_20250506
|
84
85
|
from langfun.core.llms.vertexai import VertexAIGemini25FlashPreview_20250520
|
85
86
|
from langfun.core.llms.vertexai import VertexAIGemini25ProPreview_20250605
|
87
|
+
from langfun.core.llms.vertexai import VertexAIGemini25Pro
|
88
|
+
from langfun.core.llms.vertexai import VertexAIGemini25Flash
|
86
89
|
|
87
90
|
# For backward compatibility.
|
88
91
|
GeminiPro1_5 = Gemini15Pro
|
langfun/core/llms/gemini.py
CHANGED
@@ -151,6 +151,52 @@ SUPPORTED_MODELS = [
|
|
151
151
|
#
|
152
152
|
# Production models.
|
153
153
|
#
|
154
|
+
# Gemini 2.5 Flash
|
155
|
+
GeminiModelInfo(
|
156
|
+
model_id='gemini-2.5-flash',
|
157
|
+
in_service=True,
|
158
|
+
provider=pg.oneof(['Google GenAI', 'VertexAI']),
|
159
|
+
model_type='instruction-tuned',
|
160
|
+
description='Gemini 2.5 Flash GA.',
|
161
|
+
release_date=datetime.datetime(2025, 6, 17),
|
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=0.3,
|
169
|
+
cost_per_1m_input_tokens=0.3,
|
170
|
+
cost_per_1m_output_tokens=2.5,
|
171
|
+
),
|
172
|
+
rate_limits=lf.ModelInfo.RateLimits(
|
173
|
+
max_requests_per_minute=2000,
|
174
|
+
max_tokens_per_minute=4_000_000,
|
175
|
+
),
|
176
|
+
),
|
177
|
+
# Gemini 2.5 Pro
|
178
|
+
GeminiModelInfo(
|
179
|
+
model_id='gemini-2.5-pro',
|
180
|
+
in_service=True,
|
181
|
+
provider=pg.oneof(['Google GenAI', 'VertexAI']),
|
182
|
+
model_type='instruction-tuned',
|
183
|
+
description='Gemini 2.5 Pro GA.',
|
184
|
+
release_date=datetime.datetime(2025, 6, 17),
|
185
|
+
input_modalities=GeminiModelInfo.ALL_SUPPORTED_INPUT_TYPES,
|
186
|
+
context_length=lf.ModelInfo.ContextLength(
|
187
|
+
max_input_tokens=1_048_576,
|
188
|
+
max_output_tokens=65_536,
|
189
|
+
),
|
190
|
+
pricing=GeminiModelInfo.Pricing(
|
191
|
+
cost_per_1m_cached_input_tokens=1.25,
|
192
|
+
cost_per_1m_input_tokens=1.25,
|
193
|
+
cost_per_1m_output_tokens=10.0,
|
194
|
+
),
|
195
|
+
rate_limits=lf.ModelInfo.RateLimits(
|
196
|
+
max_requests_per_minute=2000,
|
197
|
+
max_tokens_per_minute=4_000_000,
|
198
|
+
)
|
199
|
+
),
|
154
200
|
# Gemini 2.5 Pro 0605
|
155
201
|
GeminiModelInfo(
|
156
202
|
model_id='gemini-2.5-pro-preview-06-05',
|
@@ -718,7 +764,7 @@ class Gemini(rest.REST):
|
|
718
764
|
)
|
719
765
|
if options.max_thinking_tokens is not None:
|
720
766
|
config['thinkingConfig'] = {
|
721
|
-
'includeThoughts':
|
767
|
+
'includeThoughts': options.max_thinking_tokens > 0,
|
722
768
|
'thinkingBudget': options.max_thinking_tokens,
|
723
769
|
}
|
724
770
|
|
@@ -86,6 +86,18 @@ class GenAI(gemini.Gemini):
|
|
86
86
|
#
|
87
87
|
|
88
88
|
|
89
|
+
class Gemini25Pro(GenAI):
|
90
|
+
"""Gemini 2.5 Pro GA model."""
|
91
|
+
|
92
|
+
model = 'gemini-2.5-pro'
|
93
|
+
|
94
|
+
|
95
|
+
class Gemini25Flash(GenAI):
|
96
|
+
"""Gemini 2.5 Flash GA model."""
|
97
|
+
|
98
|
+
model = 'gemini-2.5-flash'
|
99
|
+
|
100
|
+
|
89
101
|
class Gemini2ProExp_20250205(GenAI):
|
90
102
|
"""Gemini 2.0 Pro experimental model launched on 02/05/2025."""
|
91
103
|
model = 'gemini-2.0-pro-exp-02-05'
|
langfun/core/llms/vertexai.py
CHANGED
@@ -177,6 +177,20 @@ class VertexAIGemini(VertexAI, gemini.Gemini):
|
|
177
177
|
#
|
178
178
|
# Production models.
|
179
179
|
#
|
180
|
+
class VertexAIGemini25Pro(VertexAIGemini): # pylint: disable=invalid-name
|
181
|
+
"""Gemini 2.5 Pro GA model launched on 06/17/2025."""
|
182
|
+
|
183
|
+
model = 'gemini-2.5-pro'
|
184
|
+
location = 'global'
|
185
|
+
|
186
|
+
|
187
|
+
class VertexAIGemini25Flash(VertexAIGemini): # pylint: disable=invalid-name
|
188
|
+
"""Gemini 2.5 Flash GA model launched on 06/17/2025."""
|
189
|
+
|
190
|
+
model = 'gemini-2.5-flash'
|
191
|
+
location = 'global'
|
192
|
+
|
193
|
+
|
180
194
|
class VertexAIGemini25ProPreview_20250605(VertexAIGemini): # pylint: disable=invalid-name
|
181
195
|
"""Gemini 2.5 Pro model launched on 06/05/2025."""
|
182
196
|
model = 'gemini-2.5-pro-preview-06-05'
|
@@ -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=iqbH4jMtnNMhfuv1eHaxJmk1Vvsrz-sAJJFP8U44-tA,16758
|
83
83
|
langfun/core/eval/v2/runners_test.py,sha256=DO3xV0sBNB6n65j41xx2i7gqUCJcPF37DFZLEjrmISg,11987
|
84
|
-
langfun/core/llms/__init__.py,sha256=
|
84
|
+
langfun/core/llms/__init__.py,sha256=CtxUdXohQ8AQk1DqBT6MBy2zdAoPSggNo00SYrj9-AY,9521
|
85
85
|
langfun/core/llms/anthropic.py,sha256=YcQ2VG8iOfXtry_tTpAukmiwXa2hK_9LkpkmXk41Nm0,26226
|
86
86
|
langfun/core/llms/anthropic_test.py,sha256=qA9vByp_cwwXNlXzcwHpPWFnO9lfFo8NKfDi5nBNqgI,9052
|
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=
|
95
|
+
langfun/core/llms/gemini.py,sha256=umrEJGnZb_U4CCbFHicaoVsBuEdZGg7QGNkr-mSJidw,29061
|
96
96
|
langfun/core/llms/gemini_test.py,sha256=y1s0W65SrdepbZxzgIeoTB2MI7sXnfBDf1NsGn57LbM,7617
|
97
|
-
langfun/core/llms/google_genai.py,sha256=
|
97
|
+
langfun/core/llms/google_genai.py,sha256=NO9SX9X3AYp-sNvjt8e90Hjy_ZB4O9l-Y4HhR5X6Zus,5654
|
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=KwOMA7tsmOxFBjezltkBDSU77AvOQ
|
|
106
106
|
langfun/core/llms/openai_test.py,sha256=gwuO6aoa296iM2welWV9ua4KF8gEVGsEPakgbtkWkFQ,2687
|
107
107
|
langfun/core/llms/rest.py,sha256=mY9n0sMAtf0RsvTBgbYHDxGzGD9WLIkocALEHXAL5r4,4583
|
108
108
|
langfun/core/llms/rest_test.py,sha256=_zM7nV8DEVyoXNiQOnuwJ917mWjki0614H88rNmDboE,5020
|
109
|
-
langfun/core/llms/vertexai.py,sha256=
|
109
|
+
langfun/core/llms/vertexai.py,sha256=G-4Hofs5e1-XNrRP0SMGGML9yIHGy_TLTUEV3tLFP3g,19917
|
110
110
|
langfun/core/llms/vertexai_test.py,sha256=_e-acnNBAf9C3WO6i1b2J_mhRzdDdYQTorD9hIVZKOg,5034
|
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.
|
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.dev202506210804.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
160
|
+
langfun-0.1.2.dev202506210804.dist-info/METADATA,sha256=i25ROs-8AoUyciIlqt5Bt2i8XGKXht3okvRFTzG_vZ4,8178
|
161
|
+
langfun-0.1.2.dev202506210804.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
162
|
+
langfun-0.1.2.dev202506210804.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
|
163
|
+
langfun-0.1.2.dev202506210804.dist-info/RECORD,,
|
File without changes
|
{langfun-0.1.2.dev202506190804.dist-info → langfun-0.1.2.dev202506210804.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
{langfun-0.1.2.dev202506190804.dist-info → langfun-0.1.2.dev202506210804.dist-info}/top_level.txt
RENAMED
File without changes
|