langchain-core 1.0.0a3__tar.gz → 1.0.0a4__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.
Files changed (365) hide show
  1. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/PKG-INFO +1 -1
  2. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/language_models/chat_models.py +6 -5
  3. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/base.py +4 -0
  4. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/block_translators/anthropic.py +8 -6
  5. langchain_core-1.0.0a4/langchain_core/messages/block_translators/bedrock.py +94 -0
  6. langchain_core-1.0.0a4/langchain_core/messages/block_translators/bedrock_converse.py +283 -0
  7. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/version.py +1 -1
  8. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/pyproject.toml +1 -1
  9. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/chat_models/test_base.py +40 -0
  10. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/messages/block_translators/test_anthropic.py +5 -0
  11. langchain_core-1.0.0a4/tests/unit_tests/messages/block_translators/test_bedrock.py +407 -0
  12. langchain_core-1.0.0a4/tests/unit_tests/messages/block_translators/test_bedrock_converse.py +381 -0
  13. langchain_core-1.0.0a3/langchain_core/messages/block_translators/bedrock.py +0 -47
  14. langchain_core-1.0.0a3/langchain_core/messages/block_translators/bedrock_converse.py +0 -49
  15. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/README.md +0 -0
  16. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/__init__.py +0 -0
  17. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/_api/__init__.py +0 -0
  18. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/_api/beta_decorator.py +0 -0
  19. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/_api/deprecation.py +0 -0
  20. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/_api/internal.py +0 -0
  21. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/_api/path.py +0 -0
  22. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/_import_utils.py +0 -0
  23. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/agents.py +0 -0
  24. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/caches.py +0 -0
  25. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/callbacks/__init__.py +0 -0
  26. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/callbacks/base.py +0 -0
  27. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/callbacks/file.py +0 -0
  28. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/callbacks/manager.py +0 -0
  29. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/callbacks/stdout.py +0 -0
  30. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/callbacks/streaming_stdout.py +0 -0
  31. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/callbacks/usage.py +0 -0
  32. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/chat_history.py +0 -0
  33. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/chat_loaders.py +0 -0
  34. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/chat_sessions.py +0 -0
  35. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/document_loaders/__init__.py +0 -0
  36. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/document_loaders/base.py +0 -0
  37. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/document_loaders/blob_loaders.py +0 -0
  38. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/document_loaders/langsmith.py +0 -0
  39. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/documents/__init__.py +0 -0
  40. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/documents/base.py +0 -0
  41. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/documents/compressor.py +0 -0
  42. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/documents/transformers.py +0 -0
  43. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/embeddings/__init__.py +0 -0
  44. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/embeddings/embeddings.py +0 -0
  45. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/embeddings/fake.py +0 -0
  46. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/env.py +0 -0
  47. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/example_selectors/__init__.py +0 -0
  48. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/example_selectors/base.py +0 -0
  49. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/example_selectors/length_based.py +0 -0
  50. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/example_selectors/semantic_similarity.py +0 -0
  51. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/exceptions.py +0 -0
  52. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/globals.py +0 -0
  53. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/indexing/__init__.py +0 -0
  54. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/indexing/api.py +0 -0
  55. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/indexing/base.py +0 -0
  56. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/indexing/in_memory.py +0 -0
  57. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/language_models/__init__.py +0 -0
  58. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/language_models/_utils.py +0 -0
  59. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/language_models/base.py +0 -0
  60. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/language_models/fake.py +0 -0
  61. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/language_models/fake_chat_models.py +0 -0
  62. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/language_models/llms.py +0 -0
  63. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/load/__init__.py +0 -0
  64. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/load/dump.py +0 -0
  65. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/load/load.py +0 -0
  66. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/load/mapping.py +0 -0
  67. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/load/serializable.py +0 -0
  68. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/memory.py +0 -0
  69. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/__init__.py +0 -0
  70. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/ai.py +0 -0
  71. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/block_translators/__init__.py +0 -0
  72. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/block_translators/google_genai.py +0 -0
  73. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/block_translators/google_vertexai.py +0 -0
  74. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/block_translators/groq.py +0 -0
  75. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/block_translators/langchain_v0.py +0 -0
  76. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/block_translators/ollama.py +0 -0
  77. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/block_translators/openai.py +0 -0
  78. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/chat.py +0 -0
  79. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/content.py +0 -0
  80. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/function.py +0 -0
  81. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/human.py +0 -0
  82. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/modifier.py +0 -0
  83. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/system.py +0 -0
  84. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/tool.py +0 -0
  85. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/messages/utils.py +0 -0
  86. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/__init__.py +0 -0
  87. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/base.py +0 -0
  88. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/format_instructions.py +0 -0
  89. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/json.py +0 -0
  90. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/list.py +0 -0
  91. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/openai_functions.py +0 -0
  92. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/openai_tools.py +0 -0
  93. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/pydantic.py +0 -0
  94. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/string.py +0 -0
  95. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/transform.py +0 -0
  96. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/output_parsers/xml.py +0 -0
  97. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/outputs/__init__.py +0 -0
  98. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/outputs/chat_generation.py +0 -0
  99. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/outputs/chat_result.py +0 -0
  100. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/outputs/generation.py +0 -0
  101. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/outputs/llm_result.py +0 -0
  102. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/outputs/run_info.py +0 -0
  103. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompt_values.py +0 -0
  104. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/__init__.py +0 -0
  105. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/base.py +0 -0
  106. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/chat.py +0 -0
  107. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/dict.py +0 -0
  108. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/few_shot.py +0 -0
  109. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/few_shot_with_templates.py +0 -0
  110. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/image.py +0 -0
  111. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/loading.py +0 -0
  112. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/message.py +0 -0
  113. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/pipeline.py +0 -0
  114. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/prompt.py +0 -0
  115. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/string.py +0 -0
  116. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/prompts/structured.py +0 -0
  117. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/py.typed +0 -0
  118. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/pydantic_v1/__init__.py +0 -0
  119. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/pydantic_v1/dataclasses.py +0 -0
  120. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/pydantic_v1/main.py +0 -0
  121. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/rate_limiters.py +0 -0
  122. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/retrievers.py +0 -0
  123. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/__init__.py +0 -0
  124. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/base.py +0 -0
  125. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/branch.py +0 -0
  126. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/config.py +0 -0
  127. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/configurable.py +0 -0
  128. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/fallbacks.py +0 -0
  129. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/graph.py +0 -0
  130. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/graph_ascii.py +0 -0
  131. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/graph_mermaid.py +0 -0
  132. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/graph_png.py +0 -0
  133. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/history.py +0 -0
  134. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/passthrough.py +0 -0
  135. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/retry.py +0 -0
  136. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/router.py +0 -0
  137. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/schema.py +0 -0
  138. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/runnables/utils.py +0 -0
  139. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/stores.py +0 -0
  140. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/structured_query.py +0 -0
  141. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/sys_info.py +0 -0
  142. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tools/__init__.py +0 -0
  143. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tools/base.py +0 -0
  144. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tools/convert.py +0 -0
  145. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tools/render.py +0 -0
  146. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tools/retriever.py +0 -0
  147. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tools/simple.py +0 -0
  148. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tools/structured.py +0 -0
  149. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/__init__.py +0 -0
  150. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/_streaming.py +0 -0
  151. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/base.py +0 -0
  152. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/context.py +0 -0
  153. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/core.py +0 -0
  154. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/evaluation.py +0 -0
  155. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/event_stream.py +0 -0
  156. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/langchain.py +0 -0
  157. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/langchain_v1.py +0 -0
  158. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/log_stream.py +0 -0
  159. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/memory_stream.py +0 -0
  160. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/root_listeners.py +0 -0
  161. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/run_collector.py +0 -0
  162. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/schemas.py +0 -0
  163. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/tracers/stdout.py +0 -0
  164. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/__init__.py +0 -0
  165. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/_merge.py +0 -0
  166. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/aiter.py +0 -0
  167. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/env.py +0 -0
  168. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/formatting.py +0 -0
  169. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/function_calling.py +0 -0
  170. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/html.py +0 -0
  171. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/image.py +0 -0
  172. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/input.py +0 -0
  173. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/interactive_env.py +0 -0
  174. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/iter.py +0 -0
  175. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/json.py +0 -0
  176. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/json_schema.py +0 -0
  177. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/loading.py +0 -0
  178. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/mustache.py +0 -0
  179. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/pydantic.py +0 -0
  180. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/strings.py +0 -0
  181. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/usage.py +0 -0
  182. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/utils/utils.py +0 -0
  183. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/vectorstores/__init__.py +0 -0
  184. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/vectorstores/base.py +0 -0
  185. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/vectorstores/in_memory.py +0 -0
  186. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/langchain_core/vectorstores/utils.py +0 -0
  187. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/__init__.py +0 -0
  188. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/benchmarks/__init__.py +0 -0
  189. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/benchmarks/test_async_callbacks.py +0 -0
  190. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/benchmarks/test_imports.py +0 -0
  191. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/integration_tests/__init__.py +0 -0
  192. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/integration_tests/test_compile.py +0 -0
  193. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/__init__.py +0 -0
  194. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/_api/__init__.py +0 -0
  195. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/_api/test_beta_decorator.py +0 -0
  196. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/_api/test_deprecation.py +0 -0
  197. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/_api/test_imports.py +0 -0
  198. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/_api/test_path.py +0 -0
  199. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/caches/__init__.py +0 -0
  200. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/caches/test_in_memory_cache.py +0 -0
  201. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/callbacks/__init__.py +0 -0
  202. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/callbacks/test_async_callback_manager.py +0 -0
  203. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/callbacks/test_dispatch_custom_event.py +0 -0
  204. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/callbacks/test_imports.py +0 -0
  205. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/callbacks/test_sync_callback_manager.py +0 -0
  206. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/callbacks/test_usage_callback.py +0 -0
  207. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/chat_history/__init__.py +0 -0
  208. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/chat_history/test_chat_history.py +0 -0
  209. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/conftest.py +0 -0
  210. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/data/prompt_file.txt +0 -0
  211. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/data/prompts/prompt_extra_args.json +0 -0
  212. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/data/prompts/prompt_missing_args.json +0 -0
  213. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/data/prompts/simple_prompt.json +0 -0
  214. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/dependencies/__init__.py +0 -0
  215. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/dependencies/test_dependencies.py +0 -0
  216. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/document_loaders/__init__.py +0 -0
  217. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/document_loaders/test_base.py +0 -0
  218. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/document_loaders/test_langsmith.py +0 -0
  219. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/documents/__init__.py +0 -0
  220. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/documents/test_document.py +0 -0
  221. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/documents/test_imports.py +0 -0
  222. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/documents/test_str.py +0 -0
  223. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/embeddings/__init__.py +0 -0
  224. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/embeddings/test_deterministic_embedding.py +0 -0
  225. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/example_selectors/__init__.py +0 -0
  226. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/example_selectors/test_base.py +0 -0
  227. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/example_selectors/test_imports.py +0 -0
  228. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/example_selectors/test_length_based_example_selector.py +0 -0
  229. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/example_selectors/test_similarity.py +0 -0
  230. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/example-non-utf8.csv +0 -0
  231. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/example-non-utf8.txt +0 -0
  232. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/example-utf8.csv +0 -0
  233. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/example-utf8.txt +0 -0
  234. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/example_prompt.json +0 -0
  235. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/examples.json +0 -0
  236. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/examples.yaml +0 -0
  237. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/few_shot_prompt.json +0 -0
  238. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/few_shot_prompt.yaml +0 -0
  239. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/few_shot_prompt_example_prompt.json +0 -0
  240. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/few_shot_prompt_examples_in.json +0 -0
  241. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/few_shot_prompt_yaml_examples.yaml +0 -0
  242. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/jinja_injection_prompt.json +0 -0
  243. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/jinja_injection_prompt.yaml +0 -0
  244. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/prompt_with_output_parser.json +0 -0
  245. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/simple_prompt.json +0 -0
  246. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/simple_prompt.yaml +0 -0
  247. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/simple_prompt_with_template_file.json +0 -0
  248. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/examples/simple_template.txt +0 -0
  249. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/fake/__init__.py +0 -0
  250. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/fake/callbacks.py +0 -0
  251. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/fake/test_fake_chat_model.py +0 -0
  252. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/indexing/__init__.py +0 -0
  253. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/indexing/test_hashed_document.py +0 -0
  254. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/indexing/test_in_memory_indexer.py +0 -0
  255. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/indexing/test_in_memory_record_manager.py +0 -0
  256. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/indexing/test_indexing.py +0 -0
  257. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/indexing/test_public_api.py +0 -0
  258. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/__init__.py +0 -0
  259. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/chat_models/__init__.py +0 -0
  260. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/chat_models/test_benchmark.py +0 -0
  261. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/chat_models/test_cache.py +0 -0
  262. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/chat_models/test_rate_limiting.py +0 -0
  263. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/llms/__init__.py +0 -0
  264. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/llms/test_base.py +0 -0
  265. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/llms/test_cache.py +0 -0
  266. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/language_models/test_imports.py +0 -0
  267. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/load/__init__.py +0 -0
  268. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/load/test_imports.py +0 -0
  269. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/load/test_serializable.py +0 -0
  270. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/messages/__init__.py +0 -0
  271. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/messages/block_translators/__init__.py +0 -0
  272. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/messages/block_translators/test_langchain_v0.py +0 -0
  273. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/messages/block_translators/test_openai.py +0 -0
  274. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/messages/block_translators/test_registration.py +0 -0
  275. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/messages/test_ai.py +0 -0
  276. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/messages/test_imports.py +0 -0
  277. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/messages/test_utils.py +0 -0
  278. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/output_parsers/__init__.py +0 -0
  279. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/output_parsers/test_base_parsers.py +0 -0
  280. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/output_parsers/test_imports.py +0 -0
  281. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/output_parsers/test_json.py +0 -0
  282. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/output_parsers/test_list_parser.py +0 -0
  283. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/output_parsers/test_openai_functions.py +0 -0
  284. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/output_parsers/test_openai_tools.py +0 -0
  285. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/output_parsers/test_pydantic_parser.py +0 -0
  286. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/output_parsers/test_xml_parser.py +0 -0
  287. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/outputs/__init__.py +0 -0
  288. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/outputs/test_chat_generation.py +0 -0
  289. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/outputs/test_imports.py +0 -0
  290. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompt_file.txt +0 -0
  291. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/__init__.py +0 -0
  292. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/__snapshots__/test_chat.ambr +0 -0
  293. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/__snapshots__/test_prompt.ambr +0 -0
  294. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/prompt_extra_args.json +0 -0
  295. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/prompt_missing_args.json +0 -0
  296. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/simple_prompt.json +0 -0
  297. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_chat.py +0 -0
  298. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_dict.py +0 -0
  299. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_few_shot.py +0 -0
  300. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_few_shot_with_templates.py +0 -0
  301. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_image.py +0 -0
  302. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_imports.py +0 -0
  303. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_loading.py +0 -0
  304. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_pipeline_prompt.py +0 -0
  305. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_prompt.py +0 -0
  306. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_structured.py +0 -0
  307. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/prompts/test_utils.py +0 -0
  308. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/pydantic_utils.py +0 -0
  309. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/rate_limiters/__init__.py +0 -0
  310. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/rate_limiters/test_in_memory_rate_limiter.py +0 -0
  311. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/__init__.py +0 -0
  312. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr +0 -0
  313. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/__snapshots__/test_graph.ambr +0 -0
  314. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr +0 -0
  315. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_concurrency.py +0 -0
  316. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_config.py +0 -0
  317. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_configurable.py +0 -0
  318. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_fallbacks.py +0 -0
  319. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_graph.py +0 -0
  320. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_history.py +0 -0
  321. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_imports.py +0 -0
  322. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_runnable.py +0 -0
  323. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_runnable_events_v1.py +0 -0
  324. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_runnable_events_v2.py +0 -0
  325. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_tracing_interops.py +0 -0
  326. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/runnables/test_utils.py +0 -0
  327. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/stores/__init__.py +0 -0
  328. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/stores/test_in_memory.py +0 -0
  329. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/stubs.py +0 -0
  330. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_globals.py +0 -0
  331. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_imports.py +0 -0
  332. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_messages.py +0 -0
  333. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_outputs.py +0 -0
  334. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_prompt_values.py +0 -0
  335. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_pydantic_imports.py +0 -0
  336. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_pydantic_serde.py +0 -0
  337. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_retrievers.py +0 -0
  338. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_setup.py +0 -0
  339. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_sys_info.py +0 -0
  340. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/test_tools.py +0 -0
  341. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/tracers/__init__.py +0 -0
  342. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/tracers/test_async_base_tracer.py +0 -0
  343. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/tracers/test_base_tracer.py +0 -0
  344. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/tracers/test_imports.py +0 -0
  345. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/tracers/test_langchain.py +0 -0
  346. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/tracers/test_memory_stream.py +0 -0
  347. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/tracers/test_run_collector.py +0 -0
  348. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/tracers/test_schemas.py +0 -0
  349. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/__init__.py +0 -0
  350. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_aiter.py +0 -0
  351. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_env.py +0 -0
  352. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_function_calling.py +0 -0
  353. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_html.py +0 -0
  354. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_imports.py +0 -0
  355. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_iter.py +0 -0
  356. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_json_schema.py +0 -0
  357. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_pydantic.py +0 -0
  358. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_rm_titles.py +0 -0
  359. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_strings.py +0 -0
  360. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_usage.py +0 -0
  361. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/utils/test_utils.py +0 -0
  362. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/vectorstores/__init__.py +0 -0
  363. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/vectorstores/test_in_memory.py +0 -0
  364. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/vectorstores/test_utils.py +0 -0
  365. {langchain_core-1.0.0a3 → langchain_core-1.0.0a4}/tests/unit_tests/vectorstores/test_vectorstore.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langchain-core
