langfun 0.1.2.dev202501050804__py3-none-any.whl → 0.1.2.dev202501090804__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/__init__.py +0 -5
- langfun/core/coding/python/correction.py +4 -3
- langfun/core/coding/python/errors.py +10 -9
- langfun/core/coding/python/execution.py +23 -12
- langfun/core/coding/python/execution_test.py +21 -2
- langfun/core/coding/python/generation.py +18 -9
- langfun/core/concurrent.py +2 -3
- langfun/core/console.py +8 -3
- langfun/core/eval/base.py +2 -3
- langfun/core/eval/v2/reporting.py +15 -6
- langfun/core/language_model.py +7 -4
- langfun/core/language_model_test.py +15 -0
- langfun/core/llms/__init__.py +25 -26
- langfun/core/llms/cache/in_memory.py +6 -0
- langfun/core/llms/cache/in_memory_test.py +5 -0
- langfun/core/llms/deepseek.py +261 -0
- langfun/core/llms/deepseek_test.py +438 -0
- langfun/core/llms/gemini.py +507 -0
- langfun/core/llms/gemini_test.py +195 -0
- langfun/core/llms/google_genai.py +46 -320
- langfun/core/llms/google_genai_test.py +9 -204
- langfun/core/llms/openai.py +5 -0
- langfun/core/llms/vertexai.py +31 -359
- langfun/core/llms/vertexai_test.py +6 -166
- langfun/core/structured/mapping.py +13 -13
- langfun/core/structured/mapping_test.py +2 -2
- langfun/core/structured/schema.py +16 -8
- {langfun-0.1.2.dev202501050804.dist-info → langfun-0.1.2.dev202501090804.dist-info}/METADATA +19 -14
- {langfun-0.1.2.dev202501050804.dist-info → langfun-0.1.2.dev202501090804.dist-info}/RECORD +32 -30
- {langfun-0.1.2.dev202501050804.dist-info → langfun-0.1.2.dev202501090804.dist-info}/WHEEL +1 -1
- langfun/core/text_formatting.py +0 -168
- langfun/core/text_formatting_test.py +0 -65
- {langfun-0.1.2.dev202501050804.dist-info → langfun-0.1.2.dev202501090804.dist-info}/LICENSE +0 -0
- {langfun-0.1.2.dev202501050804.dist-info → langfun-0.1.2.dev202501090804.dist-info}/top_level.txt +0 -0
@@ -11,105 +11,18 @@
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
|
-
"""Tests for
|
14
|
+
"""Tests for VertexAI models."""
|
15
15
|
|
16
|
-
import base64
|
17
16
|
import os
|
18
|
-
from typing import Any
|
19
17
|
import unittest
|
20
18
|
from unittest import mock
|
21
19
|
|
22
|
-
import langfun.core as lf
|
23
|
-
from langfun.core import modalities as lf_modalities
|
24
20
|
from langfun.core.llms import vertexai
|
25
|
-
import pyglove as pg
|
26
|
-
import requests
|
27
|
-
|
28
|
-
|
29
|
-
example_image = (
|
30
|
-
b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x04'
|
31
|
-
b'\x03\x00\x00\x00\x12Y \xcb\x00\x00\x00\x18PLTE\x00\x00'
|
32
|
-
b'\x00fff_chaag_cg_ch^ci_ciC\xedb\x94\x00\x00\x00\x08tRNS'
|
33
|
-
b'\x00\n\x9f*\xd4\xff_\xf4\xe4\x8b\xf3a\x00\x00\x00>IDATx'
|
34
|
-
b'\x01c \x05\x08)"\xd8\xcc\xae!\x06pNz\x88k\x19\\Q\xa8"\x10'
|
35
|
-
b'\xc1\x14\x95\x01%\xc1\n\xa143Ta\xa8"D-\x84\x03QM\x98\xc3'
|
36
|
-
b'\x1a\x1a\x1a@5\x0e\x04\xa0q\x88\x05\x00\x07\xf8\x18\xf9'
|
37
|
-
b'\xdao\xd0|\x00\x00\x00\x00IEND\xaeB`\x82'
|
38
|
-
)
|
39
|
-
|
40
|
-
|
41
|
-
def mock_requests_post(url: str, json: dict[str, Any], **kwargs):
|
42
|
-
del url, kwargs
|
43
|
-
c = pg.Dict(json['generationConfig'])
|
44
|
-
content = json['contents'][0]['parts'][0]['text']
|
45
|
-
response = requests.Response()
|
46
|
-
response.status_code = 200
|
47
|
-
response._content = pg.to_json_str({
|
48
|
-
'candidates': [
|
49
|
-
{
|
50
|
-
'content': {
|
51
|
-
'role': 'model',
|
52
|
-
'parts': [
|
53
|
-
{
|
54
|
-
'text': (
|
55
|
-
f'This is a response to {content} with '
|
56
|
-
f'temperature={c.temperature}, '
|
57
|
-
f'top_p={c.topP}, '
|
58
|
-
f'top_k={c.topK}, '
|
59
|
-
f'max_tokens={c.maxOutputTokens}, '
|
60
|
-
f'stop={"".join(c.stopSequences)}.'
|
61
|
-
)
|
62
|
-
},
|
63
|
-
],
|
64
|
-
},
|
65
|
-
},
|
66
|
-
],
|
67
|
-
'usageMetadata': {
|
68
|
-
'promptTokenCount': 3,
|
69
|
-
'candidatesTokenCount': 4,
|
70
|
-
}
|
71
|
-
}).encode()
|
72
|
-
return response
|
73
21
|
|
74
22
|
|
75
23
|
class VertexAITest(unittest.TestCase):
|
76
24
|
"""Tests for Vertex model with REST API."""
|
77
25
|
|
78
|
-
def test_content_from_message_text_only(self):
|
79
|
-
text = 'This is a beautiful day'
|
80
|
-
model = vertexai.VertexAIGeminiPro1_5_002()
|
81
|
-
chunks = model._content_from_message(lf.UserMessage(text))
|
82
|
-
self.assertEqual(chunks, {'role': 'user', 'parts': [{'text': text}]})
|
83
|
-
|
84
|
-
def test_content_from_message_mm(self):
|
85
|
-
image = lf_modalities.Image.from_bytes(example_image)
|
86
|
-
message = lf.UserMessage(
|
87
|
-
'This is an <<[[image]]>>, what is it?', image=image
|
88
|
-
)
|
89
|
-
|
90
|
-
# Non-multimodal model.
|
91
|
-
with self.assertRaisesRegex(lf.ModalityError, 'Unsupported modality'):
|
92
|
-
vertexai.VertexAIGeminiPro1()._content_from_message(message)
|
93
|
-
|
94
|
-
model = vertexai.VertexAIGeminiPro1Vision()
|
95
|
-
content = model._content_from_message(message)
|
96
|
-
self.assertEqual(
|
97
|
-
content,
|
98
|
-
{
|
99
|
-
'role': 'user',
|
100
|
-
'parts': [
|
101
|
-
{'text': 'This is an'},
|
102
|
-
{
|
103
|
-
'inlineData': {
|
104
|
-
'data': base64.b64encode(example_image).decode(),
|
105
|
-
'mimeType': 'image/png',
|
106
|
-
}
|
107
|
-
},
|
108
|
-
{'text': ', what is it?'},
|
109
|
-
],
|
110
|
-
},
|
111
|
-
)
|
112
|
-
|
113
26
|
@mock.patch.object(vertexai.VertexAI, 'credentials', new=True)
|
114
27
|
def test_project_and_location_check(self):
|
115
28
|
with self.assertRaisesRegex(ValueError, 'Please specify `project`'):
|
@@ -126,87 +39,14 @@ class VertexAITest(unittest.TestCase):
|
|
126
39
|
|
127
40
|
os.environ['VERTEXAI_PROJECT'] = 'abc'
|
128
41
|
os.environ['VERTEXAI_LOCATION'] = 'us-central1'
|
129
|
-
|
42
|
+
model = vertexai.VertexAIGeminiPro1()
|
43
|
+
self.assertTrue(model.model_id.startswith('VertexAI('))
|
44
|
+
self.assertIn('us-central1', model.api_endpoint)
|
45
|
+
self.assertTrue(model._api_initialized)
|
46
|
+
self.assertIsNotNone(model._session)
|
130
47
|
del os.environ['VERTEXAI_PROJECT']
|
131
48
|
del os.environ['VERTEXAI_LOCATION']
|
132
49
|
|
133
|
-
def test_generation_config(self):
|
134
|
-
model = vertexai.VertexAIGeminiPro1()
|
135
|
-
json_schema = {
|
136
|
-
'type': 'object',
|
137
|
-
'properties': {
|
138
|
-
'name': {'type': 'string'},
|
139
|
-
},
|
140
|
-
'required': ['name'],
|
141
|
-
'title': 'Person',
|
142
|
-
}
|
143
|
-
actual = model._generation_config(
|
144
|
-
lf.UserMessage('hi', json_schema=json_schema),
|
145
|
-
lf.LMSamplingOptions(
|
146
|
-
temperature=2.0,
|
147
|
-
top_p=1.0,
|
148
|
-
top_k=20,
|
149
|
-
max_tokens=1024,
|
150
|
-
stop=['\n'],
|
151
|
-
),
|
152
|
-
)
|
153
|
-
self.assertEqual(
|
154
|
-
actual,
|
155
|
-
dict(
|
156
|
-
candidateCount=1,
|
157
|
-
temperature=2.0,
|
158
|
-
topP=1.0,
|
159
|
-
topK=20,
|
160
|
-
maxOutputTokens=1024,
|
161
|
-
stopSequences=['\n'],
|
162
|
-
responseLogprobs=False,
|
163
|
-
logprobs=None,
|
164
|
-
seed=None,
|
165
|
-
responseMimeType='application/json',
|
166
|
-
responseSchema={
|
167
|
-
'type': 'object',
|
168
|
-
'properties': {
|
169
|
-
'name': {'type': 'string'}
|
170
|
-
},
|
171
|
-
'required': ['name'],
|
172
|
-
'title': 'Person',
|
173
|
-
}
|
174
|
-
),
|
175
|
-
)
|
176
|
-
with self.assertRaisesRegex(
|
177
|
-
ValueError, '`json_schema` must be a dict, got'
|
178
|
-
):
|
179
|
-
model._generation_config(
|
180
|
-
lf.UserMessage('hi', json_schema='not a dict'),
|
181
|
-
lf.LMSamplingOptions(),
|
182
|
-
)
|
183
|
-
|
184
|
-
@mock.patch.object(vertexai.VertexAI, 'credentials', new=True)
|
185
|
-
def test_call_model(self):
|
186
|
-
with mock.patch('requests.Session.post') as mock_generate:
|
187
|
-
mock_generate.side_effect = mock_requests_post
|
188
|
-
|
189
|
-
lm = vertexai.VertexAIGeminiPro1_5_002(
|
190
|
-
project='abc', location='us-central1'
|
191
|
-
)
|
192
|
-
r = lm(
|
193
|
-
'hello',
|
194
|
-
temperature=2.0,
|
195
|
-
top_p=1.0,
|
196
|
-
top_k=20,
|
197
|
-
max_tokens=1024,
|
198
|
-
stop='\n',
|
199
|
-
)
|
200
|
-
self.assertEqual(
|
201
|
-
r.text,
|
202
|
-
(
|
203
|
-
'This is a response to hello with temperature=2.0, '
|
204
|
-
'top_p=1.0, top_k=20, max_tokens=1024, stop=\n.'
|
205
|
-
),
|
206
|
-
)
|
207
|
-
self.assertEqual(r.metadata.usage.prompt_tokens, 3)
|
208
|
-
self.assertEqual(r.metadata.usage.completion_tokens, 4)
|
209
|
-
|
210
50
|
|
211
51
|
if __name__ == '__main__':
|
212
52
|
unittest.main()
|
@@ -46,15 +46,15 @@ class MappingError(Exception): # pylint: disable=g-bad-exception-name
|
|
46
46
|
r = io.StringIO()
|
47
47
|
error_message = str(self.cause).rstrip()
|
48
48
|
r.write(
|
49
|
-
|
49
|
+
pg.colored(
|
50
50
|
f'{self.cause.__class__.__name__}: {error_message}', 'magenta'
|
51
51
|
)
|
52
52
|
)
|
53
53
|
if include_lm_response:
|
54
54
|
r.write('\n\n')
|
55
|
-
r.write(
|
55
|
+
r.write(pg.colored('[LM Response]', 'blue', styles=['bold']))
|
56
56
|
r.write('\n')
|
57
|
-
r.write(
|
57
|
+
r.write(pg.colored(self.lm_response.text, 'blue'))
|
58
58
|
return r.getvalue()
|
59
59
|
|
60
60
|
|
@@ -163,27 +163,27 @@ class MappingExample(lf.NaturalLanguageFormattable,
|
|
163
163
|
def natural_language_format(self) -> str:
|
164
164
|
result = io.StringIO()
|
165
165
|
if self.context:
|
166
|
-
result.write(
|
167
|
-
result.write(
|
166
|
+
result.write(pg.colored('[CONTEXT]\n', styles=['bold']))
|
167
|
+
result.write(pg.colored(self.context, color='magenta'))
|
168
168
|
result.write('\n\n')
|
169
169
|
|
170
|
-
result.write(
|
171
|
-
result.write(
|
170
|
+
result.write(pg.colored('[INPUT]\n', styles=['bold']))
|
171
|
+
result.write(pg.colored(self.input_repr(), color='green'))
|
172
172
|
|
173
173
|
if self.schema is not None:
|
174
174
|
result.write('\n\n')
|
175
|
-
result.write(
|
176
|
-
result.write(
|
175
|
+
result.write(pg.colored('[SCHEMA]\n', styles=['bold']))
|
176
|
+
result.write(pg.colored(self.schema_repr(), color='red'))
|
177
177
|
|
178
178
|
if schema_lib.MISSING != self.output:
|
179
179
|
result.write('\n\n')
|
180
|
-
result.write(
|
181
|
-
result.write(
|
180
|
+
result.write(pg.colored('[OUTPUT]\n', styles=['bold']))
|
181
|
+
result.write(pg.colored(self.output_repr(), color='blue'))
|
182
182
|
|
183
183
|
if self.metadata:
|
184
184
|
result.write('\n\n')
|
185
|
-
result.write(
|
186
|
-
result.write(
|
185
|
+
result.write(pg.colored('[METADATA]\n', styles=['bold']))
|
186
|
+
result.write(pg.colored(str(self.metadata), color='cyan'))
|
187
187
|
return result.getvalue().strip()
|
188
188
|
|
189
189
|
@classmethod
|
@@ -29,11 +29,11 @@ class MappingErrorTest(unittest.TestCase):
|
|
29
29
|
lf.AIMessage('hi'), ValueError('Cannot parse message.')
|
30
30
|
)
|
31
31
|
self.assertEqual(
|
32
|
-
|
32
|
+
pg.decolor(str(error)),
|
33
33
|
'ValueError: Cannot parse message.\n\n[LM Response]\nhi',
|
34
34
|
)
|
35
35
|
self.assertEqual(
|
36
|
-
|
36
|
+
pg.decolor(error.format(include_lm_response=False)),
|
37
37
|
'ValueError: Cannot parse message.',
|
38
38
|
)
|
39
39
|
|
@@ -91,20 +91,25 @@ class SchemaError(Exception): # pylint: disable=g-bad-exception-name
|
|
91
91
|
def __str__(self):
|
92
92
|
r = io.StringIO()
|
93
93
|
r.write(
|
94
|
-
|
94
|
+
pg.colored(
|
95
|
+
f'{self.cause.__class__.__name__}: {self.cause}', 'magenta'
|
96
|
+
)
|
97
|
+
)
|
95
98
|
|
96
99
|
r.write('\n')
|
97
|
-
r.write(
|
100
|
+
r.write(pg.colored('Schema:', 'red'))
|
98
101
|
r.write('\n\n')
|
99
102
|
r.write(textwrap.indent(
|
100
|
-
|
103
|
+
pg.colored(
|
104
|
+
schema_repr(self.protocol).repr(self.schema), 'magenta'
|
105
|
+
),
|
101
106
|
' ' * 2
|
102
107
|
))
|
103
108
|
r.write('\n\n')
|
104
|
-
r.write(
|
109
|
+
r.write(pg.colored('Generated value:', 'red'))
|
105
110
|
r.write('\n\n')
|
106
111
|
r.write(textwrap.indent(
|
107
|
-
|
112
|
+
pg.colored(value_repr(self.protocol).repr(self.value), 'magenta'),
|
108
113
|
' ' * 2
|
109
114
|
))
|
110
115
|
return r.getvalue()
|
@@ -759,12 +764,15 @@ class JsonError(Exception):
|
|
759
764
|
def __str__(self) -> str:
|
760
765
|
r = io.StringIO()
|
761
766
|
r.write(
|
762
|
-
|
767
|
+
pg.colored(
|
768
|
+
f'{self.cause.__class__.__name__}: {self.cause}', 'magenta'
|
769
|
+
)
|
770
|
+
)
|
763
771
|
|
764
772
|
r.write('\n\n')
|
765
|
-
r.write(
|
773
|
+
r.write(pg.colored('JSON text:', 'red'))
|
766
774
|
r.write('\n\n')
|
767
|
-
r.write(textwrap.indent(
|
775
|
+
r.write(textwrap.indent(pg.colored(self.json, 'magenta'), ' ' * 2))
|
768
776
|
return r.getvalue()
|
769
777
|
|
770
778
|
|
{langfun-0.1.2.dev202501050804.dist-info → langfun-0.1.2.dev202501090804.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: langfun
|
3
|
-
Version: 0.1.2.
|
3
|
+
Version: 0.1.2.dev202501090804
|
4
4
|
Summary: Langfun: Language as Functions.
|
5
5
|
Home-page: https://github.com/google/langfun
|
6
6
|
Author: Langfun Authors
|
@@ -30,7 +30,7 @@ Requires-Dist: jinja2>=3.1.2; extra == "all"
|
|
30
30
|
Requires-Dist: requests>=2.31.0; extra == "all"
|
31
31
|
Requires-Dist: termcolor==1.1.0; extra == "all"
|
32
32
|
Requires-Dist: tqdm>=4.64.1; extra == "all"
|
33
|
-
Requires-Dist: google-
|
33
|
+
Requires-Dist: google-auth>=2.16.0; extra == "all"
|
34
34
|
Requires-Dist: python-magic>=0.4.27; extra == "all"
|
35
35
|
Requires-Dist: python-docx>=0.8.11; extra == "all"
|
36
36
|
Requires-Dist: pillow>=10.0.0; extra == "all"
|
@@ -39,12 +39,8 @@ Requires-Dist: pandas>=2.0.3; extra == "all"
|
|
39
39
|
Provides-Extra: ui
|
40
40
|
Requires-Dist: termcolor==1.1.0; extra == "ui"
|
41
41
|
Requires-Dist: tqdm>=4.64.1; extra == "ui"
|
42
|
-
Provides-Extra:
|
43
|
-
Requires-Dist: google-
|
44
|
-
Provides-Extra: llm-google
|
45
|
-
Requires-Dist: google-generativeai>=0.3.2; extra == "llm-google"
|
46
|
-
Provides-Extra: llm-google-genai
|
47
|
-
Requires-Dist: google-generativeai>=0.3.2; extra == "llm-google-genai"
|
42
|
+
Provides-Extra: vertexai
|
43
|
+
Requires-Dist: google-auth>=2.16.0; extra == "vertexai"
|
48
44
|
Provides-Extra: mime
|
49
45
|
Requires-Dist: python-magic>=0.4.27; extra == "mime"
|
50
46
|
Requires-Dist: python-docx>=0.8.11; extra == "mime"
|
@@ -60,6 +56,17 @@ Requires-Dist: pillow>=10.0.0; extra == "mime-pil"
|
|
60
56
|
Provides-Extra: mime-xlsx
|
61
57
|
Requires-Dist: openpyxl>=3.1.0; extra == "mime-xlsx"
|
62
58
|
Requires-Dist: pandas>=2.0.3; extra == "mime-xlsx"
|
59
|
+
Dynamic: author
|
60
|
+
Dynamic: author-email
|
61
|
+
Dynamic: classifier
|
62
|
+
Dynamic: description
|
63
|
+
Dynamic: description-content-type
|
64
|
+
Dynamic: home-page
|
65
|
+
Dynamic: keywords
|
66
|
+
Dynamic: license
|
67
|
+
Dynamic: provides-extra
|
68
|
+
Dynamic: requires-dist
|
69
|
+
Dynamic: summary
|
63
70
|
|
64
71
|
<div align="center">
|
65
72
|
<img src="https://raw.githubusercontent.com/google/langfun/main/docs/_static/logo.svg" width="520px" alt="logo"></img>
|
@@ -201,9 +208,7 @@ If you want to customize your installation, you can select specific features usi
|
|
201
208
|
| Tag | Description |
|
202
209
|
| ------------------- | ---------------------------------------- |
|
203
210
|
| all | All Langfun features. |
|
204
|
-
|
|
205
|
-
| llm-google | All supported Google-powered LLMs. |
|
206
|
-
| llm-google-genai | LLMs powered by Google Generative AI API |
|
211
|
+
| vertexai | VertexAI access. |
|
207
212
|
| mime | All MIME supports. |
|
208
213
|
| mime-auto | Automatic MIME type detection. |
|
209
214
|
| mime-docx | DocX format support. |
|
@@ -212,9 +217,9 @@ If you want to customize your installation, you can select specific features usi
|
|
212
217
|
| ui | UI enhancements |
|
213
218
|
|
214
219
|
|
215
|
-
For example, to install a nightly build that includes
|
220
|
+
For example, to install a nightly build that includes VertexAI access, full modality support, and UI enhancements, use:
|
216
221
|
```
|
217
|
-
pip install langfun[
|
222
|
+
pip install langfun[vertexai,mime,ui] --pre
|
218
223
|
```
|
219
224
|
|
220
225
|
*Disclaimer: this is not an officially supported Google product.*
|
@@ -1,15 +1,15 @@
|
|
1
1
|
langfun/__init__.py,sha256=fhfPXpHN7GoGqixpFfqhQkYxFs_siP_LhbjZhd3lhio,2497
|
2
|
-
langfun/core/__init__.py,sha256=
|
2
|
+
langfun/core/__init__.py,sha256=1fHngxhnpxYaVzNMPnifU2JXKaC4LdJGTGp0VnbaXUo,4580
|
3
3
|
langfun/core/component.py,sha256=HVrEoTL1Y01iqOHC3FYdbAOnffqfHHtGJXoK1vkdEwo,11583
|
4
4
|
langfun/core/component_test.py,sha256=sG-T2wpvBfHqWGZE7sc4NayJj2aj5QFBzSwFiwrGEIc,10376
|
5
|
-
langfun/core/concurrent.py,sha256=
|
5
|
+
langfun/core/concurrent.py,sha256=zhZX-YpByUKXWwarlDZFfY8TMW4r71jSW_wDlLhB980,29485
|
6
6
|
langfun/core/concurrent_test.py,sha256=ILlAjfhV84yJfY1QLe3N9aYry1sCjY-ywfIlXGafenI,17336
|
7
|
-
langfun/core/console.py,sha256=
|
7
|
+
langfun/core/console.py,sha256=bGwuJZRs_9NNKY1KmJjIZLeoQ_fL0BikAJPLDVdp1hw,2558
|
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=fKIAqcSNI_7M6nwoZW77HEam8Oa6vcWhsCNgVJanzb4,8822
|
11
|
-
langfun/core/language_model.py,sha256=
|
12
|
-
langfun/core/language_model_test.py,sha256=
|
11
|
+
langfun/core/language_model.py,sha256=lQFHIEAHMNZtKNQ5tG6Gb74dGcfvy5mA4eeftYhnEOg,33881
|
12
|
+
langfun/core/language_model_test.py,sha256=lFPXBcxofvvL6u5GEpAAbsPxIDmk0Wy038SQ_mBIOz8,32153
|
13
13
|
langfun/core/logging.py,sha256=W3mLEMXdo210Q5OX3a1ZTc4nU-xMy73-IfNKnsA-RFo,8051
|
14
14
|
langfun/core/logging_test.py,sha256=N7-YvSXC8zvnr2SNwWHOykn1CFmqvIuTLDgn41Ku9JU,6642
|
15
15
|
langfun/core/memory.py,sha256=f-asN1F7Vehgdn_fK84v73GrEUOxRtaW934keutTKjk,2416
|
@@ -25,8 +25,6 @@ langfun/core/subscription.py,sha256=euawEuSZP-BHydaT-AQpfYFL0m5pWPGcW0upFhrojqc,
|
|
25
25
|
langfun/core/subscription_test.py,sha256=Y4ZdbZEwm83YNZBxHff0QR4QUa4rdaNXA3_jfIcArBo,8717
|
26
26
|
langfun/core/template.py,sha256=jNhYSrbLIn9kZOa03w5QZbyjgfnzJzE_ZrrMvvWY4t4,24929
|
27
27
|
langfun/core/template_test.py,sha256=g7x4mgNIAXEEj-4W1D5whGfl5YikLEQoylKPzaeDomk,17069
|
28
|
-
langfun/core/text_formatting.py,sha256=d7t9vaY6aCn1dkfkikpNYnBy5E_i93vHbfyDWFclGZU,5284
|
29
|
-
langfun/core/text_formatting_test.py,sha256=ck0Xzdd4YF4CtCUj7VE0GybfbAyKQ8p3xkM1FBGrqIk,2096
|
30
28
|
langfun/core/agentic/__init__.py,sha256=ndoDX0sAYsa3eVdXuu6nB-a-BH5TaK3urW6zAaFiyVs,1110
|
31
29
|
langfun/core/agentic/action.py,sha256=yW5-2NRHIrQmmQEYmL83aIdSwaRfUez9mqCbME_aBWQ,25391
|
32
30
|
langfun/core/agentic/action_eval.py,sha256=ZtjTh34S7XPIUqandQ0YwAtzw-S7ofuZ7rRXnRbUMdQ,4424
|
@@ -34,20 +32,20 @@ langfun/core/agentic/action_eval_test.py,sha256=tRUkWmOE9p0rpNOq19xAY2oDEnYsEEyk
|
|
34
32
|
langfun/core/agentic/action_test.py,sha256=Gu7P5XQvzqbKawn2jjyTpWaARzzhzO04KkC1TuBnUnw,4612
|
35
33
|
langfun/core/coding/__init__.py,sha256=5utju_fwEsImaiftx4oXKl9FAM8p281k8-Esdh_-m1w,835
|
36
34
|
langfun/core/coding/python/__init__.py,sha256=MJ-vubliz-ebrZH3OBRKBwMi0S9-FrhGCp8YQLR6_I4,1776
|
37
|
-
langfun/core/coding/python/correction.py,sha256=
|
35
|
+
langfun/core/coding/python/correction.py,sha256=SR_ZP8MYqvipFi5Scsl_5FYzBRRTwRehig79r67ZdlM,7129
|
38
36
|
langfun/core/coding/python/correction_test.py,sha256=qGxXuHaO32onF6cAoTfO1_sH_lM7-3dE9UqaaU8Myxs,4215
|
39
|
-
langfun/core/coding/python/errors.py,sha256=
|
37
|
+
langfun/core/coding/python/errors.py,sha256=KDn0bJH-34dUM5fp3Ocgn3HvWg1XYgFnxCSiWXGNI1c,3162
|
40
38
|
langfun/core/coding/python/errors_test.py,sha256=_ZbWJCFIb-FkCK7K1zCuH8W3x_NFt-jNe3dfP8yqaD4,2323
|
41
|
-
langfun/core/coding/python/execution.py,sha256=
|
42
|
-
langfun/core/coding/python/execution_test.py,sha256=
|
43
|
-
langfun/core/coding/python/generation.py,sha256=
|
39
|
+
langfun/core/coding/python/execution.py,sha256=vf8AzDcL_9xh-kpTKWywt9gV7Pc8KLghOHj6hrpiqS8,10762
|
40
|
+
langfun/core/coding/python/execution_test.py,sha256=xBsk5OZuuEY1_w7dxu25akL-NVHm02xjzyOQ2rPWhgY,7693
|
41
|
+
langfun/core/coding/python/generation.py,sha256=MqzoFdB3v7BtrAzqIMMyH8RvqaNJ6TSqZ9Xw-iPmPTI,8427
|
44
42
|
langfun/core/coding/python/generation_test.py,sha256=54bgKr1DgzYFLoqR8bTn7Yjol0gPCuR6XvRltR4l6YM,2777
|
45
43
|
langfun/core/coding/python/parsing.py,sha256=LMg8REP4VDY0YQjtPAGNAW4rKlMNdSXF8m19wMT9yrY,7128
|
46
44
|
langfun/core/coding/python/parsing_test.py,sha256=9vAWF484kWIm6JZq8NFiMgKUDhXV-deRl1QMmNERfAA,7386
|
47
45
|
langfun/core/coding/python/permissions.py,sha256=1QWGHvzL8MM0Ok_auQ9tURqZHtdOfJaDpBzZ29GUE-c,2544
|
48
46
|
langfun/core/coding/python/permissions_test.py,sha256=w5EDb8QxpxgJyZkojyzVWQvDfg366zn99-g__6TbPQ0,2699
|
49
47
|
langfun/core/eval/__init__.py,sha256=OEXr1ZRuvLuhJJfuQ1ZWQ-SvYzjyrtiAAEogYaB7E6o,1933
|
50
|
-
langfun/core/eval/base.py,sha256=
|
48
|
+
langfun/core/eval/base.py,sha256=XXerMVkK4wREo7K1_aCyay6vDjw3mfs389XThAdzv50,75768
|
51
49
|
langfun/core/eval/base_test.py,sha256=-LsIV9DXlDal0EnOlaWpibJvfef0NbxtZAm0OH_abAE,27189
|
52
50
|
langfun/core/eval/matching.py,sha256=AVKkGoc-BaHEzgSBamaAk3194TgqckDe_dinpS6LrXI,9323
|
53
51
|
langfun/core/eval/matching_test.py,sha256=QCoYEuf4b_1bkHqUCuRzKMbXHrV3AB2FCOBivo1stC4,5249
|
@@ -73,33 +71,37 @@ langfun/core/eval/v2/progress.py,sha256=azZgssQgNdv3IgjKEaQBuGI5ucFDNbdi02P4z_nQ
|
|
73
71
|
langfun/core/eval/v2/progress_test.py,sha256=YU7VHzmy5knPZwj9vpBN3rQQH2tukj9eKHkuBCI62h8,2540
|
74
72
|
langfun/core/eval/v2/progress_tracking.py,sha256=l9fEkz4oP5McpZzf72Ua7PYm3lAWtRru7gRWNf8H0ms,6083
|
75
73
|
langfun/core/eval/v2/progress_tracking_test.py,sha256=fouMVJkFJqHjbhQJngGLGCmA9x3n0dU4USI2dY163mg,2291
|
76
|
-
langfun/core/eval/v2/reporting.py,sha256=
|
74
|
+
langfun/core/eval/v2/reporting.py,sha256=QOp5jX761Esvi5w_UIRLDqPY_XRO6ru02-DOrdqVK_4,8392
|
77
75
|
langfun/core/eval/v2/reporting_test.py,sha256=UmYSAQvD3AIXsSyWQ-WD2uLtEISYpmBeoKY5u5Qwc8E,5696
|
78
76
|
langfun/core/eval/v2/runners.py,sha256=DKEmSlGXjOXKWFdBhTpLy7tMsBHZHd1Brl3hWIngsSQ,15931
|
79
77
|
langfun/core/eval/v2/runners_test.py,sha256=A37fKK2MvAVTiShsg_laluJzJ9AuAQn52k7HPbfD0Ks,11666
|
80
|
-
langfun/core/llms/__init__.py,sha256=
|
78
|
+
langfun/core/llms/__init__.py,sha256=AvKRIryNNDgL3fchzNp25NPh95ojI5lOnT8XHaJS_BE,6639
|
81
79
|
langfun/core/llms/anthropic.py,sha256=a5MmnFsBA0CbfvwzXT1v_0fqLRMrhUNdh1tx6469PQ4,14357
|
82
80
|
langfun/core/llms/anthropic_test.py,sha256=-2U4kc_pgBM7wqxu8RuxzyHPGww1EAWqKUvN4PW8Btw,8058
|
83
81
|
langfun/core/llms/compositional.py,sha256=csW_FLlgL-tpeyCOTVvfUQkMa_zCN5Y2I-YbSNuK27U,2872
|
84
82
|
langfun/core/llms/compositional_test.py,sha256=4eTnOer-DncRKGaIJW2ZQQMLnt5r2R0UIx_DYOvGAQo,2027
|
83
|
+
langfun/core/llms/deepseek.py,sha256=HxdLFFar5Mh01kKMyoLGnoYciACwxe2UzSpvKtXbSyw,8471
|
84
|
+
langfun/core/llms/deepseek_test.py,sha256=Eo-FFyW8PWeFH-AbfY6Ib2MARnFlMtEtPIJ86DsTyz4,14856
|
85
85
|
langfun/core/llms/fake.py,sha256=gCHBYBLvBCsC78HI1hpoqXCS-p1FMTgY1P1qh_sGBPk,3070
|
86
86
|
langfun/core/llms/fake_test.py,sha256=2h13qkwEz_JR0mtUDPxdAhQo7MueXaFSwsD2DIRDW9g,7653
|
87
|
-
langfun/core/llms/
|
88
|
-
langfun/core/llms/
|
87
|
+
langfun/core/llms/gemini.py,sha256=tfM4vrt0WnvnrxRhWXZWh7Gp8dYYfMnSbi9uOstkSak,17399
|
88
|
+
langfun/core/llms/gemini_test.py,sha256=2ERhYWCJwnfDTQbCaZHFuB1TdWJFrOBS7yyCBInIdQk,6129
|
89
|
+
langfun/core/llms/google_genai.py,sha256=85Vmx5QmsziON03PRsFQINSu5NF6pAAuFFhUdDteWGc,3662
|
90
|
+
langfun/core/llms/google_genai_test.py,sha256=JZf_cbQ4GGGpwiQCLjFJn7V4jxBBqgZhIx91AzbGKVo,1250
|
89
91
|
langfun/core/llms/groq.py,sha256=dCnR3eAECEKuKKAAj-PDTs8NRHl6CQPdf57m1f6a79U,10312
|
90
92
|
langfun/core/llms/groq_test.py,sha256=GYF_Qtq5S1H1TrKH38t6_lkdroqT7v-joYLDKnmS9e0,5274
|
91
93
|
langfun/core/llms/llama_cpp.py,sha256=9tXQntSCDtjTF3bnyJrAPCr4N6wycy5nXYvp9uduygE,2843
|
92
94
|
langfun/core/llms/llama_cpp_test.py,sha256=MWO_qaOeKjRniGjcaWPDScd7HPaIJemqUZoslrt4FPs,1806
|
93
|
-
langfun/core/llms/openai.py,sha256=
|
95
|
+
langfun/core/llms/openai.py,sha256=g5X_ySW-b2f0uRE8sb3_W1sAB-pWpKLNNoflBoRBwrc,21080
|
94
96
|
langfun/core/llms/openai_test.py,sha256=kOWa1nf-nJvtYY10REUw5wojh3ZgfU8tRaCZ8wUgJbA,16623
|
95
97
|
langfun/core/llms/rest.py,sha256=sWbYUV8S3SuOg9giq7xwD-xDRfaF7NP_ig7bI52-Rj4,3442
|
96
98
|
langfun/core/llms/rest_test.py,sha256=NZ3Nf0XQVpT9kLP5cBVo_yBHLI7vWTYhWQxYEJVMGs4,3472
|
97
|
-
langfun/core/llms/vertexai.py,sha256=
|
98
|
-
langfun/core/llms/vertexai_test.py,sha256=
|
99
|
+
langfun/core/llms/vertexai.py,sha256=MuwLPTJ6-9x2uRDCSM1_biPK6M76FFlL1ezf5OmobDA,5504
|
100
|
+
langfun/core/llms/vertexai_test.py,sha256=iXjmQs7TNiwcueoaRGpdp4KnASkDJaTP__Z9QroN8zQ,1787
|
99
101
|
langfun/core/llms/cache/__init__.py,sha256=QAo3InUMDM_YpteNnVCSejI4zOsnjSMWKJKzkb3VY64,993
|
100
102
|
langfun/core/llms/cache/base.py,sha256=rt3zwmyw0y9jsSGW-ZbV1vAfLxQ7_3AVk0l2EySlse4,3918
|
101
|
-
langfun/core/llms/cache/in_memory.py,sha256=
|
102
|
-
langfun/core/llms/cache/in_memory_test.py,sha256=
|
103
|
+
langfun/core/llms/cache/in_memory.py,sha256=i58oiQL28RDsq37dwqgVpC2mBETJjIEFS20yHiV5MKU,5185
|
104
|
+
langfun/core/llms/cache/in_memory_test.py,sha256=V2UPeu5co5vUwSkjekCH1B1iLm9qQKPaacvP6VW3GTg,10388
|
103
105
|
langfun/core/memories/__init__.py,sha256=HpghfZ-w1NQqzJXBx8Lz0daRhB2rcy2r9Xm491SBhC4,773
|
104
106
|
langfun/core/memories/conversation_history.py,sha256=c9amD8hCxGFiZuVAzkP0dOMWSp8L90uvwkOejjuBqO0,1835
|
105
107
|
langfun/core/memories/conversation_history_test.py,sha256=AaW8aNoFjxNusanwJDV0r3384Mg0eAweGmPx5DIkM0Y,2052
|
@@ -123,13 +125,13 @@ langfun/core/structured/description.py,sha256=6BztYOiucPkF4CrTQtPLPJo1gN2dwnKmaJ
|
|
123
125
|
langfun/core/structured/description_test.py,sha256=UxaXnKKP7TnyPDPUyf3U-zPE0TvLlIP6DGr8thjcePw,7365
|
124
126
|
langfun/core/structured/function_generation.py,sha256=g7AOR_e8HxFU6n6Df750aGkgMgV1KExLZMAz0yd5Agg,8555
|
125
127
|
langfun/core/structured/function_generation_test.py,sha256=LaXYDXf9GlqUrR6v_gtmK_H4kxzonmU7SYbn7XXMgjU,12128
|
126
|
-
langfun/core/structured/mapping.py,sha256=
|
127
|
-
langfun/core/structured/mapping_test.py,sha256=
|
128
|
+
langfun/core/structured/mapping.py,sha256=of-EeBq0RgmkiUaSk2rVEDVCzgn_wXU8tRke7NCcC6E,13649
|
129
|
+
langfun/core/structured/mapping_test.py,sha256=OntYvfDitAf0tAnzQty3YS90vyEn6FY1Mi93r_ViEk8,9594
|
128
130
|
langfun/core/structured/parsing.py,sha256=MGvI7ypXlwfzr5XB8_TFU9Ei0_5reYqkWkv64eAy0EA,12015
|
129
131
|
langfun/core/structured/parsing_test.py,sha256=kNPrhpdPY3iWhUld0TFYU-Zgn44wC0d6YuQ9XdVbQ8o,22346
|
130
132
|
langfun/core/structured/querying.py,sha256=nqvsfMS_KLv5EvO0_VAGEHwY4pHy4S0CvJmeV0HBXlM,23066
|
131
133
|
langfun/core/structured/querying_test.py,sha256=YlC4s9LVChfhGZzaXGW1UYlcBnAjNOunu4SLl5_p7PQ,32054
|
132
|
-
langfun/core/structured/schema.py,sha256=
|
134
|
+
langfun/core/structured/schema.py,sha256=_iqhHEGDQsHk0AsybWnK44sOspTWkKJjci781PWD7x0,27988
|
133
135
|
langfun/core/structured/schema_generation.py,sha256=U3nRQsqmMZg_qIVDh2fiY3K4JLfsAL1LcKzIFP1iXFg,5316
|
134
136
|
langfun/core/structured/schema_generation_test.py,sha256=RM9s71kMNg2jTePwInkiW9fK1ACN37eyPeF8OII-0zw,2950
|
135
137
|
langfun/core/structured/schema_test.py,sha256=RjYhwTgktQgyqAjzLvo967nTiIK9KWgP-aNGg4e7ihE,25258
|
@@ -146,8 +148,8 @@ langfun/core/templates/demonstration.py,sha256=vCrgYubdZM5Umqcgp8NUVGXgr4P_c-fik
|
|
146
148
|
langfun/core/templates/demonstration_test.py,sha256=SafcDQ0WgI7pw05EmPI2S4v1t3ABKzup8jReCljHeK4,2162
|
147
149
|
langfun/core/templates/selfplay.py,sha256=yhgrJbiYwq47TgzThmHrDQTF4nDrTI09CWGhuQPNv-s,2273
|
148
150
|
langfun/core/templates/selfplay_test.py,sha256=Ot__1P1M8oJfoTp-M9-PQ6HUXqZKyMwvZ5f7yQ3yfyM,2326
|
149
|
-
langfun-0.1.2.
|
150
|
-
langfun-0.1.2.
|
151
|
-
langfun-0.1.2.
|
152
|
-
langfun-0.1.2.
|
153
|
-
langfun-0.1.2.
|
151
|
+
langfun-0.1.2.dev202501090804.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
152
|
+
langfun-0.1.2.dev202501090804.dist-info/METADATA,sha256=mzbVRkRzSywU6qRzqZJ5KeGgTUGpYjMepZqt6OJtMJw,8172
|
153
|
+
langfun-0.1.2.dev202501090804.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
154
|
+
langfun-0.1.2.dev202501090804.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
|
155
|
+
langfun-0.1.2.dev202501090804.dist-info/RECORD,,
|