pydantic-ai 0.3.1__tar.gz → 0.3.3__tar.gz
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.
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/.gitignore +1 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/Makefile +3 -3
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/PKG-INFO +3 -3
- pydantic_ai-0.3.3/tests/example_modules/mcp_server.py +26 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/graph/test_mermaid.py +14 -1
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/mcp_server.py +18 -1
- pydantic_ai-0.3.3/tests/models/cassettes/test_anthropic/test_anthropic_prompted_output.yaml +161 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_anthropic/test_anthropic_prompted_output_multiple.yaml +66 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_anthropic/test_anthropic_text_output_function.yaml +156 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_anthropic/test_anthropic_tool_output.yaml +176 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_cohere/test_cohere_model_thinking_part.yaml +1 -1
- pydantic_ai-0.3.3/tests/models/cassettes/test_gemini/test_gemini_native_output.yaml +79 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_gemini/test_gemini_native_output_multiple.yaml +120 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_gemini/test_gemini_prompted_output.yaml +74 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_gemini/test_gemini_prompted_output_multiple.yaml +73 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_gemini/test_gemini_prompted_output_with_tools.yaml +157 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_gemini/test_gemini_text_output_function.yaml +63 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_gemini/test_gemini_tool_output.yaml +183 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_google/test_google_native_output.yaml +86 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_google/test_google_native_output_multiple.yaml +138 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_google/test_google_prompted_output.yaml +78 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_google/test_google_prompted_output_multiple.yaml +77 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_google/test_google_prompted_output_with_tools.yaml +164 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_google/test_google_text_output_function.yaml +147 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_google/test_google_tool_output.yaml +187 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai/test_openai_native_output.yaml +223 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai/test_openai_native_output_multiple.yaml +293 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai/test_openai_prompted_output.yaml +209 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai/test_openai_prompted_output_multiple.yaml +209 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai/test_openai_text_output_function.yaml +191 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai/test_openai_tool_output.yaml +227 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai_responses/test_native_output.yaml +288 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai_responses/test_native_output_multiple.yaml +444 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai_responses/test_prompted_output.yaml +248 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai_responses/test_prompted_output_multiple.yaml +248 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai_responses/test_text_output_function.yaml +228 -0
- pydantic_ai-0.3.3/tests/models/cassettes/test_openai_responses/test_tool_output.yaml +282 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_anthropic.py +357 -1
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_bedrock.py +3 -3
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_cohere.py +1 -1
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_deepseek.py +6 -1
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_fallback.py +3 -3
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_gemini.py +512 -8
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_google.py +475 -3
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_instrumented.py +14 -4
- pydantic_ai-0.3.3/tests/models/test_mcp_sampling.py +135 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_mistral.py +2 -2
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_model_request_parameters.py +6 -2
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_openai.py +580 -4
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_openai_responses.py +472 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_agent.py +477 -7
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_examples.py +50 -35
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_logfire.py +4 -2
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_mcp.py +96 -13
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_streaming.py +40 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_tools.py +3 -2
- pydantic_ai-0.3.3/tests/test_utils.py +505 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/typed_agent.py +22 -10
- pydantic_ai-0.3.1/tests/test_utils.py +0 -179
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/LICENSE +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/README.md +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/pyproject.toml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/__init__.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/assets/dummy.pdf +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/assets/kiwi.png +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/assets/marcelo.mp3 +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/assets/small_video.mp4 +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_agent_with_stdio_server.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_tool_returning_audio_resource.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_tool_returning_dict.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_tool_returning_error.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_tool_returning_image.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_tool_returning_image_resource.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_tool_returning_multiple_items.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_tool_returning_none.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_tool_returning_str.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_mcp/test_tool_returning_text_resource.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_settings/test_stop_settings[anthropic].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_settings/test_stop_settings[bedrock].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_settings/test_stop_settings[cohere].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_settings/test_stop_settings[gemini].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_settings/test_stop_settings[google].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_settings/test_stop_settings[groq].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_settings/test_stop_settings[mistral].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/cassettes/test_settings/test_stop_settings[openai].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/conftest.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/__init__.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_dataset.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_evaluator_base.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_evaluator_common.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_evaluator_context.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_evaluator_spec.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_evaluators.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_llm_as_a_judge.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_otel.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_render_numbers.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_reporting.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_reports.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/test_utils.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/evals/utils.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/example_modules/README.md +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/example_modules/bank_database.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/example_modules/fake_database.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/example_modules/weather_service.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/ext/__init__.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/ext/test_langchain.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/fasta2a/__init__.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/fasta2a/test_applications.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/graph/__init__.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/graph/test_file_persistence.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/graph/test_graph.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/graph/test_persistence.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/graph/test_state.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/graph/test_utils.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/import_examples.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/json_body_serializer.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/__init__.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_anthropic_model_empty_message_on_history.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_anthropic_model_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_anthropic_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_anthropic_model_thinking_part_stream.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_document_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_image_url_input_invalid_mime_type.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_multiple_parallel_tool_calls.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_anthropic/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_empty_system_prompt.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_anthropic_model_without_tools.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_guardrail_config.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_other_parameters.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_performance_config.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_retry.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_stream.yaml +0 -0
- /pydantic_ai-0.3.1/tests/models/cassettes/test_bedrock/test_bedrock_model_structured_response.yaml → /pydantic_ai-0.3.3/tests/models/cassettes/test_bedrock/test_bedrock_model_structured_output.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_thinking_part_stream.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_model_top_p.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_bedrock_multiple_documents_in_history.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_bedrock/test_video_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_cohere/test_cohere_model_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_cohere/test_request_simple_success_with_vcr.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_deepseek/test_deepseek_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_download_item/test_download_item_application_octet_stream.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_download_item/test_download_item_no_content_type.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_false.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_gemini_additional_properties_is_true.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_gemini_drop_exclusive_maximum.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_gemini_exclusive_minimum_and_maximum.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_gemini_model_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_gemini_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_gemini_tool_config_any_with_tool_without_args.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_gemini_youtube_video_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_labels_are_ignored_with_gla_provider.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini/test_video_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_labels.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input[AudioUrl (gs)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input[AudioUrl].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input[DocumentUrl (gs)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input[DocumentUrl].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input[ImageUrl (gs)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input[ImageUrl].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl (YouTube)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl (gs)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input[VideoUrl].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_gemini_vertex/test_url_input_force_download.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_empty_user_prompt.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_image_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_iter_stream.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_max_tokens.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_multiple_documents_in_history.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_retry.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_safety_settings.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_stream.yaml +0 -0
- /pydantic_ai-0.3.1/tests/models/cassettes/test_google/test_google_model_structured_response.yaml → /pydantic_ai-0.3.3/tests/models/cassettes/test_google/test_google_model_structured_output.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_text_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_thinking_config.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_top_p.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_vertex_labels.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_vertex_provider.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_video_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_model_video_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_timeout.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_tool_config_any_with_tool_without_args.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input[AudioUrl (gs)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input[AudioUrl].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input[DocumentUrl (gs)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input[DocumentUrl].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input[ImageUrl (gs)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input[ImageUrl].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl (YouTube)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl (gs)].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input[VideoUrl].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_google/test_google_url_input_force_download.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_groq/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_groq/test_groq_model_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_groq/test_groq_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_groq/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_groq/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_groq/test_image_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_mistral/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_mistral/test_mistral_model_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_mistral/test_mistral_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_model_names/test_known_model_names.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_compatible_api_with_tool_calls_without_id.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_document_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_extra_headers.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_image_url_tool_response.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4.5-preview].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_max_completion_tokens[gpt-4o-mini].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_max_completion_tokens[o3-mini].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_multiple_agent_tool_calls.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_openai_audio_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_openai_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_openai_instructions_with_tool_calls_keep_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_openai_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_openai_model_thinking_part_iter.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_openai_model_without_system_prompt.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[developer].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_openai_o1_mini_system_role[system].yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_openai_responses_model_thinking_part.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_reasoning_model_with_temperature.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai/test_user_id.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_audio_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_image_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_image_as_binary_content_tool_response.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_as_binary_content_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_image_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_builtin_tools.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_http_error.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_instructions.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_retry.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_model_simple_response_with_tool_call.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_output_type.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_effort.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_reasoning_generate_summary.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_stream.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_system_prompt.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_openai_responses_text_document_url_input.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/cassettes/test_openai_responses/test_reasoning_model_with_temperature.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/mock_async_stream.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_download_item.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_gemini_vertex.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_groq.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_model.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_model_function.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_model_names.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/models/test_model_test.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/__init__.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/cassettes/test_azure/test_azure_provider_call.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/cassettes/test_google_vertex/test_vertexai_provider.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/cassettes/test_heroku/test_heroku_model_provider_claude_3_7_sonnet.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/cassettes/test_openrouter/test_openrouter_with_google_model.yaml +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_anthropic.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_azure.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_bedrock.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_cohere.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_deepseek.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_fireworks.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_google_gla.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_google_vertex.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_grok.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_groq.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_heroku.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_mistral.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_openai.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_openrouter.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_provider_names.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/providers/test_together.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_a2a.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_cli.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_deps.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_direct.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_format_as_xml.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_history_processor.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_json_body_serializer.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_live.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_messages.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_parts_manager.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_settings.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_thinking_part.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/test_usage_limits.py +0 -0
- {pydantic_ai-0.3.1 → pydantic_ai-0.3.3}/tests/typed_graph.py +0 -0
|
@@ -64,7 +64,7 @@ test: ## Run tests and collect coverage data
|
|
|
64
64
|
@uv run coverage report
|
|
65
65
|
|
|
66
66
|
.PHONY: test-fast
|
|
67
|
-
test-fast: ## Same as test except no coverage
|
|
67
|
+
test-fast: ## Same as test except no coverage and 4x faster depending on hardware
|
|
68
68
|
uv run pytest -n auto --dist=loadgroup
|
|
69
69
|
|
|
70
70
|
.PHONY: test-all-python
|
|
@@ -78,12 +78,12 @@ test-all-python: ## Run tests on Python 3.9 to 3.13
|
|
|
78
78
|
@uv run coverage report
|
|
79
79
|
|
|
80
80
|
.PHONY: testcov
|
|
81
|
-
testcov: test ## Run tests and generate
|
|
81
|
+
testcov: test ## Run tests and generate an HTML coverage report
|
|
82
82
|
@echo "building coverage html"
|
|
83
83
|
@uv run coverage html
|
|
84
84
|
|
|
85
85
|
.PHONY: test-mrp
|
|
86
|
-
test-mrp: ## Build and
|
|
86
|
+
test-mrp: ## Build and tests of mcp-run-python
|
|
87
87
|
cd mcp-run-python && deno task build
|
|
88
88
|
uv run --package mcp-run-python pytest mcp-run-python -v
|
|
89
89
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Agent Framework / shim to use Pydantic with LLMs
|
|
5
5
|
Project-URL: Homepage, https://ai.pydantic.dev
|
|
6
6
|
Project-URL: Source, https://github.com/pydantic/pydantic-ai
|
|
@@ -28,9 +28,9 @@ Classifier: Topic :: Internet
|
|
|
28
28
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
29
29
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
30
30
|
Requires-Python: >=3.9
|
|
31
|
-
Requires-Dist: pydantic-ai-slim[a2a,anthropic,bedrock,cli,cohere,evals,google,groq,mcp,mistral,openai,vertexai]==0.3.
|
|
31
|
+
Requires-Dist: pydantic-ai-slim[a2a,anthropic,bedrock,cli,cohere,evals,google,groq,mcp,mistral,openai,vertexai]==0.3.3
|
|
32
32
|
Provides-Extra: examples
|
|
33
|
-
Requires-Dist: pydantic-ai-examples==0.3.
|
|
33
|
+
Requires-Dist: pydantic-ai-examples==0.3.3; extra == 'examples'
|
|
34
34
|
Provides-Extra: logfire
|
|
35
35
|
Requires-Dist: logfire>=3.11.0; extra == 'logfire'
|
|
36
36
|
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from mcp.server.fastmcp import Context, FastMCP
|
|
4
|
+
from mcp.server.session import ServerSessionT
|
|
5
|
+
from mcp.shared.context import LifespanContextT, RequestT
|
|
6
|
+
|
|
7
|
+
mcp = FastMCP('PydanticAI MCP Server')
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@mcp.tool()
|
|
11
|
+
async def echo_deps(ctx: Context[ServerSessionT, LifespanContextT, RequestT]) -> dict[str, Any]:
|
|
12
|
+
"""Echo the run context.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
ctx: Context object containing request and session information.
|
|
16
|
+
|
|
17
|
+
Returns:
|
|
18
|
+
Dictionary with an echo message and the deps.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
deps: Any = getattr(ctx.request_context.meta, 'deps')
|
|
22
|
+
return {'echo': 'This is an echo message', 'deps': deps}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
if __name__ == '__main__':
|
|
26
|
+
mcp.run()
|
|
@@ -5,7 +5,7 @@ from collections.abc import Iterator
|
|
|
5
5
|
from dataclasses import dataclass
|
|
6
6
|
from datetime import timezone
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Annotated, Callable
|
|
8
|
+
from typing import Annotated, Callable, Union
|
|
9
9
|
|
|
10
10
|
import httpx
|
|
11
11
|
import pytest
|
|
@@ -426,3 +426,16 @@ def test_wrong_return_type():
|
|
|
426
426
|
|
|
427
427
|
with pytest.raises(GraphSetupError, match="Invalid return type: <class 'int'>"):
|
|
428
428
|
NoReturnType.get_node_def({})
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
def test_edge_union():
|
|
432
|
+
"""Test that a union of things annotated with an Edge doesn't raise a TypeError.
|
|
433
|
+
|
|
434
|
+
This is important because such unions may occur as a return type for a graph, and needs to be evaluated when
|
|
435
|
+
generating a mermaid diagram.
|
|
436
|
+
"""
|
|
437
|
+
# This would raise an error on 3.10 if Edge was not hashable:
|
|
438
|
+
edges_union = Union[
|
|
439
|
+
Annotated[End[None], Edge(label='first label')], Annotated[End[None], Edge(label='second label')]
|
|
440
|
+
]
|
|
441
|
+
assert edges_union
|
|
@@ -5,7 +5,7 @@ from typing import Any
|
|
|
5
5
|
from mcp.server.fastmcp import Context, FastMCP, Image
|
|
6
6
|
from mcp.server.session import ServerSessionT
|
|
7
7
|
from mcp.shared.context import LifespanContextT, RequestT
|
|
8
|
-
from mcp.types import BlobResourceContents, EmbeddedResource, TextResourceContents
|
|
8
|
+
from mcp.types import BlobResourceContents, EmbeddedResource, SamplingMessage, TextContent, TextResourceContents
|
|
9
9
|
from pydantic import AnyUrl
|
|
10
10
|
|
|
11
11
|
mcp = FastMCP('PydanticAI MCP Server')
|
|
@@ -136,6 +136,23 @@ async def echo_deps(ctx: Context[ServerSessionT, LifespanContextT, RequestT]) ->
|
|
|
136
136
|
return {'echo': 'This is an echo message', 'deps': deps}
|
|
137
137
|
|
|
138
138
|
|
|
139
|
+
@mcp.tool()
|
|
140
|
+
async def use_sampling(ctx: Context, foo: str) -> str: # type: ignore
|
|
141
|
+
"""Use sampling callback."""
|
|
142
|
+
|
|
143
|
+
result = await ctx.session.create_message(
|
|
144
|
+
[
|
|
145
|
+
SamplingMessage(role='assistant', content=TextContent(type='text', text='')),
|
|
146
|
+
SamplingMessage(role='user', content=TextContent(type='text', text=foo)),
|
|
147
|
+
],
|
|
148
|
+
max_tokens=1_024,
|
|
149
|
+
system_prompt='this is a test of MCP sampling',
|
|
150
|
+
temperature=0.5,
|
|
151
|
+
stop_sequences=['potato'],
|
|
152
|
+
)
|
|
153
|
+
return result.model_dump_json(indent=2)
|
|
154
|
+
|
|
155
|
+
|
|
139
156
|
@mcp._mcp_server.set_logging_level() # pyright: ignore[reportPrivateUsage]
|
|
140
157
|
async def set_logging_level(level: str) -> None:
|
|
141
158
|
global log_level
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
interactions:
|
|
2
|
+
- request:
|
|
3
|
+
headers:
|
|
4
|
+
accept:
|
|
5
|
+
- application/json
|
|
6
|
+
accept-encoding:
|
|
7
|
+
- gzip, deflate
|
|
8
|
+
connection:
|
|
9
|
+
- keep-alive
|
|
10
|
+
content-length:
|
|
11
|
+
- '740'
|
|
12
|
+
content-type:
|
|
13
|
+
- application/json
|
|
14
|
+
host:
|
|
15
|
+
- api.anthropic.com
|
|
16
|
+
method: POST
|
|
17
|
+
parsed_body:
|
|
18
|
+
max_tokens: 1024
|
|
19
|
+
messages:
|
|
20
|
+
- content:
|
|
21
|
+
- text: What is the largest city in the user country? Use the get_user_country tool and then your own world knowledge.
|
|
22
|
+
type: text
|
|
23
|
+
role: user
|
|
24
|
+
model: claude-3-5-sonnet-latest
|
|
25
|
+
stream: false
|
|
26
|
+
system: |+
|
|
27
|
+
Always respond with a JSON object that's compatible with this schema:
|
|
28
|
+
|
|
29
|
+
{"properties": {"city": {"type": "string"}, "country": {"type": "string"}}, "required": ["city", "country"], "title": "CityLocation", "type": "object"}
|
|
30
|
+
|
|
31
|
+
Don't include any text or Markdown fencing before or after.
|
|
32
|
+
|
|
33
|
+
tool_choice:
|
|
34
|
+
type: auto
|
|
35
|
+
tools:
|
|
36
|
+
- description: ''
|
|
37
|
+
input_schema:
|
|
38
|
+
additionalProperties: false
|
|
39
|
+
properties: {}
|
|
40
|
+
type: object
|
|
41
|
+
name: get_user_country
|
|
42
|
+
uri: https://api.anthropic.com/v1/messages?beta=true
|
|
43
|
+
response:
|
|
44
|
+
headers:
|
|
45
|
+
connection:
|
|
46
|
+
- keep-alive
|
|
47
|
+
content-length:
|
|
48
|
+
- '397'
|
|
49
|
+
content-type:
|
|
50
|
+
- application/json
|
|
51
|
+
strict-transport-security:
|
|
52
|
+
- max-age=31536000; includeSubDomains; preload
|
|
53
|
+
transfer-encoding:
|
|
54
|
+
- chunked
|
|
55
|
+
parsed_body:
|
|
56
|
+
content:
|
|
57
|
+
- id: toolu_017UryVwtsKsjonhFV3cgV3X
|
|
58
|
+
input: {}
|
|
59
|
+
name: get_user_country
|
|
60
|
+
type: tool_use
|
|
61
|
+
id: msg_014CpBKzioMqUyLWrMihpvsz
|
|
62
|
+
model: claude-3-5-sonnet-20241022
|
|
63
|
+
role: assistant
|
|
64
|
+
stop_reason: tool_use
|
|
65
|
+
stop_sequence: null
|
|
66
|
+
type: message
|
|
67
|
+
usage:
|
|
68
|
+
cache_creation_input_tokens: 0
|
|
69
|
+
cache_read_input_tokens: 0
|
|
70
|
+
input_tokens: 459
|
|
71
|
+
output_tokens: 38
|
|
72
|
+
service_tier: standard
|
|
73
|
+
status:
|
|
74
|
+
code: 200
|
|
75
|
+
message: OK
|
|
76
|
+
- request:
|
|
77
|
+
headers:
|
|
78
|
+
accept:
|
|
79
|
+
- application/json
|
|
80
|
+
accept-encoding:
|
|
81
|
+
- gzip, deflate
|
|
82
|
+
connection:
|
|
83
|
+
- keep-alive
|
|
84
|
+
content-length:
|
|
85
|
+
- '1002'
|
|
86
|
+
content-type:
|
|
87
|
+
- application/json
|
|
88
|
+
host:
|
|
89
|
+
- api.anthropic.com
|
|
90
|
+
method: POST
|
|
91
|
+
parsed_body:
|
|
92
|
+
max_tokens: 1024
|
|
93
|
+
messages:
|
|
94
|
+
- content:
|
|
95
|
+
- text: What is the largest city in the user country? Use the get_user_country tool and then your own world knowledge.
|
|
96
|
+
type: text
|
|
97
|
+
role: user
|
|
98
|
+
- content:
|
|
99
|
+
- id: toolu_017UryVwtsKsjonhFV3cgV3X
|
|
100
|
+
input: {}
|
|
101
|
+
name: get_user_country
|
|
102
|
+
type: tool_use
|
|
103
|
+
role: assistant
|
|
104
|
+
- content:
|
|
105
|
+
- content: Mexico
|
|
106
|
+
is_error: false
|
|
107
|
+
tool_use_id: toolu_017UryVwtsKsjonhFV3cgV3X
|
|
108
|
+
type: tool_result
|
|
109
|
+
role: user
|
|
110
|
+
model: claude-3-5-sonnet-latest
|
|
111
|
+
stream: false
|
|
112
|
+
system: |+
|
|
113
|
+
Always respond with a JSON object that's compatible with this schema:
|
|
114
|
+
|
|
115
|
+
{"properties": {"city": {"type": "string"}, "country": {"type": "string"}}, "required": ["city", "country"], "title": "CityLocation", "type": "object"}
|
|
116
|
+
|
|
117
|
+
Don't include any text or Markdown fencing before or after.
|
|
118
|
+
|
|
119
|
+
tool_choice:
|
|
120
|
+
type: auto
|
|
121
|
+
tools:
|
|
122
|
+
- description: ''
|
|
123
|
+
input_schema:
|
|
124
|
+
additionalProperties: false
|
|
125
|
+
properties: {}
|
|
126
|
+
type: object
|
|
127
|
+
name: get_user_country
|
|
128
|
+
uri: https://api.anthropic.com/v1/messages?beta=true
|
|
129
|
+
response:
|
|
130
|
+
headers:
|
|
131
|
+
connection:
|
|
132
|
+
- keep-alive
|
|
133
|
+
content-length:
|
|
134
|
+
- '380'
|
|
135
|
+
content-type:
|
|
136
|
+
- application/json
|
|
137
|
+
strict-transport-security:
|
|
138
|
+
- max-age=31536000; includeSubDomains; preload
|
|
139
|
+
transfer-encoding:
|
|
140
|
+
- chunked
|
|
141
|
+
parsed_body:
|
|
142
|
+
content:
|
|
143
|
+
- text: '{"city": "Mexico City", "country": "Mexico"}'
|
|
144
|
+
type: text
|
|
145
|
+
id: msg_014JeWCouH6DpdqzMTaBdkpJ
|
|
146
|
+
model: claude-3-5-sonnet-20241022
|
|
147
|
+
role: assistant
|
|
148
|
+
stop_reason: end_turn
|
|
149
|
+
stop_sequence: null
|
|
150
|
+
type: message
|
|
151
|
+
usage:
|
|
152
|
+
cache_creation_input_tokens: 0
|
|
153
|
+
cache_read_input_tokens: 0
|
|
154
|
+
input_tokens: 510
|
|
155
|
+
output_tokens: 17
|
|
156
|
+
service_tier: standard
|
|
157
|
+
status:
|
|
158
|
+
code: 200
|
|
159
|
+
message: OK
|
|
160
|
+
version: 1
|
|
161
|
+
...
|
pydantic_ai-0.3.3/tests/models/cassettes/test_anthropic/test_anthropic_prompted_output_multiple.yaml
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
interactions:
|
|
2
|
+
- request:
|
|
3
|
+
headers:
|
|
4
|
+
accept:
|
|
5
|
+
- application/json
|
|
6
|
+
accept-encoding:
|
|
7
|
+
- gzip, deflate
|
|
8
|
+
connection:
|
|
9
|
+
- keep-alive
|
|
10
|
+
content-length:
|
|
11
|
+
- '1268'
|
|
12
|
+
content-type:
|
|
13
|
+
- application/json
|
|
14
|
+
host:
|
|
15
|
+
- api.anthropic.com
|
|
16
|
+
method: POST
|
|
17
|
+
parsed_body:
|
|
18
|
+
max_tokens: 1024
|
|
19
|
+
messages:
|
|
20
|
+
- content:
|
|
21
|
+
- text: What is the largest city in Mexico?
|
|
22
|
+
type: text
|
|
23
|
+
role: user
|
|
24
|
+
model: claude-3-5-sonnet-latest
|
|
25
|
+
stream: false
|
|
26
|
+
system: |+
|
|
27
|
+
Always respond with a JSON object that's compatible with this schema:
|
|
28
|
+
|
|
29
|
+
{"type": "object", "properties": {"result": {"anyOf": [{"type": "object", "properties": {"kind": {"type": "string", "const": "CityLocation"}, "data": {"properties": {"city": {"type": "string"}, "country": {"type": "string"}}, "required": ["city", "country"], "title": "CityLocation", "type": "object"}}, "description": "CityLocation", "required": ["kind", "data"], "additionalProperties": false}, {"type": "object", "properties": {"kind": {"type": "string", "const": "CountryLanguage"}, "data": {"properties": {"country": {"type": "string"}, "language": {"type": "string"}}, "required": ["country", "language"], "title": "CountryLanguage", "type": "object"}}, "description": "CountryLanguage", "required": ["kind", "data"], "additionalProperties": false}]}}, "required": ["result"], "additionalProperties": false}
|
|
30
|
+
|
|
31
|
+
Don't include any text or Markdown fencing before or after.
|
|
32
|
+
|
|
33
|
+
uri: https://api.anthropic.com/v1/messages?beta=true
|
|
34
|
+
response:
|
|
35
|
+
headers:
|
|
36
|
+
connection:
|
|
37
|
+
- keep-alive
|
|
38
|
+
content-length:
|
|
39
|
+
- '434'
|
|
40
|
+
content-type:
|
|
41
|
+
- application/json
|
|
42
|
+
strict-transport-security:
|
|
43
|
+
- max-age=31536000; includeSubDomains; preload
|
|
44
|
+
transfer-encoding:
|
|
45
|
+
- chunked
|
|
46
|
+
parsed_body:
|
|
47
|
+
content:
|
|
48
|
+
- text: '{"result": {"kind": "CityLocation", "data": {"city": "Mexico City", "country": "Mexico"}}}'
|
|
49
|
+
type: text
|
|
50
|
+
id: msg_013ttUi3HCcKt7PkJpoWs5FT
|
|
51
|
+
model: claude-3-5-sonnet-20241022
|
|
52
|
+
role: assistant
|
|
53
|
+
stop_reason: end_turn
|
|
54
|
+
stop_sequence: null
|
|
55
|
+
type: message
|
|
56
|
+
usage:
|
|
57
|
+
cache_creation_input_tokens: 0
|
|
58
|
+
cache_read_input_tokens: 0
|
|
59
|
+
input_tokens: 281
|
|
60
|
+
output_tokens: 31
|
|
61
|
+
service_tier: standard
|
|
62
|
+
status:
|
|
63
|
+
code: 200
|
|
64
|
+
message: OK
|
|
65
|
+
version: 1
|
|
66
|
+
...
|
pydantic_ai-0.3.3/tests/models/cassettes/test_anthropic/test_anthropic_text_output_function.yaml
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
interactions:
|
|
2
|
+
- request:
|
|
3
|
+
headers:
|
|
4
|
+
accept:
|
|
5
|
+
- application/json
|
|
6
|
+
accept-encoding:
|
|
7
|
+
- gzip, deflate
|
|
8
|
+
connection:
|
|
9
|
+
- keep-alive
|
|
10
|
+
content-length:
|
|
11
|
+
- '409'
|
|
12
|
+
content-type:
|
|
13
|
+
- application/json
|
|
14
|
+
host:
|
|
15
|
+
- api.anthropic.com
|
|
16
|
+
method: POST
|
|
17
|
+
parsed_body:
|
|
18
|
+
max_tokens: 1024
|
|
19
|
+
messages:
|
|
20
|
+
- content:
|
|
21
|
+
- text: What is the largest city in the user country? Use the get_user_country tool and then your own world knowledge.
|
|
22
|
+
type: text
|
|
23
|
+
role: user
|
|
24
|
+
model: claude-3-5-sonnet-latest
|
|
25
|
+
stream: false
|
|
26
|
+
tool_choice:
|
|
27
|
+
type: auto
|
|
28
|
+
tools:
|
|
29
|
+
- description: ''
|
|
30
|
+
input_schema:
|
|
31
|
+
additionalProperties: false
|
|
32
|
+
properties: {}
|
|
33
|
+
type: object
|
|
34
|
+
name: get_user_country
|
|
35
|
+
uri: https://api.anthropic.com/v1/messages?beta=true
|
|
36
|
+
response:
|
|
37
|
+
headers:
|
|
38
|
+
connection:
|
|
39
|
+
- keep-alive
|
|
40
|
+
content-length:
|
|
41
|
+
- '540'
|
|
42
|
+
content-type:
|
|
43
|
+
- application/json
|
|
44
|
+
strict-transport-security:
|
|
45
|
+
- max-age=31536000; includeSubDomains; preload
|
|
46
|
+
transfer-encoding:
|
|
47
|
+
- chunked
|
|
48
|
+
parsed_body:
|
|
49
|
+
content:
|
|
50
|
+
- text: I'll help you find the largest city in your country. Let me first check your country using the get_user_country
|
|
51
|
+
tool.
|
|
52
|
+
type: text
|
|
53
|
+
- id: toolu_01EZuxfc6MsPsPgrAKQohw3e
|
|
54
|
+
input: {}
|
|
55
|
+
name: get_user_country
|
|
56
|
+
type: tool_use
|
|
57
|
+
id: msg_014NE4yfV1Yz2vLAJzapxxef
|
|
58
|
+
model: claude-3-5-sonnet-20241022
|
|
59
|
+
role: assistant
|
|
60
|
+
stop_reason: tool_use
|
|
61
|
+
stop_sequence: null
|
|
62
|
+
type: message
|
|
63
|
+
usage:
|
|
64
|
+
cache_creation_input_tokens: 0
|
|
65
|
+
cache_read_input_tokens: 0
|
|
66
|
+
input_tokens: 383
|
|
67
|
+
output_tokens: 66
|
|
68
|
+
service_tier: standard
|
|
69
|
+
status:
|
|
70
|
+
code: 200
|
|
71
|
+
message: OK
|
|
72
|
+
- request:
|
|
73
|
+
headers:
|
|
74
|
+
accept:
|
|
75
|
+
- application/json
|
|
76
|
+
accept-encoding:
|
|
77
|
+
- gzip, deflate
|
|
78
|
+
connection:
|
|
79
|
+
- keep-alive
|
|
80
|
+
content-length:
|
|
81
|
+
- '814'
|
|
82
|
+
content-type:
|
|
83
|
+
- application/json
|
|
84
|
+
host:
|
|
85
|
+
- api.anthropic.com
|
|
86
|
+
method: POST
|
|
87
|
+
parsed_body:
|
|
88
|
+
max_tokens: 1024
|
|
89
|
+
messages:
|
|
90
|
+
- content:
|
|
91
|
+
- text: What is the largest city in the user country? Use the get_user_country tool and then your own world knowledge.
|
|
92
|
+
type: text
|
|
93
|
+
role: user
|
|
94
|
+
- content:
|
|
95
|
+
- text: I'll help you find the largest city in your country. Let me first check your country using the get_user_country
|
|
96
|
+
tool.
|
|
97
|
+
type: text
|
|
98
|
+
- id: toolu_01EZuxfc6MsPsPgrAKQohw3e
|
|
99
|
+
input: {}
|
|
100
|
+
name: get_user_country
|
|
101
|
+
type: tool_use
|
|
102
|
+
role: assistant
|
|
103
|
+
- content:
|
|
104
|
+
- content: Mexico
|
|
105
|
+
is_error: false
|
|
106
|
+
tool_use_id: toolu_01EZuxfc6MsPsPgrAKQohw3e
|
|
107
|
+
type: tool_result
|
|
108
|
+
role: user
|
|
109
|
+
model: claude-3-5-sonnet-latest
|
|
110
|
+
stream: false
|
|
111
|
+
tool_choice:
|
|
112
|
+
type: auto
|
|
113
|
+
tools:
|
|
114
|
+
- description: ''
|
|
115
|
+
input_schema:
|
|
116
|
+
additionalProperties: false
|
|
117
|
+
properties: {}
|
|
118
|
+
type: object
|
|
119
|
+
name: get_user_country
|
|
120
|
+
uri: https://api.anthropic.com/v1/messages?beta=true
|
|
121
|
+
response:
|
|
122
|
+
headers:
|
|
123
|
+
connection:
|
|
124
|
+
- keep-alive
|
|
125
|
+
content-length:
|
|
126
|
+
- '801'
|
|
127
|
+
content-type:
|
|
128
|
+
- application/json
|
|
129
|
+
strict-transport-security:
|
|
130
|
+
- max-age=31536000; includeSubDomains; preload
|
|
131
|
+
transfer-encoding:
|
|
132
|
+
- chunked
|
|
133
|
+
parsed_body:
|
|
134
|
+
content:
|
|
135
|
+
- text: Based on the result, you are located in Mexico. The largest city in Mexico is Mexico City (Ciudad de México),
|
|
136
|
+
which is also the nation's capital. Mexico City has a population of approximately 9.2 million people in the city
|
|
137
|
+
proper, and over 21 million people in its metropolitan area, making it one of the largest urban agglomerations in
|
|
138
|
+
the world. It is both the political and economic center of Mexico, located in the Valley of Mexico in the central
|
|
139
|
+
part of the country.
|
|
140
|
+
type: text
|
|
141
|
+
id: msg_0193srwo7TCx49h97wDwc7K7
|
|
142
|
+
model: claude-3-5-sonnet-20241022
|
|
143
|
+
role: assistant
|
|
144
|
+
stop_reason: end_turn
|
|
145
|
+
stop_sequence: null
|
|
146
|
+
type: message
|
|
147
|
+
usage:
|
|
148
|
+
cache_creation_input_tokens: 0
|
|
149
|
+
cache_read_input_tokens: 0
|
|
150
|
+
input_tokens: 461
|
|
151
|
+
output_tokens: 107
|
|
152
|
+
service_tier: standard
|
|
153
|
+
status:
|
|
154
|
+
code: 200
|
|
155
|
+
message: OK
|
|
156
|
+
version: 1
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
interactions:
|
|
2
|
+
- request:
|
|
3
|
+
headers:
|
|
4
|
+
accept:
|
|
5
|
+
- application/json
|
|
6
|
+
accept-encoding:
|
|
7
|
+
- gzip, deflate
|
|
8
|
+
connection:
|
|
9
|
+
- keep-alive
|
|
10
|
+
content-length:
|
|
11
|
+
- '585'
|
|
12
|
+
content-type:
|
|
13
|
+
- application/json
|
|
14
|
+
host:
|
|
15
|
+
- api.anthropic.com
|
|
16
|
+
method: POST
|
|
17
|
+
parsed_body:
|
|
18
|
+
max_tokens: 1024
|
|
19
|
+
messages:
|
|
20
|
+
- content:
|
|
21
|
+
- text: What is the largest city in the user country?
|
|
22
|
+
type: text
|
|
23
|
+
role: user
|
|
24
|
+
model: claude-3-5-sonnet-latest
|
|
25
|
+
stream: false
|
|
26
|
+
tool_choice:
|
|
27
|
+
type: any
|
|
28
|
+
tools:
|
|
29
|
+
- description: ''
|
|
30
|
+
input_schema:
|
|
31
|
+
additionalProperties: false
|
|
32
|
+
properties: {}
|
|
33
|
+
type: object
|
|
34
|
+
name: get_user_country
|
|
35
|
+
- description: The final response which ends this conversation
|
|
36
|
+
input_schema:
|
|
37
|
+
properties:
|
|
38
|
+
city:
|
|
39
|
+
type: string
|
|
40
|
+
country:
|
|
41
|
+
type: string
|
|
42
|
+
required:
|
|
43
|
+
- city
|
|
44
|
+
- country
|
|
45
|
+
title: CityLocation
|
|
46
|
+
type: object
|
|
47
|
+
name: final_result
|
|
48
|
+
uri: https://api.anthropic.com/v1/messages?beta=true
|
|
49
|
+
response:
|
|
50
|
+
headers:
|
|
51
|
+
connection:
|
|
52
|
+
- keep-alive
|
|
53
|
+
content-length:
|
|
54
|
+
- '397'
|
|
55
|
+
content-type:
|
|
56
|
+
- application/json
|
|
57
|
+
strict-transport-security:
|
|
58
|
+
- max-age=31536000; includeSubDomains; preload
|
|
59
|
+
transfer-encoding:
|
|
60
|
+
- chunked
|
|
61
|
+
parsed_body:
|
|
62
|
+
content:
|
|
63
|
+
- id: toolu_019pMboNVRg5jkw4PKkofQ6Y
|
|
64
|
+
input: {}
|
|
65
|
+
name: get_user_country
|
|
66
|
+
type: tool_use
|
|
67
|
+
id: msg_01EnfsDTixCmHjqvk9QarBj4
|
|
68
|
+
model: claude-3-5-sonnet-20241022
|
|
69
|
+
role: assistant
|
|
70
|
+
stop_reason: tool_use
|
|
71
|
+
stop_sequence: null
|
|
72
|
+
type: message
|
|
73
|
+
usage:
|
|
74
|
+
cache_creation_input_tokens: 0
|
|
75
|
+
cache_read_input_tokens: 0
|
|
76
|
+
input_tokens: 445
|
|
77
|
+
output_tokens: 23
|
|
78
|
+
service_tier: standard
|
|
79
|
+
status:
|
|
80
|
+
code: 200
|
|
81
|
+
message: OK
|
|
82
|
+
- request:
|
|
83
|
+
headers:
|
|
84
|
+
accept:
|
|
85
|
+
- application/json
|
|
86
|
+
accept-encoding:
|
|
87
|
+
- gzip, deflate
|
|
88
|
+
connection:
|
|
89
|
+
- keep-alive
|
|
90
|
+
content-length:
|
|
91
|
+
- '847'
|
|
92
|
+
content-type:
|
|
93
|
+
- application/json
|
|
94
|
+
host:
|
|
95
|
+
- api.anthropic.com
|
|
96
|
+
method: POST
|
|
97
|
+
parsed_body:
|
|
98
|
+
max_tokens: 1024
|
|
99
|
+
messages:
|
|
100
|
+
- content:
|
|
101
|
+
- text: What is the largest city in the user country?
|
|
102
|
+
type: text
|
|
103
|
+
role: user
|
|
104
|
+
- content:
|
|
105
|
+
- id: toolu_019pMboNVRg5jkw4PKkofQ6Y
|
|
106
|
+
input: {}
|
|
107
|
+
name: get_user_country
|
|
108
|
+
type: tool_use
|
|
109
|
+
role: assistant
|
|
110
|
+
- content:
|
|
111
|
+
- content: Mexico
|
|
112
|
+
is_error: false
|
|
113
|
+
tool_use_id: toolu_019pMboNVRg5jkw4PKkofQ6Y
|
|
114
|
+
type: tool_result
|
|
115
|
+
role: user
|
|
116
|
+
model: claude-3-5-sonnet-latest
|
|
117
|
+
stream: false
|
|
118
|
+
tool_choice:
|
|
119
|
+
type: any
|
|
120
|
+
tools:
|
|
121
|
+
- description: ''
|
|
122
|
+
input_schema:
|
|
123
|
+
additionalProperties: false
|
|
124
|
+
properties: {}
|
|
125
|
+
type: object
|
|
126
|
+
name: get_user_country
|
|
127
|
+
- description: The final response which ends this conversation
|
|
128
|
+
input_schema:
|
|
129
|
+
properties:
|
|
130
|
+
city:
|
|
131
|
+
type: string
|
|
132
|
+
country:
|
|
133
|
+
type: string
|
|
134
|
+
required:
|
|
135
|
+
- city
|
|
136
|
+
- country
|
|
137
|
+
title: CityLocation
|
|
138
|
+
type: object
|
|
139
|
+
name: final_result
|
|
140
|
+
uri: https://api.anthropic.com/v1/messages?beta=true
|
|
141
|
+
response:
|
|
142
|
+
headers:
|
|
143
|
+
connection:
|
|
144
|
+
- keep-alive
|
|
145
|
+
content-length:
|
|
146
|
+
- '432'
|
|
147
|
+
content-type:
|
|
148
|
+
- application/json
|
|
149
|
+
strict-transport-security:
|
|
150
|
+
- max-age=31536000; includeSubDomains; preload
|
|
151
|
+
transfer-encoding:
|
|
152
|
+
- chunked
|
|
153
|
+
parsed_body:
|
|
154
|
+
content:
|
|
155
|
+
- id: toolu_01V4d2H4EWp5LDM2aXaeyR6W
|
|
156
|
+
input:
|
|
157
|
+
city: Mexico City
|
|
158
|
+
country: Mexico
|
|
159
|
+
name: final_result
|
|
160
|
+
type: tool_use
|
|
161
|
+
id: msg_01Hbm5BtKzfVtWs8Eb7rCNNx
|
|
162
|
+
model: claude-3-5-sonnet-20241022
|
|
163
|
+
role: assistant
|
|
164
|
+
stop_reason: tool_use
|
|
165
|
+
stop_sequence: null
|
|
166
|
+
type: message
|
|
167
|
+
usage:
|
|
168
|
+
cache_creation_input_tokens: 0
|
|
169
|
+
cache_read_input_tokens: 0
|
|
170
|
+
input_tokens: 497
|
|
171
|
+
output_tokens: 56
|
|
172
|
+
service_tier: standard
|
|
173
|
+
status:
|
|
174
|
+
code: 200
|
|
175
|
+
message: OK
|
|
176
|
+
version: 1
|