3
- Version: 1.0.0a3
3
+ Version: 1.0.0a4
4
4
  Summary: Building applications with LLMs through composability
5
5
  License: MIT
6
6
  Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/core
@@ -48,7 +48,6 @@ from langchain_core.messages import (
48
48
  message_chunk_to_message,
49
49
  )
50
50
  from langchain_core.messages.block_translators.openai import (
51
- convert_to_openai_data_block,
52
51
  convert_to_openai_image_block,
53
52
  )
54
53
  from langchain_core.output_parsers.openai_tools import (
@@ -149,16 +148,18 @@ def _format_for_tracing(messages: list[BaseMessage]) -> list[BaseMessage]:
149
148
  block.get("type") == "file"
150
149
  and is_data_content_block(block) # v0 (image/audio/file) or v1
151
150
  and "base64" in block
152
- # Narrows to old Base64ContentBlock or new FileContentBlock
151
+ # Backward compat: convert v1 base64 blocks to v0
153
152
  ):
154
153
  if message_to_trace is message:
155
154
  # Shallow copy
156
155
  message_to_trace = message.model_copy()
157
156
  message_to_trace.content = list(message_to_trace.content)
158
157
 
159
- message_to_trace.content[idx] = convert_to_openai_data_block( # type: ignore[index]
160
- block
161
- )
158
+ message_to_trace.content[idx] = { # type: ignore[index]
159
+ **{k: v for k, v in block.items() if k != "base64"},
160
+ "data": block["base64"],
161
+ "source_type": "base64",
162
+ }
162
163
  elif len(block) == 1 and "type" not in block:
