langchain-core 1.2.0__tar.gz → 1.2.2__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.
- {langchain_core-1.2.0 → langchain_core-1.2.2}/PKG-INFO +1 -1
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/anthropic.py +20 -12
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/bedrock_converse.py +18 -8
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/openai_tools.py +9 -7
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tools/base.py +2 -1
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/function_calling.py +11 -2
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/version.py +1 -1
- {langchain_core-1.2.0 → langchain_core-1.2.2}/pyproject.toml +1 -1
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/test_openai_tools.py +74 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_tools.py +1 -4
- {langchain_core-1.2.0 → langchain_core-1.2.2}/uv.lock +4 -4
- {langchain_core-1.2.0 → langchain_core-1.2.2}/.gitignore +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/Makefile +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/README.md +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/extended_testing_deps.txt +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/_api/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/_api/beta_decorator.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/_api/deprecation.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/_api/internal.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/_api/path.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/_import_utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/agents.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/caches.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/callbacks/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/callbacks/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/callbacks/file.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/callbacks/manager.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/callbacks/stdout.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/callbacks/streaming_stdout.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/callbacks/usage.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/chat_history.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/chat_loaders.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/chat_sessions.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/document_loaders/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/document_loaders/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/document_loaders/blob_loaders.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/document_loaders/langsmith.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/documents/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/documents/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/documents/compressor.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/documents/transformers.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/embeddings/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/embeddings/embeddings.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/embeddings/fake.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/env.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/example_selectors/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/example_selectors/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/example_selectors/length_based.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/example_selectors/semantic_similarity.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/exceptions.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/globals.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/indexing/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/indexing/api.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/indexing/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/indexing/in_memory.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/_utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/chat_models.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/fake.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/fake_chat_models.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/llms.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/model_profile.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/load/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/load/dump.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/load/load.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/load/mapping.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/load/serializable.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/ai.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/bedrock.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/google_genai.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/google_vertexai.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/groq.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/langchain_v0.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/openai.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/chat.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/content.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/function.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/human.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/modifier.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/system.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/tool.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/format_instructions.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/json.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/list.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/openai_functions.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/pydantic.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/string.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/transform.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/xml.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/outputs/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/outputs/chat_generation.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/outputs/chat_result.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/outputs/generation.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/outputs/llm_result.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/outputs/run_info.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompt_values.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/chat.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/dict.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/few_shot.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/few_shot_with_templates.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/image.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/loading.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/message.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/prompt.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/string.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/structured.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/py.typed +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/rate_limiters.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/retrievers.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/branch.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/config.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/configurable.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/fallbacks.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/graph.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/graph_ascii.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/graph_mermaid.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/graph_png.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/history.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/passthrough.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/retry.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/router.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/schema.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/runnables/utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/stores.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/structured_query.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/sys_info.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tools/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tools/convert.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tools/render.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tools/retriever.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tools/simple.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tools/structured.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/_streaming.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/context.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/core.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/evaluation.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/event_stream.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/langchain.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/log_stream.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/memory_stream.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/root_listeners.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/run_collector.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/schemas.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/tracers/stdout.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/_merge.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/aiter.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/env.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/formatting.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/html.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/image.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/input.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/interactive_env.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/iter.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/json.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/json_schema.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/mustache.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/pydantic.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/strings.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/usage.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/utils/uuid.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/vectorstores/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/vectorstores/base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/vectorstores/in_memory.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/vectorstores/utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/scripts/check_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/scripts/lint_imports.sh +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/benchmarks/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/benchmarks/test_async_callbacks.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/benchmarks/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/integration_tests/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/integration_tests/test_compile.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/_api/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/_api/test_beta_decorator.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/_api/test_deprecation.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/_api/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/_api/test_path.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/caches/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/caches/test_in_memory_cache.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/callbacks/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/callbacks/test_async_callback_manager.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/callbacks/test_dispatch_custom_event.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/callbacks/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/callbacks/test_sync_callback_manager.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/callbacks/test_usage_callback.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/chat_history/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/chat_history/test_chat_history.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/conftest.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/data/prompt_file.txt +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/data/prompts/prompt_extra_args.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/data/prompts/prompt_missing_args.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/data/prompts/simple_prompt.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/dependencies/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/dependencies/test_dependencies.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/document_loaders/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/document_loaders/test_base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/document_loaders/test_langsmith.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/documents/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/documents/test_document.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/documents/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/documents/test_str.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/embeddings/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/embeddings/test_deterministic_embedding.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/example_selectors/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/example_selectors/test_base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/example_selectors/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/example_selectors/test_length_based_example_selector.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/example_selectors/test_similarity.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/example-non-utf8.csv +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/example-non-utf8.txt +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/example-utf8.csv +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/example-utf8.txt +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/example_prompt.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/examples.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/examples.yaml +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/few_shot_prompt.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/few_shot_prompt.yaml +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/few_shot_prompt_example_prompt.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/few_shot_prompt_examples_in.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/few_shot_prompt_yaml_examples.yaml +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/jinja_injection_prompt.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/jinja_injection_prompt.yaml +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/prompt_with_output_parser.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/simple_prompt.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/simple_prompt.yaml +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/simple_prompt_with_template_file.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/examples/simple_template.txt +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/fake/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/fake/callbacks.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/fake/test_fake_chat_model.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/indexing/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/indexing/test_hashed_document.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/indexing/test_in_memory_indexer.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/indexing/test_in_memory_record_manager.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/indexing/test_indexing.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/indexing/test_public_api.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/chat_models/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/chat_models/test_base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/chat_models/test_benchmark.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/chat_models/test_cache.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/chat_models/test_rate_limiting.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/llms/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/llms/test_base.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/llms/test_cache.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/language_models/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/load/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/load/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/load/test_serializable.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/block_translators/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/block_translators/test_anthropic.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/block_translators/test_bedrock.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/block_translators/test_bedrock_converse.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/block_translators/test_google_genai.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/block_translators/test_groq.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/block_translators/test_langchain_v0.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/block_translators/test_openai.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/block_translators/test_registration.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/test_ai.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/messages/test_utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/test_base_parsers.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/test_json.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/test_list_parser.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/test_openai_functions.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/test_pydantic_parser.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/test_xml_parser.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/outputs/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/outputs/test_chat_generation.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/outputs/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompt_file.txt +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/__snapshots__/test_chat.ambr +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/__snapshots__/test_prompt.ambr +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/prompt_extra_args.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/prompt_missing_args.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/simple_prompt.json +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_chat.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_dict.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_few_shot.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_few_shot_with_templates.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_image.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_loading.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_prompt.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_string.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_structured.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/prompts/test_utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/pydantic_utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/rate_limiters/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/rate_limiters/test_in_memory_rate_limiter.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/__snapshots__/test_graph.ambr +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_concurrency.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_config.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_configurable.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_fallbacks.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_graph.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_history.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_runnable.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_runnable_events_v1.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_runnable_events_v2.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_tracing_interops.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/runnables/test_utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/stores/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/stores/test_in_memory.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/stubs.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_globals.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_messages.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_outputs.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_prompt_values.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_pydantic_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_pydantic_serde.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_retrievers.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_setup.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/test_sys_info.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/tracers/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/tracers/test_async_base_tracer.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/tracers/test_base_tracer.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/tracers/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/tracers/test_langchain.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/tracers/test_memory_stream.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/tracers/test_run_collector.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/tracers/test_schemas.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_aiter.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_env.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_function_calling.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_html.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_imports.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_iter.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_json_schema.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_pydantic.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_rm_titles.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_strings.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_usage.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/utils/test_uuid_utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/vectorstores/__init__.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/vectorstores/test_in_memory.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/vectorstores/test_utils.py +0 -0
- {langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/vectorstores/test_vectorstore.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langchain-core
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: Building applications with LLMs through composability
|
|
5
5
|
Project-URL: Homepage, https://docs.langchain.com/
|
|
6
6
|
Project-URL: Documentation, https://reference.langchain.com/python/langchain_core/
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/anthropic.py
RENAMED
|
@@ -245,17 +245,20 @@ def _convert_to_v1_from_anthropic(message: AIMessage) -> list[types.ContentBlock
|
|
|
245
245
|
and message.chunk_position != "last"
|
|
246
246
|
):
|
|
247
247
|
# Isolated chunk
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
chunk = message.tool_call_chunks[0]
|
|
249
|
+
|
|
250
|
+
tool_call_chunk = types.ToolCallChunk(
|
|
251
|
+
name=chunk.get("name"),
|
|
252
|
+
id=chunk.get("id"),
|
|
253
|
+
args=chunk.get("args"),
|
|
254
|
+
type="tool_call_chunk",
|
|
250
255
|
)
|
|
251
256
|
if "caller" in block:
|
|
252
|
-
|
|
253
|
-
tool_call_chunk["extras"] = {}
|
|
254
|
-
tool_call_chunk["extras"]["caller"] = block["caller"]
|
|
255
|
-
|
|
256
|
-
if "type" not in tool_call_chunk:
|
|
257
|
-
tool_call_chunk["type"] = "tool_call_chunk"
|
|
257
|
+
tool_call_chunk["extras"] = {"caller": block["caller"]}
|
|
258
258
|
|
|
259
|
+
index = chunk.get("index")
|
|
260
|
+
if index is not None:
|
|
261
|
+
tool_call_chunk["index"] = index
|
|
259
262
|
yield tool_call_chunk
|
|
260
263
|
else:
|
|
261
264
|
tool_call_block: types.ToolCall | None = None
|
|
@@ -299,11 +302,16 @@ def _convert_to_v1_from_anthropic(message: AIMessage) -> list[types.ContentBlock
|
|
|
299
302
|
message, AIMessageChunk
|
|
300
303
|
):
|
|
301
304
|
if len(message.tool_call_chunks) == 1:
|
|
302
|
-
|
|
303
|
-
|
|
305
|
+
chunk = message.tool_call_chunks[0]
|
|
306
|
+
tool_call_chunk = types.ToolCallChunk(
|
|
307
|
+
name=chunk.get("name"),
|
|
308
|
+
id=chunk.get("id"),
|
|
309
|
+
args=chunk.get("args"),
|
|
310
|
+
type="tool_call_chunk",
|
|
304
311
|
)
|
|
305
|
-
|
|
306
|
-
|
|
312
|
+
index = chunk.get("index")
|
|
313
|
+
if index is not None:
|
|
314
|
+
tool_call_chunk["index"] = index
|
|
307
315
|
yield tool_call_chunk
|
|
308
316
|
|
|
309
317
|
else:
|
|
@@ -209,11 +209,16 @@ def _convert_to_v1_from_converse(message: AIMessage) -> list[types.ContentBlock]
|
|
|
209
209
|
and message.chunk_position != "last"
|
|
210
210
|
):
|
|
211
211
|
# Isolated chunk
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
chunk = message.tool_call_chunks[0]
|
|
213
|
+
tool_call_chunk = types.ToolCallChunk(
|
|
214
|
+
name=chunk.get("name"),
|
|
215
|
+
id=chunk.get("id"),
|
|
216
|
+
args=chunk.get("args"),
|
|
217
|
+
type="tool_call_chunk",
|
|
214
218
|
)
|
|
215
|
-
|
|
216
|
-
|
|
219
|
+
index = chunk.get("index")
|
|
220
|
+
if index is not None:
|
|
221
|
+
tool_call_chunk["index"] = index
|
|
217
222
|
yield tool_call_chunk
|
|
218
223
|
else:
|
|
219
224
|
tool_call_block: types.ToolCall | None = None
|
|
@@ -253,11 +258,16 @@ def _convert_to_v1_from_converse(message: AIMessage) -> list[types.ContentBlock]
|
|
|
253
258
|
and isinstance(message, AIMessageChunk)
|
|
254
259
|
and len(message.tool_call_chunks) == 1
|
|
255
260
|
):
|
|
256
|
-
|
|
257
|
-
|
|
261
|
+
chunk = message.tool_call_chunks[0]
|
|
262
|
+
tool_call_chunk = types.ToolCallChunk(
|
|
263
|
+
name=chunk.get("name"),
|
|
264
|
+
id=chunk.get("id"),
|
|
265
|
+
args=chunk.get("args"),
|
|
266
|
+
type="tool_call_chunk",
|
|
258
267
|
)
|
|
259
|
-
|
|
260
|
-
|
|
268
|
+
index = chunk.get("index")
|
|
269
|
+
if index is not None:
|
|
270
|
+
tool_call_chunk["index"] = index
|
|
261
271
|
yield tool_call_chunk
|
|
262
272
|
|
|
263
273
|
else:
|
|
@@ -47,22 +47,24 @@ def parse_tool_call(
|
|
|
47
47
|
"""
|
|
48
48
|
if "function" not in raw_tool_call:
|
|
49
49
|
return None
|
|
50
|
+
|
|
51
|
+
arguments = raw_tool_call["function"]["arguments"]
|
|
52
|
+
|
|
50
53
|
if partial:
|
|
51
54
|
try:
|
|
52
|
-
function_args = parse_partial_json(
|
|
53
|
-
raw_tool_call["function"]["arguments"], strict=strict
|
|
54
|
-
)
|
|
55
|
+
function_args = parse_partial_json(arguments, strict=strict)
|
|
55
56
|
except (JSONDecodeError, TypeError): # None args raise TypeError
|
|
56
57
|
return None
|
|
58
|
+
# Handle None or empty string arguments for parameter-less tools
|
|
59
|
+
elif not arguments:
|
|
60
|
+
function_args = {}
|
|
57
61
|
else:
|
|
58
62
|
try:
|
|
59
|
-
function_args = json.loads(
|
|
60
|
-
raw_tool_call["function"]["arguments"], strict=strict
|
|
61
|
-
)
|
|
63
|
+
function_args = json.loads(arguments, strict=strict)
|
|
62
64
|
except JSONDecodeError as e:
|
|
63
65
|
msg = (
|
|
64
66
|
f"Function {raw_tool_call['function']['name']} arguments:\n\n"
|
|
65
|
-
f"{
|
|
67
|
+
f"{arguments}\n\nare not valid JSON. "
|
|
66
68
|
f"Received JSONDecodeError {e}"
|
|
67
69
|
)
|
|
68
70
|
raise OutputParserException(msg) from e
|
|
@@ -22,6 +22,7 @@ from typing import (
|
|
|
22
22
|
get_type_hints,
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
+
import typing_extensions
|
|
25
26
|
from pydantic import (
|
|
26
27
|
BaseModel,
|
|
27
28
|
ConfigDict,
|
|
@@ -94,7 +95,7 @@ def _is_annotated_type(typ: type[Any]) -> bool:
|
|
|
94
95
|
Returns:
|
|
95
96
|
`True` if the type is an Annotated type, `False` otherwise.
|
|
96
97
|
"""
|
|
97
|
-
return get_origin(typ)
|
|
98
|
+
return get_origin(typ) in (typing.Annotated, typing_extensions.Annotated)
|
|
98
99
|
|
|
99
100
|
|
|
100
101
|
def _get_annotation_description(arg_type: type) -> str | None:
|
|
@@ -18,8 +18,10 @@ from typing import (
|
|
|
18
18
|
cast,
|
|
19
19
|
get_args,
|
|
20
20
|
get_origin,
|
|
21
|
+
get_type_hints,
|
|
21
22
|
)
|
|
22
23
|
|
|
24
|
+
import typing_extensions
|
|
23
25
|
from pydantic import BaseModel
|
|
24
26
|
from pydantic.v1 import BaseModel as BaseModelV1
|
|
25
27
|
from pydantic.v1 import Field as Field_v1
|
|
@@ -232,13 +234,20 @@ def _convert_any_typed_dicts_to_pydantic(
|
|
|
232
234
|
if is_typeddict(type_):
|
|
233
235
|
typed_dict = type_
|
|
234
236
|
docstring = inspect.getdoc(typed_dict)
|
|
235
|
-
|
|
237
|
+
# Use get_type_hints to properly resolve forward references and
|
|
238
|
+
# string annotations in Python 3.14+ (PEP 649 deferred annotations).
|
|
239
|
+
# include_extras=True preserves Annotated metadata.
|
|
240
|
+
try:
|
|
241
|
+
annotations_ = get_type_hints(typed_dict, include_extras=True)
|
|
242
|
+
except Exception:
|
|
243
|
+
# Fallback for edge cases where get_type_hints might fail
|
|
244
|
+
annotations_ = typed_dict.__annotations__
|
|
236
245
|
description, arg_descriptions = _parse_google_docstring(
|
|
237
246
|
docstring, list(annotations_)
|
|
238
247
|
)
|
|
239
248
|
fields: dict = {}
|
|
240
249
|
for arg, arg_type in annotations_.items():
|
|
241
|
-
if get_origin(arg_type)
|
|
250
|
+
if get_origin(arg_type) in (Annotated, typing_extensions.Annotated):
|
|
242
251
|
annotated_args = get_args(arg_type)
|
|
243
252
|
new_arg_type = _convert_any_typed_dicts_to_pydantic(
|
|
244
253
|
annotated_args[0], depth=depth + 1, visited=visited
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/tests/unit_tests/output_parsers/test_openai_tools.py
RENAMED
|
@@ -16,6 +16,7 @@ from langchain_core.output_parsers.openai_tools import (
|
|
|
16
16
|
JsonOutputKeyToolsParser,
|
|
17
17
|
JsonOutputToolsParser,
|
|
18
18
|
PydanticToolsParser,
|
|
19
|
+
parse_tool_call,
|
|
19
20
|
)
|
|
20
21
|
from langchain_core.outputs import ChatGeneration
|
|
21
22
|
|
|
@@ -1345,3 +1346,76 @@ def test_pydantic_tools_parser_with_optional_fields() -> None:
|
|
|
1345
1346
|
assert result_mixed[1].username == "alice"
|
|
1346
1347
|
assert result_mixed[1].bio is None
|
|
1347
1348
|
assert result_mixed[1].age == 35
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
def test_parse_tool_call_with_none_arguments() -> None:
|
|
1352
|
+
"""Test parse_tool_call handles None arguments for parameter-less tools.
|
|
1353
|
+
|
|
1354
|
+
When an LLM calls a tool that has no parameters, some providers return
|
|
1355
|
+
None for the arguments field instead of an empty string or "{}".
|
|
1356
|
+
This should not raise an error.
|
|
1357
|
+
|
|
1358
|
+
See: https://github.com/langchain-ai/langchain/issues/34123
|
|
1359
|
+
"""
|
|
1360
|
+
# Test case from issue #34123: arguments is None
|
|
1361
|
+
raw_tool_call = {
|
|
1362
|
+
"function": {"arguments": None, "name": "orderStatus"},
|
|
1363
|
+
"id": "chatcmpl-tool-8b1f759d874b412e931e64cf6f57bdcc",
|
|
1364
|
+
"type": "function",
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
# This should not raise an error - should return parsed tool call with empty args
|
|
1368
|
+
result = parse_tool_call(raw_tool_call, return_id=True)
|
|
1369
|
+
|
|
1370
|
+
assert result is not None
|
|
1371
|
+
assert result["name"] == "orderStatus"
|
|
1372
|
+
assert result["args"] == {}
|
|
1373
|
+
assert result["id"] == "chatcmpl-tool-8b1f759d874b412e931e64cf6f57bdcc"
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
def test_parse_tool_call_with_empty_string_arguments() -> None:
|
|
1377
|
+
"""Test parse_tool_call handles empty string arguments."""
|
|
1378
|
+
raw_tool_call = {
|
|
1379
|
+
"function": {"arguments": "", "name": "getStatus"},
|
|
1380
|
+
"id": "call_123",
|
|
1381
|
+
"type": "function",
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
# Empty string should be treated as empty args
|
|
1385
|
+
result = parse_tool_call(raw_tool_call, return_id=True)
|
|
1386
|
+
|
|
1387
|
+
assert result is not None
|
|
1388
|
+
assert result["name"] == "getStatus"
|
|
1389
|
+
assert result["args"] == {}
|
|
1390
|
+
assert result["id"] == "call_123"
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
def test_parse_tool_call_with_valid_arguments() -> None:
|
|
1394
|
+
"""Test parse_tool_call works normally with valid JSON arguments."""
|
|
1395
|
+
raw_tool_call = {
|
|
1396
|
+
"function": {"arguments": '{"param": "value"}', "name": "myTool"},
|
|
1397
|
+
"id": "call_456",
|
|
1398
|
+
"type": "function",
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
result = parse_tool_call(raw_tool_call, return_id=True)
|
|
1402
|
+
|
|
1403
|
+
assert result is not None
|
|
1404
|
+
assert result["name"] == "myTool"
|
|
1405
|
+
assert result["args"] == {"param": "value"}
|
|
1406
|
+
assert result["id"] == "call_456"
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
def test_parse_tool_call_partial_mode_with_none_arguments() -> None:
|
|
1410
|
+
"""Test parse_tool_call in partial mode handles None arguments."""
|
|
1411
|
+
raw_tool_call = {
|
|
1412
|
+
"function": {"arguments": None, "name": "streamingTool"},
|
|
1413
|
+
"id": "call_789",
|
|
1414
|
+
"type": "function",
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
# Partial mode should return None for None arguments (existing behavior)
|
|
1418
|
+
result = parse_tool_call(raw_tool_call, partial=True, return_id=True)
|
|
1419
|
+
|
|
1420
|
+
# In partial mode, None arguments returns None (incomplete tool call)
|
|
1421
|
+
assert result is None
|
|
@@ -1830,10 +1830,7 @@ def test_tool_inherited_injected_arg() -> None:
|
|
|
1830
1830
|
"type": "tool_call",
|
|
1831
1831
|
}
|
|
1832
1832
|
) == ToolMessage("bar", tool_call_id="123", name="foo")
|
|
1833
|
-
|
|
1834
|
-
ValidationError if not isinstance(tool_, InjectedTool) else TypeError
|
|
1835
|
-
)
|
|
1836
|
-
with pytest.raises(expected_error):
|
|
1833
|
+
with pytest.raises(ValidationError):
|
|
1837
1834
|
tool_.invoke({"x": 5})
|
|
1838
1835
|
|
|
1839
1836
|
assert convert_to_openai_function(tool_) == {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision =
|
|
2
|
+
revision = 3
|
|
3
3
|
requires-python = ">=3.10.0, <4.0.0"
|
|
4
4
|
resolution-markers = [
|
|
5
5
|
"python_full_version >= '3.14' and platform_python_implementation == 'PyPy'",
|
|
@@ -983,7 +983,7 @@ wheels = [
|
|
|
983
983
|
|
|
984
984
|
[[package]]
|
|
985
985
|
name = "langchain-core"
|
|
986
|
-
version = "1.2.
|
|
986
|
+
version = "1.2.2"
|
|
987
987
|
source = { editable = "." }
|
|
988
988
|
dependencies = [
|
|
989
989
|
{ name = "jsonpatch" },
|
|
@@ -1078,7 +1078,7 @@ typing = [
|
|
|
1078
1078
|
|
|
1079
1079
|
[[package]]
|
|
1080
1080
|
name = "langchain-tests"
|
|
1081
|
-
version = "1.0
|
|
1081
|
+
version = "1.1.0"
|
|
1082
1082
|
source = { directory = "../standard-tests" }
|
|
1083
1083
|
dependencies = [
|
|
1084
1084
|
{ name = "httpx" },
|
|
@@ -1123,7 +1123,7 @@ typing = [
|
|
|
1123
1123
|
|
|
1124
1124
|
[[package]]
|
|
1125
1125
|
name = "langchain-text-splitters"
|
|
1126
|
-
version = "1.
|
|
1126
|
+
version = "1.1.0"
|
|
1127
1127
|
source = { directory = "../text-splitters" }
|
|
1128
1128
|
dependencies = [
|
|
1129
1129
|
{ name = "langchain-core" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/document_loaders/blob_loaders.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/example_selectors/length_based.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/fake_chat_models.py
RENAMED
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/language_models/model_profile.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/__init__.py
RENAMED
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/bedrock.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/groq.py
RENAMED
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/messages/block_translators/openai.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/format_instructions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/output_parsers/openai_functions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langchain_core-1.2.0 → langchain_core-1.2.2}/langchain_core/prompts/few_shot_with_templates.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|