langchain-core 1.0.0a5__tar.gz → 1.0.0a6__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 (364) hide show
  1. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/PKG-INFO +1 -11
  2. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/README.md +0 -10
  3. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/base.py +5 -1
  4. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/block_translators/__init__.py +15 -2
  5. langchain_core-1.0.0a6/langchain_core/messages/block_translators/google_genai.py +529 -0
  6. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/base.py +10 -12
  7. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tools/base.py +1 -0
  8. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/version.py +1 -1
  9. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/pyproject.toml +1 -1
  10. langchain_core-1.0.0a5/langchain_core/messages/block_translators/google_genai.py +0 -47
  11. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/__init__.py +0 -0
  12. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/_api/__init__.py +0 -0
  13. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/_api/beta_decorator.py +0 -0
  14. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/_api/deprecation.py +0 -0
  15. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/_api/internal.py +0 -0
  16. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/_api/path.py +0 -0
  17. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/_import_utils.py +0 -0
  18. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/agents.py +0 -0
  19. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/caches.py +0 -0
  20. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/callbacks/__init__.py +0 -0
  21. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/callbacks/base.py +0 -0
  22. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/callbacks/file.py +0 -0
  23. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/callbacks/manager.py +0 -0
  24. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/callbacks/stdout.py +0 -0
  25. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/callbacks/streaming_stdout.py +0 -0
  26. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/callbacks/usage.py +0 -0
  27. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/chat_history.py +0 -0
  28. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/chat_loaders.py +0 -0
  29. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/chat_sessions.py +0 -0
  30. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/document_loaders/__init__.py +0 -0
  31. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/document_loaders/base.py +0 -0
  32. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/document_loaders/blob_loaders.py +0 -0
  33. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/document_loaders/langsmith.py +0 -0
  34. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/documents/__init__.py +0 -0
  35. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/documents/base.py +0 -0
  36. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/documents/compressor.py +0 -0
  37. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/documents/transformers.py +0 -0
  38. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/embeddings/__init__.py +0 -0
  39. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/embeddings/embeddings.py +0 -0
  40. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/embeddings/fake.py +0 -0
  41. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/env.py +0 -0
  42. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/example_selectors/__init__.py +0 -0
  43. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/example_selectors/base.py +0 -0
  44. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/example_selectors/length_based.py +0 -0
  45. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/example_selectors/semantic_similarity.py +0 -0
  46. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/exceptions.py +0 -0
  47. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/globals.py +0 -0
  48. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/indexing/__init__.py +0 -0
  49. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/indexing/api.py +0 -0
  50. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/indexing/base.py +0 -0
  51. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/indexing/in_memory.py +0 -0
  52. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/language_models/__init__.py +0 -0
  53. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/language_models/_utils.py +0 -0
  54. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/language_models/base.py +0 -0
  55. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/language_models/chat_models.py +0 -0
  56. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/language_models/fake.py +0 -0
  57. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/language_models/fake_chat_models.py +0 -0
  58. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/language_models/llms.py +0 -0
  59. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/load/__init__.py +0 -0
  60. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/load/dump.py +0 -0
  61. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/load/load.py +0 -0
  62. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/load/mapping.py +0 -0
  63. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/load/serializable.py +0 -0
  64. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/memory.py +0 -0
  65. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/__init__.py +0 -0
  66. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/ai.py +0 -0
  67. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/block_translators/anthropic.py +0 -0
  68. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/block_translators/bedrock.py +0 -0
  69. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/block_translators/bedrock_converse.py +0 -0
  70. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/block_translators/google_vertexai.py +0 -0
  71. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/block_translators/groq.py +0 -0
  72. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/block_translators/langchain_v0.py +0 -0
  73. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/block_translators/ollama.py +0 -0
  74. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/block_translators/openai.py +0 -0
  75. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/chat.py +0 -0
  76. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/content.py +0 -0
  77. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/function.py +0 -0
  78. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/human.py +0 -0
  79. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/modifier.py +0 -0
  80. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/system.py +0 -0
  81. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/tool.py +0 -0
  82. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/messages/utils.py +0 -0
  83. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/__init__.py +0 -0
  84. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/base.py +0 -0
  85. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/format_instructions.py +0 -0
  86. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/json.py +0 -0
  87. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/list.py +0 -0
  88. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/openai_functions.py +0 -0
  89. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/openai_tools.py +0 -0
  90. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/pydantic.py +0 -0
  91. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/string.py +0 -0
  92. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/transform.py +0 -0
  93. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/output_parsers/xml.py +0 -0
  94. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/outputs/__init__.py +0 -0
  95. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/outputs/chat_generation.py +0 -0
  96. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/outputs/chat_result.py +0 -0
  97. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/outputs/generation.py +0 -0
  98. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/outputs/llm_result.py +0 -0
  99. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/outputs/run_info.py +0 -0
  100. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompt_values.py +0 -0
  101. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/__init__.py +0 -0
  102. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/base.py +0 -0
  103. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/chat.py +0 -0
  104. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/dict.py +0 -0
  105. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/few_shot.py +0 -0
  106. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/few_shot_with_templates.py +0 -0
  107. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/image.py +0 -0
  108. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/loading.py +0 -0
  109. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/message.py +0 -0
  110. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/pipeline.py +0 -0
  111. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/prompt.py +0 -0
  112. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/string.py +0 -0
  113. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/prompts/structured.py +0 -0
  114. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/py.typed +0 -0
  115. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/pydantic_v1/__init__.py +0 -0
  116. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/pydantic_v1/dataclasses.py +0 -0
  117. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/pydantic_v1/main.py +0 -0
  118. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/rate_limiters.py +0 -0
  119. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/retrievers.py +0 -0
  120. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/__init__.py +0 -0
  121. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/branch.py +0 -0
  122. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/config.py +0 -0
  123. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/configurable.py +0 -0
  124. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/fallbacks.py +0 -0
  125. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/graph.py +0 -0
  126. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/graph_ascii.py +0 -0
  127. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/graph_mermaid.py +0 -0
  128. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/graph_png.py +0 -0
  129. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/history.py +0 -0
  130. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/passthrough.py +0 -0
  131. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/retry.py +0 -0
  132. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/router.py +0 -0
  133. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/schema.py +0 -0
  134. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/runnables/utils.py +0 -0
  135. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/stores.py +0 -0
  136. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/structured_query.py +0 -0
  137. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/sys_info.py +0 -0
  138. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tools/__init__.py +0 -0
  139. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tools/convert.py +0 -0
  140. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tools/render.py +0 -0
  141. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tools/retriever.py +0 -0
  142. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tools/simple.py +0 -0
  143. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tools/structured.py +0 -0
  144. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/__init__.py +0 -0
  145. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/_streaming.py +0 -0
  146. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/base.py +0 -0
  147. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/context.py +0 -0
  148. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/core.py +0 -0
  149. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/evaluation.py +0 -0
  150. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/event_stream.py +0 -0
  151. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/langchain.py +0 -0
  152. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/langchain_v1.py +0 -0
  153. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/log_stream.py +0 -0
  154. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/memory_stream.py +0 -0
  155. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/root_listeners.py +0 -0
  156. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/run_collector.py +0 -0
  157. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/schemas.py +0 -0
  158. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/tracers/stdout.py +0 -0
  159. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/__init__.py +0 -0
  160. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/_merge.py +0 -0
  161. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/aiter.py +0 -0
  162. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/env.py +0 -0
  163. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/formatting.py +0 -0
  164. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/function_calling.py +0 -0
  165. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/html.py +0 -0
  166. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/image.py +0 -0
  167. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/input.py +0 -0
  168. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/interactive_env.py +0 -0
  169. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/iter.py +0 -0
  170. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/json.py +0 -0
  171. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/json_schema.py +0 -0
  172. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/loading.py +0 -0
  173. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/mustache.py +0 -0
  174. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/pydantic.py +0 -0
  175. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/strings.py +0 -0
  176. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/usage.py +0 -0
  177. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/utils/utils.py +0 -0
  178. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/vectorstores/__init__.py +0 -0
  179. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/vectorstores/base.py +0 -0
  180. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/vectorstores/in_memory.py +0 -0
  181. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/langchain_core/vectorstores/utils.py +0 -0
  182. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/__init__.py +0 -0
  183. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/benchmarks/__init__.py +0 -0
  184. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/benchmarks/test_async_callbacks.py +0 -0
  185. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/benchmarks/test_imports.py +0 -0
  186. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/integration_tests/__init__.py +0 -0
  187. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/integration_tests/test_compile.py +0 -0
  188. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/__init__.py +0 -0
  189. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/_api/__init__.py +0 -0
  190. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/_api/test_beta_decorator.py +0 -0
  191. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/_api/test_deprecation.py +0 -0
  192. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/_api/test_imports.py +0 -0
  193. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/_api/test_path.py +0 -0
  194. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/caches/__init__.py +0 -0
  195. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/caches/test_in_memory_cache.py +0 -0
  196. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/callbacks/__init__.py +0 -0
  197. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/callbacks/test_async_callback_manager.py +0 -0
  198. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/callbacks/test_dispatch_custom_event.py +0 -0
  199. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/callbacks/test_imports.py +0 -0
  200. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/callbacks/test_sync_callback_manager.py +0 -0
  201. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/callbacks/test_usage_callback.py +0 -0
  202. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/chat_history/__init__.py +0 -0
  203. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/chat_history/test_chat_history.py +0 -0
  204. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/conftest.py +0 -0
  205. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/data/prompt_file.txt +0 -0
  206. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/data/prompts/prompt_extra_args.json +0 -0
  207. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/data/prompts/prompt_missing_args.json +0 -0
  208. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/data/prompts/simple_prompt.json +0 -0
  209. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/dependencies/__init__.py +0 -0
  210. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/dependencies/test_dependencies.py +0 -0
  211. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/document_loaders/__init__.py +0 -0
  212. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/document_loaders/test_base.py +0 -0
  213. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/document_loaders/test_langsmith.py +0 -0
  214. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/documents/__init__.py +0 -0
  215. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/documents/test_document.py +0 -0
  216. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/documents/test_imports.py +0 -0
  217. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/documents/test_str.py +0 -0
  218. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/embeddings/__init__.py +0 -0
  219. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/embeddings/test_deterministic_embedding.py +0 -0
  220. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/example_selectors/__init__.py +0 -0
  221. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/example_selectors/test_base.py +0 -0
  222. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/example_selectors/test_imports.py +0 -0
  223. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/example_selectors/test_length_based_example_selector.py +0 -0
  224. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/example_selectors/test_similarity.py +0 -0
  225. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/example-non-utf8.csv +0 -0
  226. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/example-non-utf8.txt +0 -0
  227. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/example-utf8.csv +0 -0
  228. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/example-utf8.txt +0 -0
  229. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/example_prompt.json +0 -0
  230. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/examples.json +0 -0
  231. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/examples.yaml +0 -0
  232. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/few_shot_prompt.json +0 -0
  233. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/few_shot_prompt.yaml +0 -0
  234. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/few_shot_prompt_example_prompt.json +0 -0
  235. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/few_shot_prompt_examples_in.json +0 -0
  236. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/few_shot_prompt_yaml_examples.yaml +0 -0
  237. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/jinja_injection_prompt.json +0 -0
  238. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/jinja_injection_prompt.yaml +0 -0
  239. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/prompt_with_output_parser.json +0 -0
  240. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/simple_prompt.json +0 -0
  241. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/simple_prompt.yaml +0 -0
  242. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/simple_prompt_with_template_file.json +0 -0
  243. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/examples/simple_template.txt +0 -0
  244. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/fake/__init__.py +0 -0
  245. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/fake/callbacks.py +0 -0
  246. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/fake/test_fake_chat_model.py +0 -0
  247. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/indexing/__init__.py +0 -0
  248. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/indexing/test_hashed_document.py +0 -0
  249. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/indexing/test_in_memory_indexer.py +0 -0
  250. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/indexing/test_in_memory_record_manager.py +0 -0
  251. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/indexing/test_indexing.py +0 -0
  252. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/indexing/test_public_api.py +0 -0
  253. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/__init__.py +0 -0
  254. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/chat_models/__init__.py +0 -0
  255. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/chat_models/test_base.py +0 -0
  256. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/chat_models/test_benchmark.py +0 -0
  257. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/chat_models/test_cache.py +0 -0
  258. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/chat_models/test_rate_limiting.py +0 -0
  259. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/llms/__init__.py +0 -0
  260. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/llms/test_base.py +0 -0
  261. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/llms/test_cache.py +0 -0
  262. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/language_models/test_imports.py +0 -0
  263. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/load/__init__.py +0 -0
  264. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/load/test_imports.py +0 -0
  265. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/load/test_serializable.py +0 -0
  266. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/__init__.py +0 -0
  267. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/block_translators/__init__.py +0 -0
  268. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/block_translators/test_anthropic.py +0 -0
  269. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/block_translators/test_bedrock.py +0 -0
  270. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/block_translators/test_bedrock_converse.py +0 -0
  271. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/block_translators/test_langchain_v0.py +0 -0
  272. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/block_translators/test_openai.py +0 -0
  273. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/block_translators/test_registration.py +0 -0
  274. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/test_ai.py +0 -0
  275. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/test_imports.py +0 -0
  276. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/messages/test_utils.py +0 -0
  277. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/output_parsers/__init__.py +0 -0
  278. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/output_parsers/test_base_parsers.py +0 -0
  279. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/output_parsers/test_imports.py +0 -0
  280. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/output_parsers/test_json.py +0 -0
  281. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/output_parsers/test_list_parser.py +0 -0
  282. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/output_parsers/test_openai_functions.py +0 -0
  283. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/output_parsers/test_openai_tools.py +0 -0
  284. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/output_parsers/test_pydantic_parser.py +0 -0
  285. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/output_parsers/test_xml_parser.py +0 -0
  286. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/outputs/__init__.py +0 -0
  287. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/outputs/test_chat_generation.py +0 -0
  288. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/outputs/test_imports.py +0 -0
  289. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompt_file.txt +0 -0
  290. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/__init__.py +0 -0
  291. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/__snapshots__/test_chat.ambr +0 -0
  292. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/__snapshots__/test_prompt.ambr +0 -0
  293. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/prompt_extra_args.json +0 -0
  294. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/prompt_missing_args.json +0 -0
  295. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/simple_prompt.json +0 -0
  296. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_chat.py +0 -0
  297. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_dict.py +0 -0
  298. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_few_shot.py +0 -0
  299. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_few_shot_with_templates.py +0 -0
  300. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_image.py +0 -0
  301. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_imports.py +0 -0
  302. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_loading.py +0 -0
  303. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_pipeline_prompt.py +0 -0
  304. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_prompt.py +0 -0
  305. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_structured.py +0 -0
  306. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/prompts/test_utils.py +0 -0
  307. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/pydantic_utils.py +0 -0
  308. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/rate_limiters/__init__.py +0 -0
  309. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/rate_limiters/test_in_memory_rate_limiter.py +0 -0
  310. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/__init__.py +0 -0
  311. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr +0 -0
  312. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/__snapshots__/test_graph.ambr +0 -0
  313. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr +0 -0
  314. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_concurrency.py +0 -0
  315. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_config.py +0 -0
  316. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_configurable.py +0 -0
  317. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_fallbacks.py +0 -0
  318. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_graph.py +0 -0
  319. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_history.py +0 -0
  320. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_imports.py +0 -0
  321. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_runnable.py +0 -0
  322. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_runnable_events_v1.py +0 -0
  323. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_runnable_events_v2.py +0 -0
  324. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_tracing_interops.py +0 -0
  325. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/runnables/test_utils.py +0 -0
  326. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/stores/__init__.py +0 -0
  327. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/stores/test_in_memory.py +0 -0
  328. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/stubs.py +0 -0
  329. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_globals.py +0 -0
  330. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_imports.py +0 -0
  331. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_messages.py +0 -0
  332. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_outputs.py +0 -0
  333. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_prompt_values.py +0 -0
  334. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_pydantic_imports.py +0 -0
  335. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_pydantic_serde.py +0 -0
  336. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_retrievers.py +0 -0
  337. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_setup.py +0 -0
  338. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_sys_info.py +0 -0
  339. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/test_tools.py +0 -0
  340. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/tracers/__init__.py +0 -0
  341. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/tracers/test_async_base_tracer.py +0 -0
  342. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/tracers/test_base_tracer.py +0 -0
  343. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/tracers/test_imports.py +0 -0
  344. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/tracers/test_langchain.py +0 -0
  345. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/tracers/test_memory_stream.py +0 -0
  346. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/tracers/test_run_collector.py +0 -0
  347. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/tracers/test_schemas.py +0 -0
  348. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/__init__.py +0 -0
  349. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_aiter.py +0 -0
  350. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_env.py +0 -0
  351. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_function_calling.py +0 -0
  352. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_html.py +0 -0
  353. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_imports.py +0 -0
  354. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_iter.py +0 -0
  355. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_json_schema.py +0 -0
  356. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_pydantic.py +0 -0
  357. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_rm_titles.py +0 -0
  358. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_strings.py +0 -0
  359. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_usage.py +0 -0
  360. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/utils/test_utils.py +0 -0
  361. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/vectorstores/__init__.py +0 -0
  362. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/vectorstores/test_in_memory.py +0 -0
  363. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/tests/unit_tests/vectorstores/test_utils.py +0 -0
  364. {langchain_core-1.0.0a5 → langchain_core-1.0.0a6}/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.0a5