163
164
  # Tracing assumes all content blocks have a "type" key. Here
164
165
  # we add this key if it is missing, and there's an obvious
@@ -184,6 +184,9 @@ class BaseMessage(Serializable):
184
184
  from langchain_core.messages.block_translators.anthropic import ( # noqa: PLC0415
185
185
  _convert_to_v1_from_anthropic_input,
186
186
  )
187
+ from langchain_core.messages.block_translators.bedrock_converse import ( # noqa: PLC0415
188
+ _convert_to_v1_from_converse_input,
189
+ )
187
190
  from langchain_core.messages.block_translators.langchain_v0 import ( # noqa: PLC0415
188
191
  _convert_v0_multimodal_input_to_v1,
189
192
  )
@@ -214,6 +217,7 @@ class BaseMessage(Serializable):
214
217
  _convert_v0_multimodal_input_to_v1,
215
218
  _convert_to_v1_from_chat_completions_input,
216
219
  _convert_to_v1_from_anthropic_input,
220
+ _convert_to_v1_from_converse_input,
217
221
  ]:
218
222
  blocks = parsing_step(blocks)
219
223
  return blocks
@@ -2,7 +2,7 @@
2
2
 
3
3
  import json
4
4
  from collections.abc import Iterable
5
- from typing import Any, Optional, cast
5
+ from typing import Any, Optional, Union, cast
6
6
 
