pydantic-ai-slim 0.0.49__py3-none-any.whl → 0.0.50__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.
@@ -135,7 +135,8 @@ class GeminiModel(Model):
135
135
  async with self._make_request(
136
136
  messages, False, cast(GeminiModelSettings, model_settings or {}), model_request_parameters
137
137
  ) as http_response:
138
- response = _gemini_response_ta.validate_json(await http_response.aread())
138
+ data = await http_response.aread()
139
+ response = _gemini_response_ta.validate_json(data)
139
140
  return self._process_response(response), _metadata_as_usage(response)
140
141
 
141
142
  @asynccontextmanager
@@ -640,10 +641,7 @@ class _GeminiFunction(TypedDict):
640
641
 
641
642
  def _function_from_abstract_tool(tool: ToolDefinition) -> _GeminiFunction:
642
643
  json_schema = _GeminiJsonSchema(tool.parameters_json_schema).simplify()
643
- f = _GeminiFunction(
644
- name=tool.name,
645
- description=tool.description,
646
- )
644
+ f = _GeminiFunction(name=tool.name, description=tool.description)
647
645
  if json_schema.get('properties'):
648
646
  f['parameters'] = json_schema
649
647
  return f
@@ -770,6 +768,9 @@ class _GeminiJsonSchema:
770
768
  def _simplify(self, schema: dict[str, Any], refs_stack: tuple[str, ...]) -> None:
771
769
  schema.pop('title', None)
772
770
  schema.pop('default', None)
771
+ schema.pop('$schema', None)
772
+ schema.pop('exclusiveMaximum', None)
773
+ schema.pop('exclusiveMinimum', None)
773
774
  if ref := schema.pop('$ref', None):
774
775
  # noinspection PyTypeChecker
775
776
  key = re.sub(r'^#/\$defs/', '', ref)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydantic-ai-slim
3
- Version: 0.0.49
3
+ Version: 0.0.50
4
4
  Summary: Agent Framework / shim to use Pydantic with LLMs, slim package
5
5
  Author-email: Samuel Colvin <samuel@pydantic.dev>
6
6
  License-Expression: MIT
@@ -29,7 +29,7 @@ Requires-Dist: exceptiongroup; python_version < '3.11'
29
29
  Requires-Dist: griffe>=1.3.2
30
30
  Requires-Dist: httpx>=0.27
31
31
  Requires-Dist: opentelemetry-api>=1.28.0
32
- Requires-Dist: pydantic-graph==0.0.49
32
+ Requires-Dist: pydantic-graph==0.0.50
33
33
  Requires-Dist: pydantic>=2.10
34
34
  Requires-Dist: typing-inspection>=0.4.0
35
35
  Provides-Extra: anthropic
@@ -45,7 +45,7 @@ Requires-Dist: cohere>=5.13.11; (platform_system != 'Emscripten') and extra == '
45
45
  Provides-Extra: duckduckgo
46
46
  Requires-Dist: duckduckgo-search>=7.0.0; extra == 'duckduckgo'
47
47
  Provides-Extra: evals
48
- Requires-Dist: pydantic-evals==0.0.49; extra == 'evals'
48
+ Requires-Dist: pydantic-evals==0.0.50; extra == 'evals'
49
49
  Provides-Extra: groq
50
50
  Requires-Dist: groq>=0.15.0; extra == 'groq'
51
51
  Provides-Extra: logfire
@@ -27,7 +27,7 @@ pydantic_ai/models/bedrock.py,sha256=EmnBwxx_FzKMM8xAed_1aTmDwASWo26GA6Q8Z92waVc
27
27
  pydantic_ai/models/cohere.py,sha256=UTRCl3sa5-ptceg7k9WqLMIhNo5oFExUPMpLLi-A46c,11328
28
28
  pydantic_ai/models/fallback.py,sha256=y0bYXM3DfzJNAsyyMzclt33lzZazL-5_hwdgc33gfuM,4876
29
29
  pydantic_ai/models/function.py,sha256=HUSgPB3mKVfYI0OSJJJJRiQN-yeewjYIbrtrPfsvlgI,11365
30
- pydantic_ai/models/gemini.py,sha256=0N5ccI5HsCLaPd2-jxareQvrAePKSALOiRmV0ufxIcc,33336
30
+ pydantic_ai/models/gemini.py,sha256=28cnJqi7b06sllzXHLJBeIpYu0VS32Z4rnbEwDO7dQo,33463
31
31
  pydantic_ai/models/groq.py,sha256=IbO2jMNC5yiYRuUJf-j4blpPvoQDromQNBKJyPjs2A4,16518
32
32
  pydantic_ai/models/instrumented.py,sha256=ErFRDiOehOYlJBp4mSNj7yEIMtMqjlGcamEAwgW_Il4,11163
33
33
  pydantic_ai/models/mistral.py,sha256=8pdG9oRW6Dx7H5P88ZgiRIZbkGkPUfEateuyvzoULOE,27439
@@ -45,7 +45,7 @@ pydantic_ai/providers/google_vertex.py,sha256=WAwPxKTARVzs8DFs2veEUOJSur0krDOo9-
45
45
  pydantic_ai/providers/groq.py,sha256=DoY6qkfhuemuKB5JXhUkqG-3t1HQkxwSXoE_kHQIAK0,2788
46
46
  pydantic_ai/providers/mistral.py,sha256=fcR1uSwORo0jtevX7-wOjvcfT8ojMAaKY81uN5uYymM,2661
47
47
  pydantic_ai/providers/openai.py,sha256=ePF-QWwLkGkSE5w245gTTDVR3VoTIUqFoIhQ0TAoUiA,2866
48
- pydantic_ai_slim-0.0.49.dist-info/METADATA,sha256=lj5N1y3Dff7zJqTUQJy-z-kRBa7Fh3odZRuDW_GqOFc,3555
49
- pydantic_ai_slim-0.0.49.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
50
- pydantic_ai_slim-0.0.49.dist-info/entry_points.txt,sha256=KxQSmlMS8GMTkwTsl4_q9a5nJvBjj3HWeXx688wLrKg,45
51
- pydantic_ai_slim-0.0.49.dist-info/RECORD,,
48
+ pydantic_ai_slim-0.0.50.dist-info/METADATA,sha256=P1uO2nXQmd2lDS3exTXgC_ZlCrwywvhmu97B1xxlc3c,3555
49
+ pydantic_ai_slim-0.0.50.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
50
+ pydantic_ai_slim-0.0.50.dist-info/entry_points.txt,sha256=KxQSmlMS8GMTkwTsl4_q9a5nJvBjj3HWeXx688wLrKg,45
51
+ pydantic_ai_slim-0.0.50.dist-info/RECORD,,