3
+ Version: 1.0.0a6
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
@@ -45,16 +45,6 @@ The LangChain ecosystem is built on top of `langchain-core`. Some of the benefit
45
45
  - **Stability**: We are committed to a stable versioning scheme, and will communicate any breaking changes with advance notice and version bumps.
46
46
  - **Battle-tested**: Core components have the largest install base in the LLM ecosystem, and are used in production by many companies.
47
47
 
48
- ## 1️⃣ Core Interface: Runnables
49
-
50
- The concept of a `Runnable` is central to LangChain Core – it is the interface that most LangChain Core components implement, giving them
51
-
52
- - A common invocation interface (`invoke()`, `batch()`, `stream()`, etc.)
53
- - Built-in utilities for retries, fallbacks, schemas and runtime configurability
54
- - Easy deployment with [LangGraph](https://github.com/langchain-ai/langgraph)
55
-
56
- For more check out the [`Runnable` docs](https://python.langchain.com/docs/concepts/runnables/). Examples of components that implement the interface include: Chat Models, Tools, Retrievers, and Output Parsers.
57
-
58
48
  ## 📕 Releases & Versioning
59
49
 
60
50
  As `langchain-core` contains the base abstractions and runtime for the whole LangChain ecosystem, we will communicate any breaking changes with advance notice and version bumps. The exception for this is anything in `langchain_core.beta`. The reason for `langchain_core.beta` is that given the rate of change of the field, being able to move quickly is still a priority, and this module is our attempt to do so.
@@ -27,16 +27,6 @@ The LangChain ecosystem is built on top of `langchain-core`. Some of the benefit
27
27
  - **Stability**: We are committed to a stable versioning scheme, and will communicate any breaking changes with advance notice and version bumps.
28
28
  - **Battle-tested**: Core components have the largest install base in the LLM ecosystem, and are used in production by many companies.
29
29
 
30
- ## 1️⃣ Core Interface: Runnables
31
-
32
- The concept of a `Runnable` is central to LangChain Core – it is the interface that most LangChain Core components implement, giving them
33
-
34
- - A common invocation interface (`invoke()`, `batch()`, `stream()`, etc.)
35
- - Built-in utilities for retries, fallbacks, schemas and runtime configurability
36
- - Easy deployment with [LangGraph](https://github.com/langchain-ai/langgraph)
37
-
38
- For more check out the [`Runnable` docs](https://python.langchain.com/docs/concepts/runnables/). Examples of components that implement the interface include: Chat Models, Tools, Retrievers, and Output Parsers.
39
-
40
30
  ## 📕 Releases & Versioning
41
31
 
42
32
  As `langchain-core` contains the base abstractions and runtime for the whole LangChain ecosystem, we will communicate any breaking changes with advance notice and version bumps. The exception for this is anything in `langchain_core.beta`. The reason for `langchain_core.beta` is that given the rate of change of the field, being able to move quickly is still a priority, and this module is our attempt to do so.
@@ -208,6 +208,9 @@ class BaseMessage(Serializable):
208
208
  from langchain_core.messages.block_translators.bedrock_converse import ( # noqa: PLC0415
209
209
  _convert_to_v1_from_converse_input,
210
210
  )
211
+ from langchain_core.messages.block_translators.google_genai import ( # noqa: PLC0415
212
+ _convert_to_v1_from_genai_input,
213
+ )
211
214
  from langchain_core.messages.block_translators.langchain_v0 import ( # noqa: PLC0415
212
215
  _convert_v0_multimodal_input_to_v1,
213
216
  )
@@ -243,11 +246,12 @@ class BaseMessage(Serializable):
243
246
  blocks.append(cast("types.ContentBlock", item))
244
247
 
245
248
  # Subsequent passes: attempt to unpack non-standard blocks.
246
- # The block is left as non-standard if conversion fails.
249
+ # This is the last stop - if we can't parse it here, it is left as non-standard
247
250
  for parsing_step in [
248
251
  _convert_v0_multimodal_input_to_v1,
249
252
  _convert_to_v1_from_chat_completions_input,
250
253
  _convert_to_v1_from_anthropic_input,
254
+ _convert_to_v1_from_genai_input,
251
255
  _convert_to_v1_from_converse_input,
252
256
  ]:
253
257
  blocks = parsing_step(blocks)
@@ -20,6 +20,18 @@ if TYPE_CHECKING:
20
20
 
21
21
  # Provider to translator mapping
22
22
  PROVIDER_TRANSLATORS: dict[str, dict[str, Callable[..., list[types.ContentBlock]]]] = {}
23
+ """Map model provider names to translator functions.
24
+
25
+ The dictionary maps provider names (e.g. ``'openai'``, ``'anthropic'``) to another
26
+ dictionary with two keys:
27
+ - ``'translate_content'``: Function to translate ``AIMessage`` content.
28
+ - ``'translate_content_chunk'``: Function to translate ``AIMessageChunk`` content.
29
+
30
+ When calling `.content_blocks` on an ``AIMessage`` or ``AIMessageChunk``, if
31
+ ``model_provider`` is set in ``response_metadata``, the corresponding translator
32
+ functions will be used to parse the content into blocks. Otherwise, best-effort parsing
33
+ in ``BaseMessage`` will be used.
34
+ """
23
35
 
24
36
 
25
37
  def register_translator(
@@ -27,7 +39,7 @@ def register_translator(
27
39
  translate_content: Callable[[AIMessage], list[types.ContentBlock]],
28
40
  translate_content_chunk: Callable[[AIMessageChunk], list[types.ContentBlock]],
29
41
  ) -> None:
30
- """Register content translators for a provider.
42
+ """Register content translators for a provider in `PROVIDER_TRANSLATORS`.
31
43
 
32
44
  Args:
33
45
  provider: The model provider name (e.g. ``'openai'``, ``'anthropic'``).
@@ -50,7 +62,8 @@ def get_translator(
50
62
 
51
63
  Returns:
52
64
  Dictionary with ``'translate_content'`` and ``'translate_content_chunk'``
53
- functions, or None if no translator is registered for the provider.
65
+ functions, or None if no translator is registered for the provider. In such
66
+ case, best-effort parsing in ``BaseMessage`` will be used.
54
67
  """
55
68
  return PROVIDER_TRANSLATORS.get(provider)
56
69
 
@@ -0,0 +1,529 @@
1
+ """Derivations of standard content blocks from Google (GenAI) content."""
2
+
3
+ import base64
4
+ import re
5
+ from collections.abc import Iterable
6
+ from typing import Any, cast
7
+
8
+ from langchain_core.messages import AIMessage, AIMessageChunk
9
+ from langchain_core.messages import content as types
10
+ from langchain_core.messages.content import Citation, create_citation
11
+
12
+
13
+ def _bytes_to_b64_str(bytes_: bytes) -> str:
14
+ """Convert bytes to base64 encoded string."""
15
+ return base64.b64encode(bytes_).decode("utf-8")
16
+
17
+
18
+ def translate_grounding_metadata_to_citations(
19
+ grounding_metadata: dict[str, Any],
20
+ ) -> list[Citation]:
21
+ """Translate Google AI grounding metadata to LangChain Citations.
22
+
23
+ Args:
24
+ grounding_metadata: Google AI grounding metadata containing web search
25
+ queries, grounding chunks, and grounding supports.
26
+
27
+ Returns:
28
+ List of Citation content blocks derived from the grounding metadata.
29
+
30
+ Example:
31
+ >>> metadata = {
32
+ ... "web_search_queries": ["UEFA Euro 2024 winner"],
33
+ ... "grounding_chunks": [
34
+ ... {
35
+ ... "web": {
36
+ ... "uri": "https://uefa.com/euro2024",
37
+ ... "title": "UEFA Euro 2024 Results",
38
+ ... }
39
+ ... }
40
+ ... ],
41
+ ... "grounding_supports": [
42
+ ... {
43
+ ... "segment": {
44
+ ... "start_index": 0,
45
+ ... "end_index": 47,
46
+ ... "text": "Spain won the UEFA Euro 2024 championship",
47
+ ... },
48
+ ... "grounding_chunk_indices": [0],
49
+ ... }
50
+ ... ],
51
+ ... }
52
+ >>> citations = translate_grounding_metadata_to_citations(metadata)
53
+ >>> len(citations)
54
+ 1
55
+ >>> citations[0]["url"]
56
+ 'https://uefa.com/euro2024'
57
+ """
58
+ if not grounding_metadata:
59
+ return []
60
+
61
+ grounding_chunks = grounding_metadata.get("grounding_chunks", [])
62
+ grounding_supports = grounding_metadata.get("grounding_supports", [])
63
+ web_search_queries = grounding_metadata.get("web_search_queries", [])
64
+
65
+ citations: list[Citation] = []
66
+
67
+ for support in grounding_supports:
68
+ segment = support.get("segment", {})
69
+ chunk_indices = support.get("grounding_chunk_indices", [])
70
+
71
+ start_index = segment.get("start_index")
72
+ end_index = segment.get("end_index")
73
+ cited_text = segment.get("text")
74
+
75
+ # Create a citation for each referenced chunk
76
+ for chunk_index in chunk_indices:
77
+ if chunk_index < len(grounding_chunks):
78
+ chunk = grounding_chunks[chunk_index]
79
+ web_info = chunk.get("web", {})
80
+
81
+ citation = create_citation(
82
+ url=web_info.get("uri"),
83
+ title=web_info.get("title"),
84
+ start_index=start_index,
85
+ end_index=end_index,
86
+ cited_text=cited_text,
87
+ extras={
88
+ "google_ai_metadata": {
89
+ "web_search_queries": web_search_queries,
90
+ "grounding_chunk_index": chunk_index,
91
+ "confidence_scores": support.get("confidence_scores", []),
92
+ }
93
+ },
94
+ )
95
+ citations.append(citation)
96
+
97
+ return citations
98
+
99
+
100
+ def _convert_to_v1_from_genai_input(
101
+ content: list[types.ContentBlock],
102
+ ) -> list[types.ContentBlock]:
103
+ """Convert Google GenAI format blocks to v1 format.
104
+
105
+ Called when message isn't an `AIMessage` or `model_provider` isn't set on
106
+ `response_metadata`.
107
+
108
+ During the `.content_blocks` parsing process, we wrap blocks not recognized as a v1
109
+ block as a ``'non_standard'`` block with the original block stored in the ``value``
110
+ field. This function attempts to unpack those blocks and convert any blocks that
111
+ might be GenAI format to v1 ContentBlocks.
112
+
113
+ If conversion fails, the block is left as a ``'non_standard'`` block.
114
+
115
+ Args:
116
+ content: List of content blocks to process.
117
+
118
+ Returns:
119
+ Updated list with GenAI blocks converted to v1 format.
120
+ """
121
+
122
+ def _iter_blocks() -> Iterable[types.ContentBlock]:
123
+ blocks: list[dict[str, Any]] = [
124
+ cast("dict[str, Any]", block)
125
+ if block.get("type") != "non_standard"
126
+ else block["value"] # type: ignore[typeddict-item] # this is only non-standard blocks
127
+ for block in content
128
+ ]
129
+ for block in blocks:
130
+ num_keys = len(block)
131
+ block_type = block.get("type")
132
+
133
+ if num_keys == 1 and (text := block.get("text")):
134
+ # This is probably a TextContentBlock
135
+ yield {"type": "text", "text": text}
136
+
137
+ elif (
138
+ num_keys == 1
139
+ and (document := block.get("document"))
140
+ and isinstance(document, dict)
141
+ and "format" in document
142
+ ):
143
+ # Handle document format conversion
144
+ doc_format = document.get("format")
145
+ source = document.get("source", {})
146
+
147
+ if doc_format == "pdf" and "bytes" in source:
148
+ # PDF document with byte data
149
+ file_block: types.FileContentBlock = {
150
+ "type": "file",
151
+ "base64": source["bytes"]
152
+ if isinstance(source["bytes"], str)
153
+ else _bytes_to_b64_str(source["bytes"]),
154
+ "mime_type": "application/pdf",
155
+ }
156
+ # Preserve extra fields
157
+ extras = {
158
+ key: value
159
+ for key, value in document.items()
160
+ if key not in {"format", "source"}
161
+ }
162
+ if extras:
163
+ file_block["extras"] = extras
164
+ yield file_block
165
+
166
+ elif doc_format == "txt" and "text" in source:
167
+ # Text document
168
+ plain_text_block: types.PlainTextContentBlock = {
169
+ "type": "text-plain",
170
+ "text": source["text"],
171
+ "mime_type": "text/plain",
172
+ }
173
+ # Preserve extra fields
174
+ extras = {
175
+ key: value
176
+ for key, value in document.items()
177
+ if key not in {"format", "source"}
178
+ }
179
+ if extras:
180
+ plain_text_block["extras"] = extras
181
+ yield plain_text_block
182
+
183
+ else:
184
+ # Unknown document format
185
+ yield {"type": "non_standard", "value": block}
186
+
187
+ elif (
188
+ num_keys == 1
189
+ and (image := block.get("image"))
190
+ and isinstance(image, dict)
191
+ and "format" in image
192
+ ):
193
+ # Handle image format conversion
194
+ img_format = image.get("format")
195
+ source = image.get("source", {})
196
+
197
+ if "bytes" in source:
198
+ # Image with byte data
199
+ image_block: types.ImageContentBlock = {
200
+ "type": "image",
201
+ "base64": source["bytes"]
202
+ if isinstance(source["bytes"], str)
203
+ else _bytes_to_b64_str(source["bytes"]),
204
+ "mime_type": f"image/{img_format}",
205
+ }
206
+ # Preserve extra fields
207
+ extras = {}
208
+ for key, value in image.items():
209
+ if key not in {"format", "source"}:
210
+ extras[key] = value
211
+ if extras:
212
+ image_block["extras"] = extras
213
+ yield image_block
214
+
215
+ else:
216
+ # Image without byte data
217
+ yield {"type": "non_standard", "value": block}
218
+
219
+ elif block_type == "file_data" and "file_uri" in block:
220
+ # Handle FileData URI-based content
221
+ uri_file_block: types.FileContentBlock = {
222
+ "type": "file",
223
+ "url": block["file_uri"],
224
+ }
225
+ if mime_type := block.get("mime_type"):
226
+ uri_file_block["mime_type"] = mime_type
227
+ yield uri_file_block
228
+
229
+ elif block_type == "function_call" and "name" in block:
230
+ # Handle function calls
231
+ tool_call_block: types.ToolCall = {
232
+ "type": "tool_call",
233
+ "name": block["name"],
234
+ "args": block.get("args", {}),
235
+ "id": block.get("id", ""),
236
+ }
237
+ yield tool_call_block
238
+
239
+ elif block_type == "executable_code":
240
+ server_tool_call_input: types.ServerToolCall = {
241
+ "type": "server_tool_call",
242
+ "name": "code_interpreter",
243
+ "args": {
244
+ "code": block.get("executable_code", ""),
245
+ "language": block.get("language", "python"),
246
+ },
247
+ "id": block.get("id", ""),
248
+ }
249
+ yield server_tool_call_input
250
+
251
+ elif block_type == "code_execution_result":
252
+ outcome = block.get("outcome", 1)
253
+ status = "success" if outcome == 1 else "error"
254
+ server_tool_result_input: types.ServerToolResult = {
255
+ "type": "server_tool_result",
256
+ "tool_call_id": block.get("tool_call_id", ""),
257
+ "status": status, # type: ignore[typeddict-item]
258
+ "output": block.get("code_execution_result", ""),
259
+ }
260
+ if outcome is not None:
261
+ server_tool_result_input["extras"] = {"outcome": outcome}
262
+ yield server_tool_result_input
263
+
264
+ elif block.get("type") in types.KNOWN_BLOCK_TYPES:
265
+ # We see a standard block type, so we just cast it, even if
266
+ # we don't fully understand it. This may be dangerous, but
267
+ # it's better than losing information.
268
+ yield cast("types.ContentBlock", block)
269
+
270
+ else:
271
+ # We don't understand this block at all.
272
+ yield {"type": "non_standard", "value": block}
273
+
274
+ return list(_iter_blocks())
275
+
276
+
277
+ def _convert_to_v1_from_genai(message: AIMessage) -> list[types.ContentBlock]:
278
+ """Convert Google GenAI message content to v1 format.
279
+
280
+ Calling `.content_blocks` on an `AIMessage` where `response_metadata.model_provider`
281
+ is set to `'google_genai'` will invoke this function to parse the content into
282
+ standard content blocks for returning.
283
+
284
+ Args:
285
+ message: The AIMessage or AIMessageChunk to convert.
286
+
287
+ Returns:
288
+ List of standard content blocks derived from the message content.
289
+ """
290
+ if isinstance(message.content, str):
291
+ # String content -> TextContentBlock (only add if non-empty in case of audio)
292
+ string_blocks: list[types.ContentBlock] = []
293
+ if message.content:
294
+ string_blocks.append({"type": "text", "text": message.content})
295
+
296
+ # Add any missing tool calls from message.tool_calls field
297
+ content_tool_call_ids = {
298
+ block.get("id")
299
+ for block in string_blocks
300
+ if isinstance(block, dict) and block.get("type") == "tool_call"
301
+ }
302
+ for tool_call in message.tool_calls:
303
+ id_ = tool_call.get("id")
304
+ if id_ and id_ not in content_tool_call_ids:
305
+ string_tool_call_block: types.ToolCall = {
306
+ "type": "tool_call",
307
+ "id": id_,
308
+ "name": tool_call["name"],
309
+ "args": tool_call["args"],
310
+ }
311
+ string_blocks.append(string_tool_call_block)
312
+
313
+ # Handle audio from additional_kwargs if present (for empty content cases)
314
+ audio_data = message.additional_kwargs.get("audio")
315
+ if audio_data and isinstance(audio_data, bytes):
316
+ audio_block: types.AudioContentBlock = {
317
+ "type": "audio",
318
+ "base64": _bytes_to_b64_str(audio_data),
319
+ "mime_type": "audio/wav", # Default to WAV for Google GenAI
320
+ }
321
+ string_blocks.append(audio_block)
322
+
323
+ grounding_metadata = message.response_metadata.get("grounding_metadata")
324
+ if grounding_metadata:
325
+ citations = translate_grounding_metadata_to_citations(grounding_metadata)
326
+
327
+ for block in string_blocks:
328
+ if block["type"] == "text" and citations:
329
+ # Add citations to the first text block only
330
+ block["annotations"] = cast("list[types.Annotation]", citations)
331
+ break
332
+
333
+ return string_blocks
334
+
335
+ if not isinstance(message.content, list):
336
+ # Unexpected content type, attempt to represent as text
337
+ return [{"type": "text", "text": str(message.content)}]
338
+
339
+ converted_blocks: list[types.ContentBlock] = []
340
+
341
+ for item in message.content:
342
+ if isinstance(item, str):
343
+ # Conversation history strings
344
+
345
+ # Citations are handled below after all blocks are converted
346
+ converted_blocks.append({"type": "text", "text": item}) # TextContentBlock
347
+
348
+ elif isinstance(item, dict):
349
+ item_type = item.get("type")
350
+ if item_type == "image_url":
351
+ # Convert image_url to standard image block (base64)
352
+ # (since the original implementation returned as url-base64 CC style)
353
+ image_url = item.get("image_url", {})
354
+ url = image_url.get("url", "")
355
+ if url:
356
+ # Extract base64 data
357
+ match = re.match(r"data:([^;]+);base64,(.+)", url)
358
+ if match:
359
+ # Data URI provided
360
+ mime_type, base64_data = match.groups()
361
+ converted_blocks.append(
362
+ {
363
+ "type": "image",
364
+ "base64": base64_data,
365
+ "mime_type": mime_type,
366
+ }
367
+ )
368
+ else:
369
+ # Assume it's raw base64 without data URI
370
+ try:
371
+ # Validate base64 and decode for mime type detection
372
+ decoded_bytes = base64.b64decode(url, validate=True)
373
+
374
+ image_url_b64_block = {
375
+ "type": "image",
376
+ "base64": url,
377
+ }
378
+
379
+ try:
380
+ import filetype # type: ignore[import-not-found] # noqa: PLC0415
381
+
382
+ # Guess mime type based on file bytes
383
+ mime_type = None
384
+ kind = filetype.guess(decoded_bytes)
385
+ if kind:
386
+ mime_type = kind.mime
387
+ if mime_type:
388
+ image_url_b64_block["mime_type"] = mime_type
389
+ except ImportError:
390
+ # filetype library not available, skip type detection
391
+ pass
392
+
393
+ converted_blocks.append(
394
+ cast("types.ImageContentBlock", image_url_b64_block)
395
+ )
396
+ except Exception:
397
+ # Not valid base64, treat as non-standard
398
+ converted_blocks.append(
399
+ {"type": "non_standard", "value": item}
400
+ )
401
+ else:
402
+ # This likely won't be reached according to previous implementations
403
+ converted_blocks.append({"type": "non_standard", "value": item})
404
+ msg = "Image URL not a data URI; appending as non-standard block."
405
+ raise ValueError(msg)
406
+ elif item_type == "function_call":
407
+ # Handle Google GenAI function calls
408
+ function_call_block: types.ToolCall = {
409
+ "type": "tool_call",
410
+ "name": item.get("name", ""),
411
+ "args": item.get("args", {}),
412
+ "id": item.get("id", ""),
413
+ }
414
+ converted_blocks.append(function_call_block)
415
+ elif item_type == "file_data":
416
+ # Handle FileData URI-based content
417
+ file_block: types.FileContentBlock = {
418
+ "type": "file",
419
+ "url": item.get("file_uri", ""),
420
+ }
421
+ if mime_type := item.get("mime_type"):
422
+ file_block["mime_type"] = mime_type
423
+ converted_blocks.append(file_block)
424
+ elif item_type == "thinking":
425
+ # Handling for the 'thinking' type we package thoughts as
426
+ reasoning_block: types.ReasoningContentBlock = {
427
+ "type": "reasoning",
428
+ "reasoning": item.get("thinking", ""),
429
+ }
430
+ if signature := item.get("signature"):
431
+ reasoning_block["extras"] = {"signature": signature}
432
+
433
+ converted_blocks.append(reasoning_block)
434
+ elif item_type == "executable_code":
435
+ # Convert to standard server tool call block at the moment
436
+ server_tool_call_block: types.ServerToolCall = {
437
+ "type": "server_tool_call",
438
+ "name": "code_interpreter",
439
+ "args": {
440
+ "code": item.get("executable_code", ""),
441
+ "language": item.get("language", "python"), # Default to python
442
+ },
443
+ "id": item.get("id", ""),
444
+ }
445
+ converted_blocks.append(server_tool_call_block)
446
+ elif item_type == "code_execution_result":
447
+ # Map outcome to status: OUTCOME_OK (1) → success, else → error
448
+ outcome = item.get("outcome", 1)
449
+ status = "success" if outcome == 1 else "error"
450
+ server_tool_result_block: types.ServerToolResult = {
451
+ "type": "server_tool_result",
452
+ "tool_call_id": item.get("tool_call_id", ""),
453
+ "status": status, # type: ignore[typeddict-item]
454
+ "output": item.get("code_execution_result", ""),
455
+ }
456
+ # Preserve original outcome in extras
457
+ if outcome is not None:
458
+ server_tool_result_block["extras"] = {"outcome": outcome}
459
+ converted_blocks.append(server_tool_result_block)
460
+ else:
461
+ # Unknown type, preserve as non-standard
462
+ converted_blocks.append({"type": "non_standard", "value": item})
463
+ else:
464
+ # Non-dict, non-string content
465
+ converted_blocks.append({"type": "non_standard", "value": item})
466
+
467
+ grounding_metadata = message.response_metadata.get("grounding_metadata")
468
+ if grounding_metadata:
469
+ citations = translate_grounding_metadata_to_citations(grounding_metadata)
470
+
471
+ for block in converted_blocks:
472
+ if block["type"] == "text" and citations:
473
+ # Add citations to text blocks (only the first text block)
474
+ block["annotations"] = cast("list[types.Annotation]", citations)
475
+ break
476
+
477
+ # Audio is stored on the message.additional_kwargs
478
+ audio_data = message.additional_kwargs.get("audio")
479
+ if audio_data and isinstance(audio_data, bytes):
480
+ audio_block_kwargs: types.AudioContentBlock = {
481
+ "type": "audio",
482
+ "base64": _bytes_to_b64_str(audio_data),
483
+ "mime_type": "audio/wav", # Default to WAV for Google GenAI
484
+ }
485
+ converted_blocks.append(audio_block_kwargs)
486
+
487
+ # Add any missing tool calls from message.tool_calls field
488
+ content_tool_call_ids = {
489
+ block.get("id")
490
+ for block in converted_blocks
491
+ if isinstance(block, dict) and block.get("type") == "tool_call"
492
+ }
493
+ for tool_call in message.tool_calls:
494
+ id_ = tool_call.get("id")
495
+ if id_ and id_ not in content_tool_call_ids:
496
+ missing_tool_call_block: types.ToolCall = {
497
+ "type": "tool_call",
498
+ "id": id_,
499
+ "name": tool_call["name"],
500
+ "args": tool_call["args"],
501
+ }
502
+ converted_blocks.append(missing_tool_call_block)
503
+
504
+ return converted_blocks
505
+
506
+
507
+ def translate_content(message: AIMessage) -> list[types.ContentBlock]:
508
+ """Derive standard content blocks from a message with Google (GenAI) content."""
509
+ return _convert_to_v1_from_genai(message)
510
+
511
+
512
+ def translate_content_chunk(message: AIMessageChunk) -> list[types.ContentBlock]:
513
+ """Derive standard content blocks from a chunk with Google (GenAI) content."""
514
+ return _convert_to_v1_from_genai(message)
515
+
516
+
517
+ def _register_google_genai_translator() -> None:
518
+ """Register the Google (GenAI) translator with the central registry.
519
+
520
+ Run automatically when the module is imported.
521
+ """
522
+ from langchain_core.messages.block_translators import ( # noqa: PLC0415
523
+ register_translator,
524
+ )
525
+
526
+ register_translator("google_genai", translate_content, translate_content_chunk)
527
+
528
+
529
+ _register_google_genai_translator()
@@ -886,18 +886,18 @@ class Runnable(ABC, Generic[Input, Output]):
886
886
  e.g., if the underlying ``Runnable`` uses an API which supports a batch mode.
887
887
 
888
888
  Args:
889
- inputs: A list of inputs to the ``Runnable``.
890
- config: A config to use when invoking the ``Runnable``.
891
- The config supports standard keys like ``'tags'``, ``'metadata'`` for
892
- tracing purposes, ``'max_concurrency'`` for controlling how much work
893
- to do in parallel, and other keys. Please refer to the
894
- ``RunnableConfig`` for more details. Defaults to None.
895
- return_exceptions: Whether to return exceptions instead of raising them.
896
- Defaults to False.
897
- **kwargs: Additional keyword arguments to pass to the ``Runnable``.
889
+ inputs: A list of inputs to the ``Runnable``.
890
+ config: A config to use when invoking the ``Runnable``. The config supports
891
+ standard keys like ``'tags'``, ``'metadata'`` for
892
+ tracing purposes, ``'max_concurrency'`` for controlling how much work
893
+ to do in parallel, and other keys. Please refer to the
894
+ ``RunnableConfig`` for more details. Defaults to None.
895
+ return_exceptions: Whether to return exceptions instead of raising them.
896
+ Defaults to False.
897
+ **kwargs: Additional keyword arguments to pass to the ``Runnable``.
898
898
 
899
899
  Returns:
900
- A list of outputs from the ``Runnable``.
900
+ A list of outputs from the ``Runnable``.
901
901
 
902
902
  """
903
903
  if not inputs:
@@ -2536,8 +2536,6 @@ class Runnable(ABC, Generic[Input, Output]):
2536
2536
  name: The name of the tool. Defaults to None.
2537
2537
  description: The description of the tool. Defaults to None.
2538
2538
  arg_types: A dictionary of argument names to types. Defaults to None.
2539
- message_version: Version of ``ToolMessage`` to return given
2540
- :class:`~langchain_core.messages.content.ToolCall` input.
2541
2539
 
2542
2540
  Returns:
2543
2541
  A ``BaseTool`` instance.