langfun 0.1.2.dev202409270804__py3-none-any.whl → 0.1.2.dev202409290804__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 +6 -0
- langfun/core/llms/vertexai.py +80 -8
- {langfun-0.1.2.dev202409270804.dist-info → langfun-0.1.2.dev202409290804.dist-info}/METADATA +1 -1
- {langfun-0.1.2.dev202409270804.dist-info → langfun-0.1.2.dev202409290804.dist-info}/RECORD +7 -7
- {langfun-0.1.2.dev202409270804.dist-info → langfun-0.1.2.dev202409290804.dist-info}/LICENSE +0 -0
- {langfun-0.1.2.dev202409270804.dist-info → langfun-0.1.2.dev202409290804.dist-info}/WHEEL +0 -0
- {langfun-0.1.2.dev202409270804.dist-info → langfun-0.1.2.dev202409290804.dist-info}/top_level.txt +0 -0
langfun/core/llms/__init__.py
CHANGED
@@ -103,9 +103,15 @@ from langfun.core.llms.groq import GroqGemma7B_IT
|
|
103
103
|
|
104
104
|
from langfun.core.llms.vertexai import VertexAI
|
105
105
|
from langfun.core.llms.vertexai import VertexAIGeminiPro1_5
|
106
|
+
from langfun.core.llms.vertexai import VertexAIGeminiPro1_5_Latest
|
107
|
+
from langfun.core.llms.vertexai import VertexAIGeminiPro1_5_001
|
108
|
+
from langfun.core.llms.vertexai import VertexAIGeminiPro1_5_002
|
106
109
|
from langfun.core.llms.vertexai import VertexAIGeminiPro1_5_0514
|
107
110
|
from langfun.core.llms.vertexai import VertexAIGeminiPro1_5_0409
|
111
|
+
from langfun.core.llms.vertexai import VertexAIGeminiFlash1_5_Latest
|
108
112
|
from langfun.core.llms.vertexai import VertexAIGeminiFlash1_5
|
113
|
+
from langfun.core.llms.vertexai import VertexAIGeminiFlash1_5_001
|
114
|
+
from langfun.core.llms.vertexai import VertexAIGeminiFlash1_5_002
|
109
115
|
from langfun.core.llms.vertexai import VertexAIGeminiFlash1_5_0514
|
110
116
|
from langfun.core.llms.vertexai import VertexAIGeminiPro1
|
111
117
|
from langfun.core.llms.vertexai import VertexAIGeminiPro1Vision
|
langfun/core/llms/vertexai.py
CHANGED
@@ -41,8 +41,14 @@ except ImportError:
|
|
41
41
|
|
42
42
|
|
43
43
|
SUPPORTED_MODELS_AND_SETTINGS = {
|
44
|
-
'gemini-1.5-pro-001': pg.Dict(api='gemini', rpm=
|
45
|
-
'gemini-1.5-
|
44
|
+
'gemini-1.5-pro-001': pg.Dict(api='gemini', rpm=500),
|
45
|
+
'gemini-1.5-pro-002': pg.Dict(api='gemini', rpm=500),
|
46
|
+
'gemini-1.5-flash-002': pg.Dict(api='gemini', rpm=500),
|
47
|
+
'gemini-1.5-flash-001': pg.Dict(api='gemini', rpm=500),
|
48
|
+
'gemini-1.5-pro': pg.Dict(api='gemini', rpm=500),
|
49
|
+
'gemini-1.5-flash': pg.Dict(api='gemini', rpm=500),
|
50
|
+
'gemini-1.5-pro-latest': pg.Dict(api='gemini', rpm=500),
|
51
|
+
'gemini-1.5-flash-latest': pg.Dict(api='gemini', rpm=500),
|
46
52
|
'gemini-1.5-pro-preview-0514': pg.Dict(api='gemini', rpm=50),
|
47
53
|
'gemini-1.5-pro-preview-0409': pg.Dict(api='gemini', rpm=50),
|
48
54
|
'gemini-1.5-flash-preview-0514': pg.Dict(api='gemini', rpm=200),
|
@@ -412,43 +418,109 @@ _VIDEO_TYPES = [
|
|
412
418
|
'video/3gpp',
|
413
419
|
]
|
414
420
|
|
415
|
-
|
421
|
+
_DOCUMENT_TYPES = [
|
416
422
|
'application/pdf',
|
423
|
+
'text/plain',
|
424
|
+
'text/csv',
|
425
|
+
'text/html',
|
417
426
|
]
|
418
427
|
|
419
428
|
|
429
|
+
class VertexAIGeminiPro1_5_Latest(VertexAI): # pylint: disable=invalid-name
|
430
|
+
"""Vertex AI Gemini 1.5 Pro model."""
|
431
|
+
|
432
|
+
model = 'gemini-1.5-pro-latest'
|
433
|
+
supported_modalities = (
|
434
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
435
|
+
)
|
436
|
+
|
437
|
+
|
420
438
|
class VertexAIGeminiPro1_5(VertexAI): # pylint: disable=invalid-name
|
421
439
|
"""Vertex AI Gemini 1.5 Pro model."""
|
422
440
|
|
441
|
+
model = 'gemini-1.5-pro'
|
442
|
+
supported_modalities = (
|
443
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
444
|
+
)
|
445
|
+
|
446
|
+
|
447
|
+
class VertexAIGeminiPro1_5_002(VertexAI): # pylint: disable=invalid-name
|
448
|
+
"""Vertex AI Gemini 1.5 Pro model."""
|
449
|
+
|
450
|
+
model = 'gemini-1.5-pro-002'
|
451
|
+
supported_modalities = (
|
452
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
453
|
+
)
|
454
|
+
|
455
|
+
|
456
|
+
class VertexAIGeminiPro1_5_001(VertexAI): # pylint: disable=invalid-name
|
457
|
+
"""Vertex AI Gemini 1.5 Pro model."""
|
458
|
+
|
423
459
|
model = 'gemini-1.5-pro-001'
|
424
|
-
supported_modalities =
|
460
|
+
supported_modalities = (
|
461
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
462
|
+
)
|
425
463
|
|
426
464
|
|
427
465
|
class VertexAIGeminiPro1_5_0514(VertexAI): # pylint: disable=invalid-name
|
428
466
|
"""Vertex AI Gemini 1.5 Pro preview model."""
|
429
467
|
|
430
468
|
model = 'gemini-1.5-pro-preview-0514'
|
431
|
-
supported_modalities =
|
469
|
+
supported_modalities = (
|
470
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
471
|
+
)
|
432
472
|
|
433
473
|
|
434
474
|
class VertexAIGeminiPro1_5_0409(VertexAI): # pylint: disable=invalid-name
|
435
475
|
"""Vertex AI Gemini 1.5 Pro preview model."""
|
436
476
|
|
437
477
|
model = 'gemini-1.5-pro-preview-0409'
|
438
|
-
supported_modalities =
|
478
|
+
supported_modalities = (
|
479
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
480
|
+
)
|
481
|
+
|
482
|
+
|
483
|
+
class VertexAIGeminiFlash1_5_Latest(VertexAI): # pylint: disable=invalid-name
|
484
|
+
"""Vertex AI Gemini 1.5 Flash model."""
|
485
|
+
|
486
|
+
model = 'gemini-1.5-flash-latest'
|
487
|
+
supported_modalities = (
|
488
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
489
|
+
)
|
439
490
|
|
440
491
|
|
441
492
|
class VertexAIGeminiFlash1_5(VertexAI): # pylint: disable=invalid-name
|
493
|
+
"""Vertex AI Gemini 1.5 Flash model."""
|
494
|
+
model = 'gemini-1.5-flash'
|
495
|
+
supported_modalities = (
|
496
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
497
|
+
)
|
498
|
+
|
499
|
+
|
500
|
+
class VertexAIGeminiFlash1_5_002(VertexAI): # pylint: disable=invalid-name
|
501
|
+
"""Vertex AI Gemini 1.5 Flash model."""
|
502
|
+
|
503
|
+
model = 'gemini-1.5-flash-002'
|
504
|
+
supported_modalities = (
|
505
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
506
|
+
)
|
507
|
+
|
508
|
+
|
509
|
+
class VertexAIGeminiFlash1_5_001(VertexAI): # pylint: disable=invalid-name
|
442
510
|
"""Vertex AI Gemini 1.5 Flash model."""
|
443
511
|
model = 'gemini-1.5-flash-001'
|
444
|
-
supported_modalities =
|
512
|
+
supported_modalities = (
|
513
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
514
|
+
)
|
445
515
|
|
446
516
|
|
447
517
|
class VertexAIGeminiFlash1_5_0514(VertexAI): # pylint: disable=invalid-name
|
448
518
|
"""Vertex AI Gemini 1.5 Flash preview model."""
|
449
519
|
|
450
520
|
model = 'gemini-1.5-flash-preview-0514'
|
451
|
-
supported_modalities =
|
521
|
+
supported_modalities = (
|
522
|
+
_DOCUMENT_TYPES + _IMAGE_TYPES + _AUDIO_TYPES + _VIDEO_TYPES
|
523
|
+
)
|
452
524
|
|
453
525
|
|
454
526
|
class VertexAIGeminiPro1(VertexAI): # pylint: disable=invalid-name
|
@@ -52,7 +52,7 @@ langfun/core/eval/patching.py,sha256=R0s2eAd1m97exQt06dmUL0V_MBG0W2Hxg7fhNB7cXW0
|
|
52
52
|
langfun/core/eval/patching_test.py,sha256=8kCd54Egjju22FMgtJuxEsrXkW8ifs-UUBHtrCG1L6w,4775
|
53
53
|
langfun/core/eval/scoring.py,sha256=wZz90Iw5Sco3cAiA1T71cJEWhD6qmvMeE1Ai-pez_aY,6210
|
54
54
|
langfun/core/eval/scoring_test.py,sha256=O8olHbrUEg60gMxwOkWzKBJZpZoUlmVnBANX5Se2SXM,4546
|
55
|
-
langfun/core/llms/__init__.py,sha256=
|
55
|
+
langfun/core/llms/__init__.py,sha256=lmOl2HoUYDeAnSJjObd9DfhEuchfvmrJ-GeKTbVFqds,5427
|
56
56
|
langfun/core/llms/anthropic.py,sha256=Gon3fOi31RhZFgNd0ijyTnKnUdp9hrWrCoSXyO4UaLw,7316
|
57
57
|
langfun/core/llms/anthropic_test.py,sha256=T-swuMkfnlgs8Fpif4rtXs579exGk0TsbLMirXDZCkg,5533
|
58
58
|
langfun/core/llms/fake.py,sha256=gCHBYBLvBCsC78HI1hpoqXCS-p1FMTgY1P1qh_sGBPk,3070
|
@@ -67,7 +67,7 @@ langfun/core/llms/openai.py,sha256=vnDrKuD-pli0AtDIDq_TmlltOk7z7_PQ-xpU4K1ARdU,1
|
|
67
67
|
langfun/core/llms/openai_test.py,sha256=UcBFW_7RkkMEo47Tn5RuVRK_DryTN7bb9ITphlzthE8,17762
|
68
68
|
langfun/core/llms/rest.py,sha256=laopuq-zD8V-3Y6eFDngftHEbE66VlUkCD2-rvvRaLU,3388
|
69
69
|
langfun/core/llms/rest_test.py,sha256=NZ3Nf0XQVpT9kLP5cBVo_yBHLI7vWTYhWQxYEJVMGs4,3472
|
70
|
-
langfun/core/llms/vertexai.py,sha256=
|
70
|
+
langfun/core/llms/vertexai.py,sha256=7f1O-G_0yG57QBwfPxVFrDvDBdug2chOX3yKpdsH1XQ,17191
|
71
71
|
langfun/core/llms/vertexai_test.py,sha256=EPR-mB2hNUpvpf7E8m_k5bh04epdQTVUuYU6hPgZyu8,10321
|
72
72
|
langfun/core/llms/cache/__init__.py,sha256=QAo3InUMDM_YpteNnVCSejI4zOsnjSMWKJKzkb3VY64,993
|
73
73
|
langfun/core/llms/cache/base.py,sha256=rt3zwmyw0y9jsSGW-ZbV1vAfLxQ7_3AVk0l2EySlse4,3918
|
@@ -119,8 +119,8 @@ langfun/core/templates/demonstration.py,sha256=vCrgYubdZM5Umqcgp8NUVGXgr4P_c-fik
|
|
119
119
|
langfun/core/templates/demonstration_test.py,sha256=SafcDQ0WgI7pw05EmPI2S4v1t3ABKzup8jReCljHeK4,2162
|
120
120
|
langfun/core/templates/selfplay.py,sha256=yhgrJbiYwq47TgzThmHrDQTF4nDrTI09CWGhuQPNv-s,2273
|
121
121
|
langfun/core/templates/selfplay_test.py,sha256=rBW2Qr8yi-aWYwoTwRR-n1peKyMX9QXPZXURjLgoiRs,2264
|
122
|
-
langfun-0.1.2.
|
123
|
-
langfun-0.1.2.
|
124
|
-
langfun-0.1.2.
|
125
|
-
langfun-0.1.2.
|
126
|
-
langfun-0.1.2.
|
122
|
+
langfun-0.1.2.dev202409290804.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
123
|
+
langfun-0.1.2.dev202409290804.dist-info/METADATA,sha256=CGI7zdw2BGh-WiXv9dNXy7lyVxnCnOBewo77nW8kRkk,8890
|
124
|
+
langfun-0.1.2.dev202409290804.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
125
|
+
langfun-0.1.2.dev202409290804.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
|
126
|
+
langfun-0.1.2.dev202409290804.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{langfun-0.1.2.dev202409270804.dist-info → langfun-0.1.2.dev202409290804.dist-info}/top_level.txt
RENAMED
File without changes
|