langfun 0.1.2.dev202501310804__py3-none-any.whl → 0.1.2.dev202502020803__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 +2 -0
- langfun/core/llms/deepseek.py +17 -0
- langfun/core/llms/openai.py +22 -0
- {langfun-0.1.2.dev202501310804.dist-info → langfun-0.1.2.dev202502020803.dist-info}/METADATA +1 -1
- {langfun-0.1.2.dev202501310804.dist-info → langfun-0.1.2.dev202502020803.dist-info}/RECORD +8 -8
- {langfun-0.1.2.dev202501310804.dist-info → langfun-0.1.2.dev202502020803.dist-info}/LICENSE +0 -0
- {langfun-0.1.2.dev202501310804.dist-info → langfun-0.1.2.dev202502020803.dist-info}/WHEEL +0 -0
- {langfun-0.1.2.dev202501310804.dist-info → langfun-0.1.2.dev202502020803.dist-info}/top_level.txt +0 -0
langfun/core/llms/__init__.py
CHANGED
@@ -67,6 +67,7 @@ from langfun.core.llms.vertexai import VertexAIGeminiPro1
|
|
67
67
|
# OpenAI models.
|
68
68
|
from langfun.core.llms.openai import OpenAI
|
69
69
|
|
70
|
+
from langfun.core.llms.openai import GptO3Mini
|
70
71
|
from langfun.core.llms.openai import GptO1
|
71
72
|
from langfun.core.llms.openai import GptO1Preview
|
72
73
|
from langfun.core.llms.openai import GptO1Preview_20240912
|
@@ -167,6 +168,7 @@ from langfun.core.llms.groq import GroqMistral_8x7B
|
|
167
168
|
# DeepSeek models.
|
168
169
|
from langfun.core.llms.deepseek import DeepSeek
|
169
170
|
from langfun.core.llms.deepseek import DeepSeekChat
|
171
|
+
from langfun.core.llms.deepseek import DeepSeekReasoner
|
170
172
|
|
171
173
|
# Whisper models.
|
172
174
|
from langfun.core.llms.groq import GroqWhisper_Large_v3
|
langfun/core/llms/deepseek.py
CHANGED
@@ -25,6 +25,13 @@ SUPPORTED_MODELS_AND_SETTINGS = {
|
|
25
25
|
# TODO(yifenglu): The RPM and TPM are arbitrary numbers. Update them once DeepSeek provides concrete guidelines.
|
26
26
|
# DeepSeek doesn't control the rate limit at the moment: https://api-docs.deepseek.com/quick_start/rate_limit
|
27
27
|
# The cost is based on: https://api-docs.deepseek.com/quick_start/pricing
|
28
|
+
'deepseek-reasoner': pg.Dict(
|
29
|
+
in_service=True,
|
30
|
+
rpm=100,
|
31
|
+
tpm=1000000,
|
32
|
+
cost_per_1k_input_tokens=0.00055,
|
33
|
+
cost_per_1k_output_tokens=0.00219,
|
34
|
+
),
|
28
35
|
'deepseek-chat': pg.Dict(
|
29
36
|
in_service=True,
|
30
37
|
rpm=100,
|
@@ -107,6 +114,16 @@ class DeepSeek(openai_compatible.OpenAICompatible):
|
|
107
114
|
return [k for k, v in SUPPORTED_MODELS_AND_SETTINGS.items() if v.in_service]
|
108
115
|
|
109
116
|
|
117
|
+
class DeepSeekReasoner(DeepSeek):
|
118
|
+
"""DeepSeek Reasoner model.
|
119
|
+
|
120
|
+
Currently it is powered by DeepSeek-R1 model, 64k input context, 8k max
|
121
|
+
output, 32k max CoT output.
|
122
|
+
"""
|
123
|
+
|
124
|
+
model = 'deepseek-reasoner'
|
125
|
+
|
126
|
+
|
110
127
|
class DeepSeekChat(DeepSeek):
|
111
128
|
"""DeepSeek Chat model.
|
112
129
|
|
langfun/core/llms/openai.py
CHANGED
@@ -31,6 +31,20 @@ SUPPORTED_MODELS_AND_SETTINGS = {
|
|
31
31
|
# o1 (preview) models.
|
32
32
|
# Pricing in US dollars, from https://openai.com/api/pricing/
|
33
33
|
# as of 2024-10-10.
|
34
|
+
'o3-mini-2025-01-31': pg.Dict(
|
35
|
+
in_service=True,
|
36
|
+
rpm=10000,
|
37
|
+
tpm=5000000,
|
38
|
+
cost_per_1k_input_tokens=0.0011,
|
39
|
+
cost_per_1k_output_tokens=0.0044,
|
40
|
+
),
|
41
|
+
'o3-mini': pg.Dict(
|
42
|
+
in_service=True,
|
43
|
+
rpm=10000,
|
44
|
+
tpm=5000000,
|
45
|
+
cost_per_1k_input_tokens=0.0011,
|
46
|
+
cost_per_1k_output_tokens=0.0044,
|
47
|
+
),
|
34
48
|
'o1': pg.Dict(
|
35
49
|
in_service=True,
|
36
50
|
rpm=10000,
|
@@ -410,6 +424,14 @@ class OpenAI(openai_compatible.OpenAICompatible):
|
|
410
424
|
return super()._request_args(options)
|
411
425
|
|
412
426
|
|
427
|
+
class GptO3Mini(OpenAI):
|
428
|
+
"""GPT-O3-mini."""
|
429
|
+
|
430
|
+
model = 'o3-mini'
|
431
|
+
multimodal = True
|
432
|
+
timeout = None
|
433
|
+
|
434
|
+
|
413
435
|
class GptO1(OpenAI):
|
414
436
|
"""GPT-O1."""
|
415
437
|
|
@@ -73,12 +73,12 @@ langfun/core/eval/v2/reporting.py,sha256=QOp5jX761Esvi5w_UIRLDqPY_XRO6ru02-DOrdq
|
|
73
73
|
langfun/core/eval/v2/reporting_test.py,sha256=UmYSAQvD3AIXsSyWQ-WD2uLtEISYpmBeoKY5u5Qwc8E,5696
|
74
74
|
langfun/core/eval/v2/runners.py,sha256=DKEmSlGXjOXKWFdBhTpLy7tMsBHZHd1Brl3hWIngsSQ,15931
|
75
75
|
langfun/core/eval/v2/runners_test.py,sha256=A37fKK2MvAVTiShsg_laluJzJ9AuAQn52k7HPbfD0Ks,11666
|
76
|
-
langfun/core/llms/__init__.py,sha256=
|
76
|
+
langfun/core/llms/__init__.py,sha256=PKkEVyGBSMc1CZOh8vVN-NCxBPDv3Sctt0fsN7NU1EU,7770
|
77
77
|
langfun/core/llms/anthropic.py,sha256=z_DWDpR1VKNzv6wq-9CXLzWdqCDXRKuVFacJNpgBqAs,10826
|
78
78
|
langfun/core/llms/anthropic_test.py,sha256=zZ2eSP8hhVv-RDSWxT7wX-NS5DfGfQmCjS9P0pusAHM,6556
|
79
79
|
langfun/core/llms/compositional.py,sha256=csW_FLlgL-tpeyCOTVvfUQkMa_zCN5Y2I-YbSNuK27U,2872
|
80
80
|
langfun/core/llms/compositional_test.py,sha256=4eTnOer-DncRKGaIJW2ZQQMLnt5r2R0UIx_DYOvGAQo,2027
|
81
|
-
langfun/core/llms/deepseek.py,sha256=
|
81
|
+
langfun/core/llms/deepseek.py,sha256=9EbuNrngd5BwpsvsEfkW2XQdq3K23S3-jlI8RbMNZF4,4141
|
82
82
|
langfun/core/llms/deepseek_test.py,sha256=dS72i52bwMpCN4dJDvpJI59AnNChpwxS5eYYFrhGh90,1843
|
83
83
|
langfun/core/llms/fake.py,sha256=gCHBYBLvBCsC78HI1hpoqXCS-p1FMTgY1P1qh_sGBPk,3070
|
84
84
|
langfun/core/llms/fake_test.py,sha256=2h13qkwEz_JR0mtUDPxdAhQo7MueXaFSwsD2DIRDW9g,7653
|
@@ -90,7 +90,7 @@ langfun/core/llms/groq.py,sha256=oGxyyCi5TtMVu2POdO8pXS7pK4Es56FtqjghZIGYopc,757
|
|
90
90
|
langfun/core/llms/groq_test.py,sha256=9aOD3nO4dEoH57B-5iOr5DQjG0vyv1jzFtAe7HfoiNg,1963
|
91
91
|
langfun/core/llms/llama_cpp.py,sha256=Z7P3gc4xeIjc2bX0Ey1y5EUYJVMnMa2Q67PZ9iye9sE,1409
|
92
92
|
langfun/core/llms/llama_cpp_test.py,sha256=wfTO7nmUwL65U2kK9P9fcMt92JjNDuVia4G1E7znf_4,1086
|
93
|
-
langfun/core/llms/openai.py,sha256=
|
93
|
+
langfun/core/llms/openai.py,sha256=bIJae2UDO_uwoZGZRYP58GM4FdP4w9qjQhBIYJyGH34,17089
|
94
94
|
langfun/core/llms/openai_compatible.py,sha256=MF9JCc0uTPkIK95uvQTMIBXk4z_xKQMZqQHFaVmXwcA,5898
|
95
95
|
langfun/core/llms/openai_compatible_test.py,sha256=0uFYhCiuHo2Wrlgj16-GRG6rW8P6EaHCUguL3jS0QJ8,16708
|
96
96
|
langfun/core/llms/openai_test.py,sha256=m85YjGCvWvV5ZYagjC0FqI0FcqyCEVCbUUs8Wm3iUrc,2475
|
@@ -148,8 +148,8 @@ langfun/core/templates/demonstration.py,sha256=vCrgYubdZM5Umqcgp8NUVGXgr4P_c-fik
|
|
148
148
|
langfun/core/templates/demonstration_test.py,sha256=SafcDQ0WgI7pw05EmPI2S4v1t3ABKzup8jReCljHeK4,2162
|
149
149
|
langfun/core/templates/selfplay.py,sha256=yhgrJbiYwq47TgzThmHrDQTF4nDrTI09CWGhuQPNv-s,2273
|
150
150
|
langfun/core/templates/selfplay_test.py,sha256=Ot__1P1M8oJfoTp-M9-PQ6HUXqZKyMwvZ5f7yQ3yfyM,2326
|
151
|
-
langfun-0.1.2.
|
152
|
-
langfun-0.1.2.
|
153
|
-
langfun-0.1.2.
|
154
|
-
langfun-0.1.2.
|
155
|
-
langfun-0.1.2.
|
151
|
+
langfun-0.1.2.dev202502020803.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
152
|
+
langfun-0.1.2.dev202502020803.dist-info/METADATA,sha256=FBR3jRNoSYlbTf9g_iW8tBAsi5Aqfhl-NQlBEucc7G8,8172
|
153
|
+
langfun-0.1.2.dev202502020803.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
154
|
+
langfun-0.1.2.dev202502020803.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
|
155
|
+
langfun-0.1.2.dev202502020803.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{langfun-0.1.2.dev202501310804.dist-info → langfun-0.1.2.dev202502020803.dist-info}/top_level.txt
RENAMED
File without changes
|