7
7
  from langchain_core.messages import AIMessage, AIMessageChunk
8
8
  from langchain_core.messages import content as types
@@ -17,7 +17,7 @@ def _populate_extras(
17
17
 
18
18
  for key, value in block.items():
19
19
  if key not in known_fields:
20
- if "extras" not in block:
20
+ if "extras" not in standard_block:
21
21
  # Below type-ignores are because mypy thinks a non-standard block can
22
22
  # get here, although we exclude them above.
23
23
  standard_block["extras"] = {} # type: ignore[typeddict-unknown-key]
@@ -186,10 +186,12 @@ def _convert_citation_to_v1(citation: dict[str, Any]) -> types.Annotation:
186
186
  def _convert_to_v1_from_anthropic(message: AIMessage) -> list[types.ContentBlock]:
187
187
  """Convert Anthropic message content to v1 format."""
188
188
  if isinstance(message.content, str):
189
- message.content = [{"type": "text", "text": message.content}]
189
+ content: list[Union[str, dict]] = [{"type": "text", "text": message.content}]
190
+ else:
191
+ content = message.content
190
192
 
191
193
  def _iter_blocks() -> Iterable[types.ContentBlock]:
192
- for block in message.content:
194
+ for block in content:
193
195
  if not isinstance(block, dict):
194
196
  continue
195
197
  block_type = block.get("type")
@@ -429,12 +431,12 @@ def _convert_to_v1_from_anthropic(message: AIMessage) -> list[types.ContentBlock
429
431
 
430
432
 
431
433
  def translate_content(message: AIMessage) -> list[types.ContentBlock]:
432
- """Derive standard content blocks from a message with OpenAI content."""
434
+ """Derive standard content blocks from a message with Anthropic content."""
433
435
  return _convert_to_v1_from_anthropic(message)
434
436
 
435
437
 
436
438
  def translate_content_chunk(message: AIMessageChunk) -> list[types.ContentBlock]:
437
- """Derive standard content blocks from a message chunk with OpenAI content."""
439
+ """Derive standard content blocks from a message chunk with Anthropic content."""
438
440
  return _convert_to_v1_from_anthropic(message)
439
441
 
440
442
 
@@ -0,0 +1,94 @@
1
+ """Derivations of standard content blocks from Bedrock content."""
2
+
3
+ from langchain_core.messages import AIMessage, AIMessageChunk
4
+ from langchain_core.messages import content as types
5
+ from langchain_core.messages.block_translators.anthropic import (
6
+ _convert_to_v1_from_anthropic,
7
+ )
8
+
9
+
10
+ def _convert_to_v1_from_bedrock(message: AIMessage) -> list[types.ContentBlock]:
11
+ """Convert bedrock message content to v1 format."""
12
+ out = _convert_to_v1_from_anthropic(message)
13
+
14
+ content_tool_call_ids = {
15
+ block.get("id")
16
+ for block in out
17
+ if isinstance(block, dict) and block.get("type") == "tool_call"
18
+ }
19
+ for tool_call in message.tool_calls:
20
+ if (id_ := tool_call.get("id")) and id_ not in content_tool_call_ids:
21
+ tool_call_block: types.ToolCall = {
22
+ "type": "tool_call",
23
+ "id": id_,
24
+ "name": tool_call["name"],
25
+ "args": tool_call["args"],
26
+ }
27
+ if "index" in tool_call:
28
+ tool_call_block["index"] = tool_call["index"] # type: ignore[typeddict-item]
29
+ if "extras" in tool_call:
30
+ tool_call_block["extras"] = tool_call["extras"] # type: ignore[typeddict-item]
31
+ out.append(tool_call_block)
32
+ return out
33
+
34
+
35
+ def _convert_to_v1_from_bedrock_chunk(
36
+ message: AIMessageChunk,
37
+ ) -> list[types.ContentBlock]:
38
+ """Convert bedrock message chunk content to v1 format."""
39
+ if (
40
+ message.content == ""
41
+ and not message.additional_kwargs
42
+ and not message.tool_calls
43
+ ):
44
+ # Bedrock outputs multiple chunks containing response metadata
45
+ return []
46
+
47
+ out = _convert_to_v1_from_anthropic(message)
48
+
49
+ if (
50
+ message.tool_call_chunks
51
+ and not message.content
52
+ and message.chunk_position != "last" # keep tool_calls if aggregated
53
+ ):
54
+ for tool_call_chunk in message.tool_call_chunks:
55
+ tc: types.ToolCallChunk = {
56
+ "type": "tool_call_chunk",
57
+ "id": tool_call_chunk.get("id"),
58
+ "name": tool_call_chunk.get("name"),
59
+ "args": tool_call_chunk.get("args"),
60
+ }
61
+ if (idx := tool_call_chunk.get("index")) is not None:
62
+ tc["index"] = idx
63
+ out.append(tc)
64
+ return out
65
+
66
+
67
+ def translate_content(message: AIMessage) -> list[types.ContentBlock]:
68
+ """Derive standard content blocks from a message with Bedrock content."""
69
+ if "claude" not in message.response_metadata.get("model_name", "").lower():
70
+ raise NotImplementedError # fall back to best-effort parsing
71
+ return _convert_to_v1_from_bedrock(message)
72
+
73
+
74
+ def translate_content_chunk(message: AIMessageChunk) -> list[types.ContentBlock]:
75
+ """Derive standard content blocks from a message chunk with Bedrock content."""
76
+ # TODO: add model_name to all Bedrock chunks and update core merging logic
77
+ # to not append during aggregation. Then raise NotImplementedError here if
78
+ # not an Anthropic model to fall back to best-effort parsing.
79
+ return _convert_to_v1_from_bedrock_chunk(message)
80
+
81
+
82
+ def _register_bedrock_translator() -> None:
83
+ """Register the bedrock translator with the central registry.
84
+
85
+ Run automatically when the module is imported.
86
+ """
87
+ from langchain_core.messages.block_translators import ( # noqa: PLC0415
88
+ register_translator,
89
+ )
90
+
91
+ register_translator("bedrock", translate_content, translate_content_chunk)
92
+
93
+
94
+ _register_bedrock_translator()
@@ -0,0 +1,283 @@
1
+ """Derivations of standard content blocks from Amazon (Bedrock Converse) content."""
2
+
3
+ import base64
4
+ from collections.abc import Iterable
5
+ from typing import Any, Optional, cast
6
+
7
+ from langchain_core.messages import AIMessage, AIMessageChunk
8
+ from langchain_core.messages import content as types
9
+
10
+
11
+ def _bytes_to_b64_str(bytes_: bytes) -> str:
12
+ return base64.b64encode(bytes_).decode("utf-8")
13
+
14
+
15
+ def _populate_extras(
16
+ standard_block: types.ContentBlock, block: dict[str, Any], known_fields: set[str]
17
+ ) -> types.ContentBlock:
18
+ """Mutate a block, populating extras."""
19
+ if standard_block.get("type") == "non_standard":
20
+ return standard_block
21
+
22
+ for key, value in block.items():
23
+ if key not in known_fields:
24
+ if "extras" not in standard_block:
25
+ # Below type-ignores are because mypy thinks a non-standard block can
26
+ # get here, although we exclude them above.
27
+ standard_block["extras"] = {} # type: ignore[typeddict-unknown-key]
28
+ standard_block["extras"][key] = value # type: ignore[typeddict-item]
29
+
30
+ return standard_block
31
+
32
+
33
+ def _convert_to_v1_from_converse_input(
34
+ content: list[types.ContentBlock],
35
+ ) -> list[types.ContentBlock]:
36
+ """Attempt to unpack non-standard blocks."""
37
+
38
+ def _iter_blocks() -> Iterable[types.ContentBlock]:
39
+ blocks: list[dict[str, Any]] = [
40
+ cast("dict[str, Any]", block)
41
+ if block.get("type") != "non_standard"
42
+ else block["value"] # type: ignore[typeddict-item] # this is only non-standard blocks
43
+ for block in content
44
+ ]
45
+ for block in blocks:
46
+ num_keys = len(block)
47
+
48
+ if num_keys == 1 and (text := block.get("text")):
49
+ yield {"type": "text", "text": text}
50
+
51
+ elif (
52
+ num_keys == 1
53
+ and (document := block.get("document"))
54
+ and isinstance(document, dict)
55
+ and "format" in document
56
+ ):
57
+ if document.get("format") == "pdf":
58
+ if "bytes" in document.get("source", {}):
59
+ file_block: types.FileContentBlock = {
60
+ "type": "file",
61
+ "base64": _bytes_to_b64_str(document["source"]["bytes"]),
62
+ "mime_type": "application/pdf",
63
+ }
64
+ _populate_extras(file_block, document, {"format", "source"})
65
+ yield file_block
66
+
67
+ else:
68
+ yield {"type": "non_standard", "value": block}
69
+
70
+ elif document["format"] == "txt":
71
+ if "text" in document.get("source", {}):
72
+ plain_text_block: types.PlainTextContentBlock = {
73
+ "type": "text-plain",
74
+ "text": document["source"]["text"],
75
+ "mime_type": "text/plain",
76
+ }
77
+ _populate_extras(
78
+ plain_text_block, document, {"format", "source"}
79
+ )
80
+ yield plain_text_block
81
+ else:
82
+ yield {"type": "non_standard", "value": block}
83
+
84
+ else:
85
+ yield {"type": "non_standard", "value": block}
86
+
87
+ elif (
88
+ num_keys == 1
89
+ and (image := block.get("image"))
90
+ and isinstance(image, dict)
91
+ and "format" in image
92
+ ):
93
+ if "bytes" in image.get("source", {}):
94
+ image_block: types.ImageContentBlock = {
95
+ "type": "image",
96
+ "base64": _bytes_to_b64_str(image["source"]["bytes"]),
97
+ "mime_type": f"image/{image['format']}",
98
+ }
99
+ _populate_extras(image_block, image, {"format", "source"})
100
+ yield image_block
101
+
102
+ else:
103
+ yield {"type": "non_standard", "value": block}
104
+
105
+ elif block.get("type") in types.KNOWN_BLOCK_TYPES:
106
+ yield cast("types.ContentBlock", block)
107
+
108
+ else:
109
+ yield {"type": "non_standard", "value": block}
110
+
111
+ return list(_iter_blocks())
112
+
113
+
114
+ def _convert_citation_to_v1(citation: dict[str, Any]) -> types.Annotation:
115
+ standard_citation: types.Citation = {"type": "citation"}
116
+ if "title" in citation:
117
+ standard_citation["title"] = citation["title"]
118
+ if (
119
+ (source_content := citation.get("source_content"))
120
+ and isinstance(source_content, list)
121
+ and all(isinstance(item, dict) for item in source_content)
122
+ ):
123
+ standard_citation["cited_text"] = "".join(
124
+ item.get("text", "") for item in source_content
125
+ )
126
+
127
+ known_fields = {"type", "source_content", "title", "index", "extras"}
128
+
129
+ for key, value in citation.items():
130
+ if key not in known_fields:
131
+ if "extras" not in standard_citation:
132
+ standard_citation["extras"] = {}
133
+ standard_citation["extras"][key] = value
134
+
135
+ return standard_citation
136
+
137
+
138
+ def _convert_to_v1_from_converse(message: AIMessage) -> list[types.ContentBlock]:
139
+ """Convert Bedrock Converse message content to v1 format."""
140
+ if (
141
+ message.content == ""
142
+ and not message.additional_kwargs
143
+ and not message.tool_calls
144
+ ):
145
+ # Converse outputs multiple chunks containing response metadata
146
+ return []
147
+
148
+ if isinstance(message.content, str):
149
+ message.content = [{"type": "text", "text": message.content}]
150
+
151
+ def _iter_blocks() -> Iterable[types.ContentBlock]:
152
+ for block in message.content:
153
+ if not isinstance(block, dict):
154
+ continue
155
+ block_type = block.get("type")
156
+
157
+ if block_type == "text":
158
+ if citations := block.get("citations"):
159
+ text_block: types.TextContentBlock = {
160
+ "type": "text",
161
+ "text": block.get("text", ""),
162
+ "annotations": [_convert_citation_to_v1(a) for a in citations],
163
+ }
164
+ else:
165
+ text_block = {"type": "text", "text": block["text"]}
166
+ if "index" in block:
167
+ text_block["index"] = block["index"]
168
+ yield text_block
169
+
170
+ elif block_type == "reasoning_content":
171
+ reasoning_block: types.ReasoningContentBlock = {"type": "reasoning"}
172
+ if reasoning_content := block.get("reasoning_content"):
173
+ if reasoning := reasoning_content.get("text"):
174
+ reasoning_block["reasoning"] = reasoning
175
+ if signature := reasoning_content.get("signature"):
176
+ if "extras" not in reasoning_block:
177
+ reasoning_block["extras"] = {}
178
+ reasoning_block["extras"]["signature"] = signature
179
+
180
+ if "index" in block:
181
+ reasoning_block["index"] = block["index"]
182
+
183
+ known_fields = {"type", "reasoning_content", "index", "extras"}
184
+ for key in block:
185
+ if key not in known_fields:
186
+ if "extras" not in reasoning_block:
187
+ reasoning_block["extras"] = {}
188
+ reasoning_block["extras"][key] = block[key]
189
+ yield reasoning_block
190
+
191
+ elif block_type == "tool_use":
192
+ if (
193
+ isinstance(message, AIMessageChunk)
194
+ and len(message.tool_call_chunks) == 1
195
+ and message.chunk_position != "last"
196
+ ):
197
+ # Isolated chunk
198
+ tool_call_chunk: types.ToolCallChunk = (
199
+ message.tool_call_chunks[0].copy() # type: ignore[assignment]
200
+ )
201
+ if "type" not in tool_call_chunk:
202
+ tool_call_chunk["type"] = "tool_call_chunk"
203
+ yield tool_call_chunk
204
+ else:
205
+ tool_call_block: Optional[types.ToolCall] = None
206
+ # Non-streaming or gathered chunk
207
+ if len(message.tool_calls) == 1:
208
+ tool_call_block = {
209
+ "type": "tool_call",
210
+ "name": message.tool_calls[0]["name"],
211
+ "args": message.tool_calls[0]["args"],
212
+ "id": message.tool_calls[0].get("id"),
213
+ }
214
+ elif call_id := block.get("id"):
215
+ for tc in message.tool_calls:
216
+ if tc.get("id") == call_id:
217
+ tool_call_block = {
218
+ "type": "tool_call",
219
+ "name": tc["name"],
220
+ "args": tc["args"],
221
+ "id": tc.get("id"),
222
+ }
223
+ break
224
+ else:
225
+ pass
226
+ if not tool_call_block:
227
+ tool_call_block = {
228
+ "type": "tool_call",
229
+ "name": block.get("name", ""),
230
+ "args": block.get("input", {}),
231
+ "id": block.get("id", ""),
232
+ }
233
+ if "index" in block:
234
+ tool_call_block["index"] = block["index"]
235
+ yield tool_call_block
236
+
237
+ elif (
238
+ block_type == "input_json_delta"
239
+ and isinstance(message, AIMessageChunk)
240
+ and len(message.tool_call_chunks) == 1
241
+ ):
242
+ tool_call_chunk = (
243
+ message.tool_call_chunks[0].copy() # type: ignore[assignment]
244
+ )
245
+ if "type" not in tool_call_chunk:
246
+ tool_call_chunk["type"] = "tool_call_chunk"
247
+ yield tool_call_chunk
248
+
249
+ else:
250
+ new_block: types.NonStandardContentBlock = {
251
+ "type": "non_standard",
252
+ "value": block,
253
+ }
254
+ if "index" in new_block["value"]:
255
+ new_block["index"] = new_block["value"].pop("index")
256
+ yield new_block
257
+
258
+ return list(_iter_blocks())
259
+
260
+
261
+ def translate_content(message: AIMessage) -> list[types.ContentBlock]:
262
+ """Derive standard content blocks from a message with Bedrock Converse content."""
263
+ return _convert_to_v1_from_converse(message)
264
+
265
+
266
+ def translate_content_chunk(message: AIMessageChunk) -> list[types.ContentBlock]:
267
+ """Derive standard content blocks from a chunk with Bedrock Converse content."""
268
+ return _convert_to_v1_from_converse(message)
269
+
270
+
271
+ def _register_bedrock_converse_translator() -> None:
272
+ """Register the Bedrock Converse translator with the central registry.
273
+
274
+ Run automatically when the module is imported.
275
+ """
276
+ from langchain_core.messages.block_translators import ( # noqa: PLC0415
277
+ register_translator,
278
+ )
279
+
280
+ register_translator("bedrock_converse", translate_content, translate_content_chunk)
281
+
282
+
283
+ _register_bedrock_converse_translator()
@@ -1,3 +1,3 @@
1
1
  """langchain-core version information and utilities."""
2
2
 
3
- VERSION = "1.0.0a3"
3
+ VERSION = "1.0.0a4"
@@ -17,7 +17,7 @@ dependencies = [
17
17
  "pydantic>=2.7.4",
18
18
  ]
19
19
  name = "langchain-core"
20
- version = "1.0.0a3"
20
+ version = "1.0.0a4"
21
21
  description = "Building applications with LLMs through composability"
22
22
  readme = "README.md"
23
23
 
@@ -1,6 +1,7 @@
1
1
  """Test base chat model."""
2
2
 
3
3
  import uuid
4
+ import warnings
4
5
  from collections.abc import AsyncIterator, Iterator
5
6
  from typing import TYPE_CHECKING, Any, Literal, Optional, Union
6
7
 
@@ -505,6 +506,45 @@ def test_trace_images_in_openai_format() -> None:
505
506
  ]
506
507
 
507
508
 
509
+ def test_trace_pdfs() -> None:
510
+ # For backward compat
511
+ llm = ParrotFakeChatModel()
512
+ messages = [
513
+ {
514
+ "role": "user",
515
+ "content": [
516
+ {
517
+ "type": "file",
518
+ "mime_type": "application/pdf",
519
+ "base64": "<base64 string>",
520
+ }
521
+ ],
522
+ }
523
+ ]
524
+ tracer = FakeChatModelStartTracer()
525
+
526
+ with warnings.catch_warnings():
527
+ warnings.simplefilter("error")
528
+ llm.invoke(messages, config={"callbacks": [tracer]})
529
+
530
+ assert tracer.messages == [
531
+ [
532
+ [
533
+ HumanMessage(
534
+ content=[
535
+ {
536
+ "type": "file",
537
+ "mime_type": "application/pdf",
538
+ "source_type": "base64",
539
+ "data": "<base64 string>",
540
+ }
541
+ ]
542
+ )
543
+ ]
544
+ ]
545
+ ]
546
+
547
+
508
548
  def test_content_block_transformation_v0_to_v1_image() -> None:
509
549
  """Test that v0 format image content blocks are transformed to v1 format."""
510
550
  # Create a message with v0 format image content
@@ -162,6 +162,11 @@ def test_convert_to_v1_from_anthropic() -> None:
162
162
  # Check no mutation
163
163
  assert message.content != expected_content
164
164
 
165
+ message = AIMessage("Hello", response_metadata={"model_provider": "anthropic"})
166
+ expected_content = [{"type": "text", "text": "Hello"}]
167
+ assert message.content_blocks == expected_content
168
+ assert message.content != expected_content # check no mutation
169
+
165
170
 
166
171
  def test_convert_to_v1_from_anthropic_chunk() -> None:
167
172
  chunks = [