From f1afa6dbf8598131b817b9c2abb4ec46dc215182 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Fri, 13 Sep 2024 13:32:11 -0700 Subject: [PATCH] refactor: Move langchain/core to a peer dep (#6698) Co-authored-by: Brace Sproul Co-authored-by: Erick Friis --- .github/DISCUSSION_TEMPLATE/q-a.yml | 4 +- .github/ISSUE_TEMPLATE/bug-report.yml | 4 +- .github/ISSUE_TEMPLATE/documentation.yml | 4 +- .github/workflows/validate_new_notebooks.yml | 11 + CONTRIBUTING.md | 2 +- README.md | 18 +- cookbook/rag_fusion.ipynb | 2 +- .../node/update_resolutions_latest.js | 17 + .../node/update_resolutions_lowest.js | 30 +- .../langchain/test-with-latest-deps.sh | 12 + .../langchain/test-with-lowest-deps.sh | 4 + .../node/update_resolutions_latest.js | 11 + .../node/update_resolutions_lowest.js | 16 +- .../anthropic/test-with-latest-deps.sh | 3 + .../anthropic/test-with-lowest-deps.sh | 12 +- .../cohere/node/update_resolutions_latest.js | 11 + .../cohere/node/update_resolutions_lowest.js | 16 +- .../cohere/test-with-latest-deps.sh | 19 +- .../cohere/test-with-lowest-deps.sh | 6 + .../node/update_resolutions_latest.js | 16 + .../node/update_resolutions_lowest.js | 24 +- .../community/node/update_resolutions_npm.js | 10 + .../community/npm-install.sh | 13 + .../community/test-with-latest-deps.sh | 15 + .../community/test-with-lowest-deps.sh | 6 + .../node/update_resolutions_latest.js | 11 + .../node/update_resolutions_lowest.js | 20 +- .../google-vertexai/test-with-latest-deps.sh | 19 +- .../google-vertexai/test-with-lowest-deps.sh | 10 +- .../node/update_workspace_dependencies.js | 2 +- .../openai/node/update_resolutions_latest.js | 11 + .../openai/node/update_resolutions_lowest.js | 16 +- .../openai/test-with-latest-deps.sh | 15 + .../openai/test-with-lowest-deps.sh | 6 + docs/api_refs/scripts/create-entrypoints.js | 2 +- docs/api_refs/scripts/typedoc-plugin.js | 3 +- docs/core_docs/.gitignore | 28 +- docs/core_docs/docs/concepts.mdx | 30 +- .../documentation/style_guide.mdx | 2 +- .../docs/contributing/repo_structure.mdx | 4 +- .../docs/how_to/agent_executor.ipynb | 14 +- docs/core_docs/docs/how_to/assign.ipynb | 4 +- docs/core_docs/docs/how_to/binding.ipynb | 16 +- .../docs/how_to/caching_embeddings.mdx | 2 +- ...nding.ipynb => callbacks_serverless.ipynb} | 62 +- .../docs/how_to/character_text_splitter.ipynb | 2 +- .../docs/how_to/chat_model_caching.mdx | 2 +- .../docs/how_to/chat_streaming.ipynb | 2 +- .../docs/how_to/chat_token_usage_tracking.mdx | 4 +- .../docs/how_to/chatbots_retrieval.ipynb | 17 +- .../docs/how_to/chatbots_tools.ipynb | 4 +- .../core_docs/docs/how_to/code_splitter.ipynb | 2 +- .../docs/how_to/contextual_compression.mdx | 2 +- .../how_to/convert_runnable_to_tool.ipynb | 2 +- .../docs/how_to/custom_callbacks.ipynb | 2 +- docs/core_docs/docs/how_to/custom_chat.ipynb | 6 +- docs/core_docs/docs/how_to/custom_llm.ipynb | 6 +- .../docs/how_to/custom_retriever.mdx | 2 +- docs/core_docs/docs/how_to/debugging.mdx | 2 +- .../docs/how_to/document_loader_html.ipynb | 4 +- .../how_to/document_loader_markdown.ipynb | 16 +- docs/core_docs/docs/how_to/embed_text.mdx | 2 +- .../how_to/example_selectors_langsmith.ipynb | 2 +- .../how_to/example_selectors_similarity.mdx | 2 +- .../docs/how_to/extraction_examples.ipynb | 8 +- .../docs/how_to/extraction_long_text.ipynb | 6 +- .../docs/how_to/extraction_parse.ipynb | 22 +- docs/core_docs/docs/how_to/fallbacks.mdx | 2 +- docs/core_docs/docs/how_to/few_shot.mdx | 2 +- .../docs/how_to/few_shot_examples.ipynb | 6 +- .../docs/how_to/few_shot_examples_chat.ipynb | 8 +- docs/core_docs/docs/how_to/functions.ipynb | 24 +- .../docs/how_to/graph_constructing.ipynb | 8 +- .../core_docs/docs/how_to/graph_mapping.ipynb | 30 +- .../docs/how_to/graph_prompting.ipynb | 16 +- .../docs/how_to/graph_semantic.ipynb | 8 +- docs/core_docs/docs/how_to/index.mdx | 2 +- docs/core_docs/docs/how_to/installation.mdx | 48 +- .../docs/how_to/lcel_cheatsheet.ipynb | 4 +- docs/core_docs/docs/how_to/llm_caching.mdx | 2 +- .../docs/how_to/llm_token_usage_tracking.mdx | 2 +- docs/core_docs/docs/how_to/logprobs.ipynb | 8 +- .../core_docs/docs/how_to/message_history.mdx | 2 +- docs/core_docs/docs/how_to/multi_vector.mdx | 4 +- .../docs/how_to/multimodal_prompts.ipynb | 14 +- .../docs/how_to/multiple_queries.ipynb | 2 +- .../docs/how_to/output_parser_json.ipynb | 2 +- .../docs/how_to/output_parser_xml.ipynb | 18 +- docs/core_docs/docs/how_to/parallel.mdx | 4 +- .../docs/how_to/parent_document_retriever.mdx | 4 +- docs/core_docs/docs/how_to/passthrough.ipynb | 8 +- .../docs/how_to/prompts_composition.ipynb | 4 +- .../docs/how_to/qa_chat_history_how_to.ipynb | 2 +- docs/core_docs/docs/how_to/qa_citations.ipynb | 2 +- docs/core_docs/docs/how_to/qa_per_user.ipynb | 6 +- .../how_to/query_constructing_filters.ipynb | 4 +- .../docs/how_to/query_few_shot.ipynb | 32 +- .../docs/how_to/query_high_cardinality.ipynb | 48 +- .../docs/how_to/query_multiple_queries.ipynb | 18 +- .../how_to/query_multiple_retrievers.ipynb | 26 +- .../docs/how_to/query_no_queries.ipynb | 18 +- .../docs/how_to/recursive_text_splitter.ipynb | 2 +- .../docs/how_to/reduce_retrieval_latency.mdx | 4 +- docs/core_docs/docs/how_to/routing.mdx | 2 +- docs/core_docs/docs/how_to/self_query.ipynb | 2 +- docs/core_docs/docs/how_to/sequence.ipynb | 4 +- .../docs/how_to/split_by_token.ipynb | 2 +- docs/core_docs/docs/how_to/sql_prompting.mdx | 4 +- docs/core_docs/docs/how_to/streaming_llm.mdx | 6 +- .../docs/how_to/structured_output.ipynb | 2 +- .../docs/how_to/time_weighted_vectorstore.mdx | 4 +- .../core_docs/docs/how_to/tools_builtin.ipynb | 1 - docs/core_docs/docs/how_to/tools_error.ipynb | 8 +- .../docs/how_to/vectorstore_retriever.mdx | 4 +- docs/core_docs/docs/how_to/vectorstores.mdx | 4 +- .../integrations/callbacks/datadog_tracer.mdx | 2 +- .../callbacks/upstash_ratelimit_callback.mdx | 2 +- .../docs/integrations/chat/alibaba_tongyi.mdx | 2 +- .../docs/integrations/chat/anthropic.ipynb | 2 +- .../integrations/chat/anthropic_tools.mdx | 82 - .../docs/integrations/chat/arcjet.ipynb | 2 +- .../docs/integrations/chat/azure.ipynb | 4 +- .../docs/integrations/chat/baidu_qianfan.mdx | 2 +- .../docs/integrations/chat/baidu_wenxin.mdx | 2 +- .../docs/integrations/chat/bedrock.ipynb | 6 +- .../integrations/chat/bedrock_converse.ipynb | 4 +- .../chat/cloudflare_workersai.ipynb | 2 +- .../docs/integrations/chat/cohere.ipynb | 2 +- .../docs/integrations/chat/deep_infra.mdx | 2 +- .../docs/integrations/chat/fireworks.ipynb | 2 +- .../docs/integrations/chat/friendli.mdx | 2 +- .../chat/google_generativeai.ipynb | 2 +- .../docs/integrations/chat/google_palm.mdx | 138 -- .../integrations/chat/google_vertex_ai.ipynb | 4 +- .../docs/integrations/chat/groq.ipynb | 2 +- .../docs/integrations/chat/llama_cpp.mdx | 2 +- .../docs/integrations/chat/minimax.mdx | 2 +- .../docs/integrations/chat/mistral.ipynb | 2 +- .../docs/integrations/chat/moonshot.mdx | 2 +- .../docs/integrations/chat/ollama.ipynb | 4 +- .../docs/integrations/chat/openai.ipynb | 2 +- .../docs/integrations/chat/premai.mdx | 2 +- .../integrations/chat/tencent_hunyuan.mdx | 2 +- .../docs/integrations/chat/togetherai.ipynb | 2 +- .../docs/integrations/chat/web_llm.mdx | 2 +- .../docs/integrations/chat/yandex.mdx | 2 +- .../docs/integrations/chat/zhipuai.mdx | 2 +- .../document_compressors/cohere_rerank.mdx | 2 +- .../document_loaders/file_loaders/csv.ipynb | 2 +- .../file_loaders/directory.ipynb | 2 +- .../document_loaders/file_loaders/docx.mdx | 2 +- .../document_loaders/file_loaders/epub.mdx | 2 +- .../document_loaders/file_loaders/pdf.ipynb | 2 +- .../file_loaders/unstructured.ipynb | 4 +- .../web_loaders/apify_dataset.mdx | 2 +- .../assemblyai_audio_transcription.mdx | 2 +- .../azure_blob_storage_container.mdx | 2 +- .../web_loaders/azure_blob_storage_file.mdx | 2 +- .../web_loaders/browserbase.mdx | 2 +- .../web_loaders/college_confidential.mdx | 2 +- .../web_loaders/confluence.mdx | 2 +- .../web_loaders/couchbase.mdx | 2 +- .../web_loaders/firecrawl.ipynb | 2 +- .../document_loaders/web_loaders/gitbook.mdx | 2 +- .../document_loaders/web_loaders/github.mdx | 2 +- .../document_loaders/web_loaders/hn.mdx | 2 +- .../document_loaders/web_loaders/imsdb.mdx | 2 +- .../web_loaders/notionapi.mdx | 2 +- .../document_loaders/web_loaders/pdf.ipynb | 2 +- .../web_loaders/recursive_url_loader.ipynb | 2 +- .../document_loaders/web_loaders/s3.mdx | 2 +- .../web_loaders/searchapi.mdx | 2 +- .../document_loaders/web_loaders/serpapi.mdx | 2 +- .../document_loaders/web_loaders/sitemap.mdx | 4 +- .../web_loaders/sonix_audio_transcription.mdx | 2 +- .../web_loaders/sort_xyz_blockchain.mdx | 2 +- .../document_loaders/web_loaders/spider.mdx | 2 +- .../web_loaders/web_cheerio.ipynb | 2 +- .../web_loaders/web_playwright.mdx | 2 +- .../web_loaders/web_puppeteer.ipynb | 2 +- .../document_loaders/web_loaders/youtube.mdx | 2 +- .../document_transformers/html-to-text.mdx | 2 +- .../mozilla_readability.mdx | 2 +- .../openai_metadata_tagger.mdx | 2 +- .../core_docs/docs/integrations/llms/ai21.mdx | 2 +- .../docs/integrations/llms/aleph_alpha.mdx | 2 +- .../docs/integrations/llms/arcjet.ipynb | 2 +- .../docs/integrations/llms/aws_sagemaker.mdx | 2 +- .../docs/integrations/llms/azure.ipynb | 2 +- .../docs/integrations/llms/bedrock.ipynb | 2 +- .../llms/cloudflare_workersai.ipynb | 2 +- .../docs/integrations/llms/cohere.ipynb | 2 +- .../docs/integrations/llms/deep_infra.mdx | 2 +- .../docs/integrations/llms/fireworks.ipynb | 2 +- .../docs/integrations/llms/friendli.mdx | 2 +- .../docs/integrations/llms/google_palm.mdx | 137 -- .../integrations/llms/google_vertex_ai.ipynb | 4 +- .../docs/integrations/llms/gradient_ai.mdx | 2 +- .../llms/huggingface_inference.mdx | 2 +- .../integrations/llms/layerup_security.mdx | 2 +- .../docs/integrations/llms/llama_cpp.mdx | 2 +- .../docs/integrations/llms/mistral.ipynb | 2 +- .../docs/integrations/llms/ollama.ipynb | 2 +- .../docs/integrations/llms/openai.ipynb | 2 +- .../docs/integrations/llms/raycast.mdx | 2 +- .../docs/integrations/llms/replicate.mdx | 2 +- .../docs/integrations/llms/together.ipynb | 4 +- .../docs/integrations/llms/watsonx_ai.mdx | 2 +- .../docs/integrations/llms/writer.mdx | 2 +- .../docs/integrations/llms/yandex.mdx | 2 +- .../docs/integrations/memory/astradb.mdx | 2 +- .../docs/integrations/memory/cassandra.mdx | 2 +- .../integrations/memory/cloudflare_d1.mdx | 2 +- .../docs/integrations/memory/convex.mdx | 2 +- .../docs/integrations/memory/dynamodb.mdx | 2 +- .../docs/integrations/memory/firestore.mdx | 2 +- .../integrations/memory/ipfs_datastore.mdx | 2 +- .../docs/integrations/memory/momento.mdx | 2 +- .../docs/integrations/memory/mongodb.mdx | 2 +- .../integrations/memory/motorhead_memory.mdx | 2 +- .../docs/integrations/memory/planetscale.mdx | 2 +- .../docs/integrations/memory/postgres.mdx | 2 +- .../docs/integrations/memory/redis.mdx | 2 +- .../integrations/memory/upstash_redis.mdx | 2 +- .../docs/integrations/memory/xata.mdx | 2 +- .../docs/integrations/memory/zep_memory.mdx | 2 +- .../integrations/memory/zep_memory_cloud.mdx | 2 +- .../docs/integrations/platforms/anthropic.mdx | 2 +- .../docs/integrations/platforms/google.mdx | 10 +- .../docs/integrations/platforms/microsoft.mdx | 12 +- .../docs/integrations/platforms/openai.mdx | 2 +- .../retrievers/bedrock-knowledge-bases.ipynb | 4 +- .../retrievers/chaindesk-retriever.mdx | 2 +- .../docs/integrations/retrievers/dria.mdx | 2 +- .../docs/integrations/retrievers/exa.ipynb | 4 +- .../docs/integrations/retrievers/hyde.mdx | 2 +- .../retrievers/kendra-retriever.ipynb | 4 +- .../retrievers/metal-retriever.mdx | 2 +- .../retrievers/self_query/chroma.ipynb | 6 +- .../retrievers/self_query/hnswlib.ipynb | 4 +- .../retrievers/self_query/memory.ipynb | 4 +- .../retrievers/self_query/pinecone.ipynb | 6 +- .../retrievers/self_query/qdrant.ipynb | 6 +- .../retrievers/self_query/supabase.ipynb | 6 +- .../retrievers/self_query/vectara.ipynb | 6 +- .../retrievers/self_query/weaviate.ipynb | 6 +- .../retrievers/supabase-hybrid.mdx | 2 +- .../docs/integrations/retrievers/tavily.ipynb | 4 +- .../retrievers/time-weighted-retriever.mdx | 2 +- .../retrievers/zep-cloud-retriever.mdx | 2 +- .../integrations/retrievers/zep-retriever.mdx | 2 +- .../integrations/stores/cassandra_storage.mdx | 2 +- .../integrations/stores/file_system.ipynb | 4 +- .../docs/integrations/stores/in_memory.ipynb | 2 +- .../integrations/stores/ioredis_storage.mdx | 2 +- .../stores/upstash_redis_storage.mdx | 2 +- .../integrations/stores/vercel_kv_storage.mdx | 2 +- .../text_embedding/alibaba_tongyi.mdx | 2 +- .../text_embedding/azure_openai.ipynb | 2 +- .../text_embedding/baidu_qianfan.mdx | 2 +- .../integrations/text_embedding/bedrock.ipynb | 2 +- .../text_embedding/cloudflare_ai.ipynb | 2 +- .../integrations/text_embedding/cohere.ipynb | 2 +- .../integrations/text_embedding/deepinfra.mdx | 2 +- .../text_embedding/fireworks.ipynb | 2 +- .../text_embedding/google_generativeai.ipynb | 4 +- .../text_embedding/google_palm.mdx | 40 - .../text_embedding/google_vertex_ai.ipynb | 4 +- .../text_embedding/gradient_ai.mdx | 2 +- .../text_embedding/hugging_face_inference.mdx | 2 +- .../docs/integrations/text_embedding/jina.mdx | 2 +- .../integrations/text_embedding/llama_cpp.mdx | 2 +- .../text_embedding/mistralai.ipynb | 2 +- .../text_embedding/mixedbread_ai.mdx | 2 +- .../integrations/text_embedding/nomic.mdx | 2 +- .../integrations/text_embedding/ollama.ipynb | 2 +- .../integrations/text_embedding/openai.ipynb | 2 +- .../integrations/text_embedding/premai.mdx | 2 +- .../text_embedding/tencent_hunyuan.mdx | 2 +- .../text_embedding/tensorflow.mdx | 2 +- .../text_embedding/togetherai.ipynb | 2 +- .../text_embedding/transformers.mdx | 2 +- .../integrations/text_embedding/zhipuai.mdx | 2 +- .../docs/integrations/toolkits/connery.mdx | 2 +- .../docs/integrations/toolkits/json.mdx | 2 +- .../docs/integrations/toolkits/openapi.ipynb | 6 +- .../docs/integrations/toolkits/sfn_agent.mdx | 2 +- .../docs/integrations/toolkits/sql.ipynb | 2 +- .../integrations/toolkits/vectorstore.ipynb | 2 +- .../docs/integrations/tools/aiplugin-tool.mdx | 2 +- .../tools/azure_dynamic_sessions.mdx | 2 +- .../docs/integrations/tools/connery.mdx | 2 +- .../docs/integrations/tools/dalle.mdx | 2 +- .../docs/integrations/tools/discord.mdx | 2 +- .../tools/duckduckgo_search.ipynb | 2 +- .../docs/integrations/tools/exa_search.ipynb | 2 +- .../docs/integrations/tools/gmail.mdx | 2 +- .../integrations/tools/google_calendar.mdx | 2 +- .../docs/integrations/tools/google_places.mdx | 2 +- .../docs/integrations/tools/google_routes.mdx | 2 +- .../docs/integrations/tools/lambda_agent.mdx | 2 +- .../docs/integrations/tools/pyinterpreter.mdx | 2 +- .../docs/integrations/tools/searchapi.mdx | 2 +- .../docs/integrations/tools/searxng.mdx | 2 +- .../integrations/tools/tavily_search.ipynb | 4 +- .../docs/integrations/tools/webbrowser.mdx | 2 +- .../docs/integrations/tools/zapier_agent.mdx | 2 +- .../integrations/vectorstores/analyticdb.mdx | 2 +- .../integrations/vectorstores/astradb.mdx | 2 +- .../vectorstores/azure_aisearch.mdx | 2 +- .../vectorstores/azure_cosmosdb_mongodb.mdx | 2 +- .../vectorstores/azure_cosmosdb_nosql.mdx | 2 +- .../integrations/vectorstores/cassandra.mdx | 2 +- .../integrations/vectorstores/chroma.ipynb | 4 +- .../integrations/vectorstores/clickhouse.mdx | 2 +- .../integrations/vectorstores/closevector.mdx | 2 +- .../vectorstores/cloudflare_vectorize.mdx | 2 +- .../docs/integrations/vectorstores/convex.mdx | 2 +- .../integrations/vectorstores/couchbase.mdx | 2 +- .../vectorstores/elasticsearch.ipynb | 4 +- .../integrations/vectorstores/faiss.ipynb | 2 +- .../vectorstores/googlevertexai.mdx | 2 +- .../integrations/vectorstores/hanavector.mdx | 4 +- .../integrations/vectorstores/hnswlib.ipynb | 2 +- .../integrations/vectorstores/lancedb.mdx | 2 +- .../integrations/vectorstores/memory.ipynb | 2 +- .../docs/integrations/vectorstores/milvus.mdx | 2 +- .../vectorstores/momento_vector_index.mdx | 2 +- .../vectorstores/mongodb_atlas.ipynb | 4 +- .../integrations/vectorstores/myscale.mdx | 2 +- .../integrations/vectorstores/neo4jvector.mdx | 2 +- .../docs/integrations/vectorstores/neon.mdx | 2 +- .../integrations/vectorstores/opensearch.mdx | 2 +- .../integrations/vectorstores/pgvector.ipynb | 4 +- .../integrations/vectorstores/pinecone.ipynb | 4 +- .../docs/integrations/vectorstores/prisma.mdx | 2 +- .../integrations/vectorstores/qdrant.ipynb | 4 +- .../integrations/vectorstores/redis.ipynb | 4 +- .../integrations/vectorstores/rockset.mdx | 2 +- .../integrations/vectorstores/singlestore.mdx | 2 +- .../integrations/vectorstores/supabase.ipynb | 4 +- .../integrations/vectorstores/typeorm.mdx | 2 +- .../integrations/vectorstores/typesense.mdx | 2 +- .../integrations/vectorstores/upstash.ipynb | 4 +- .../integrations/vectorstores/usearch.mdx | 2 +- .../vectorstores/vercel_postgres.mdx | 2 +- .../docs/integrations/vectorstores/voy.mdx | 2 +- .../integrations/vectorstores/weaviate.ipynb | 4 +- .../docs/integrations/vectorstores/xata.mdx | 2 +- .../docs/integrations/vectorstores/zep.mdx | 2 +- .../integrations/vectorstores/zep_cloud.mdx | 2 +- docs/core_docs/docs/introduction.mdx | 6 +- .../integration_install_tooltip.mdx | 2 +- docs/core_docs/docs/tutorials/agents.mdx | 499 ------ docs/core_docs/docs/tutorials/chatbot.ipynb | 6 +- .../core_docs/docs/tutorials/extraction.ipynb | 46 +- docs/core_docs/docs/tutorials/graph.ipynb | 8 +- docs/core_docs/docs/tutorials/index.mdx | 4 +- docs/core_docs/docs/tutorials/llm_chain.ipynb | 42 +- .../docs/tutorials/qa_chat_history.ipynb | 2 +- .../docs/tutorials/query_analysis.ipynb | 12 +- docs/core_docs/docs/tutorials/rag.ipynb | 366 ++--- docs/core_docs/docs/tutorials/sql_qa.mdx | 10 +- .../docs/tutorials/summarization.mdx | 2 +- docs/core_docs/docusaurus.config.js | 10 +- docs/core_docs/package.json | 2 +- docs/core_docs/scripts/code-block-loader.js | 2 +- docs/core_docs/src/theme/ChatModelTabs.js | 2 +- docs/core_docs/vercel.json | 60 +- .../test-exports-bun/src/entrypoints.js | 9 - .../test-exports-cf/src/entrypoints.js | 9 - .../test-exports-cjs/src/entrypoints.js | 9 - .../test-exports-esbuild/src/entrypoints.js | 9 - .../test-exports-esm/src/entrypoints.js | 9 - .../test-exports-vercel/package.json | 3 - .../test-exports-vercel/src/entrypoints.js | 9 - .../test-exports-vite/package.json | 3 - .../test-exports-vite/src/entrypoints.js | 9 - examples/src/chains/map_reduce_lcel.ts | 8 +- .../document_loaders/example_data/notion.md | 2 +- examples/src/document_loaders/notiondb.ts | 10 - examples/src/guides/fallbacks/better_model.ts | 4 +- examples/src/guides/fallbacks/chain.ts | 4 +- examples/src/guides/fallbacks/long_inputs.ts | 4 +- examples/src/guides/fallbacks/model.ts | 4 +- .../llms/googlevertexai-code-bison_legacy.ts | 23 - .../llms/googlevertexai-code-gecko_legacy.ts | 20 - .../llms/googlevertexai-streaming_legacy.ts | 44 - examples/src/llms/googlevertexai_legacy.ts | 23 - .../src/models/chat/integration_googlepalm.ts | 35 - ...egration_googlevertexai-examples_legacy.ts | 29 - ...gration_googlevertexai-streaming_legacy.ts | 31 - .../chat/integration_googlevertexai_legacy.ts | 7 - examples/src/models/embeddings/googlepalm.ts | 14 - .../src/models/embeddings/googlevertexai.ts | 9 - examples/src/models/llm/googlepalm.ts | 25 - examples/src/tools/pyinterpreter.ts | 4 +- langchain-core/README.md | 15 +- langchain-core/package.json | 2 +- langchain-core/src/callbacks/base.ts | 2 +- langchain-core/src/callbacks/dispatch/web.ts | 2 +- langchain-core/src/callbacks/manager.ts | 18 +- langchain-core/src/language_models/base.ts | 9 - .../src/language_models/chat_models.ts | 4 +- langchain-core/src/messages/base.ts | 65 +- .../openai_tools/json_output_tools_parsers.ts | 21 - langchain-core/src/runnables/base.ts | 101 +- langchain-core/src/tracers/root_listener.ts | 39 +- langchain-core/src/utils/function_calling.ts | 3 +- langchain/.gitignore | 200 +-- langchain/README.md | 18 +- langchain/langchain.config.js | 76 +- langchain/package.json | 885 +---------- langchain/src/agents/chat/index.ts | 2 +- langchain/src/agents/chat_convo/index.ts | 2 +- langchain/src/agents/mrkl/index.ts | 2 +- .../src/agents/openai_functions/index.ts | 6 +- langchain/src/agents/structured_chat/index.ts | 2 +- langchain/src/agents/xml/index.ts | 2 +- .../src/chains/combine_documents/stuff.ts | 4 +- langchain/src/chains/load.ts | 2 +- .../openai_functions/structured_output.ts | 4 +- langchain/src/chains/serde.ts | 24 +- langchain/src/document_loaders/fs/chatgpt.ts | 109 -- langchain/src/document_loaders/fs/csv.ts | 118 -- langchain/src/document_loaders/fs/docx.ts | 63 - langchain/src/document_loaders/fs/epub.ts | 107 -- langchain/src/document_loaders/fs/notion.ts | 29 - langchain/src/document_loaders/fs/obsidian.ts | 272 ---- .../fs/openai_whisper_audio.ts | 56 - langchain/src/document_loaders/fs/pdf.ts | 159 -- langchain/src/document_loaders/fs/pptx.ts | 49 - langchain/src/document_loaders/fs/srt.ts | 53 - .../src/document_loaders/fs/unstructured.ts | 410 ----- .../tests/assemblyai.int.test.ts | 153 -- .../tests/chatgpt-blob.test.ts | 52 - .../document_loaders/tests/chatgpt.test.ts | 46 - .../tests/cheerio.int.test.ts | 33 - .../tests/college_confidential.int.test.ts | 9 - .../document_loaders/tests/confluence.test.ts | 85 - .../tests/couchbase.int.test.ts | 36 - .../document_loaders/tests/csv-blob.test.ts | 71 - .../src/document_loaders/tests/csv.test.ts | 63 - .../document_loaders/tests/directory.test.ts | 27 +- .../src/document_loaders/tests/docx.test.ts | 16 - .../src/document_loaders/tests/epub.test.ts | 28 - .../tests/example_data/1706.03762.pdf | Bin 2201700 -> 0 bytes .../example_data/Jacob_Lee_Resume_2023.pdf | Bin 73667 -> 0 bytes ..._Clone_Wars_S06E07_Crisis_at_the_Heart.csv | 33 - ..._Clone_Wars_S06E07_Crisis_at_the_Heart.srt | 1385 ----------------- .../tests/example_data/attention.docx | Bin 64275 -> 0 bytes .../tests/example_data/attention.epub | Bin 300608 -> 0 bytes .../chatgpt/example_conversations.json | 338 ---- .../tests/example_data/emptyfile.pptx | Bin 34277 -> 0 bytes .../tests/example_data/example_separator.csv | 33 - .../example_data/github_api_responses.ts | 93 -- .../tests/example_data/notion/notion.md | 41 - .../notion_api/notion_database_response.json | 246 --- .../notion_api/notion_page_response.json | 491 ------ .../example_data/obsidian/bad_frontmatter.md | 9 - .../example_data/obsidian/frontmatter.md | 5 - .../example_data/obsidian/no_frontmatter.md | 14 - .../example_data/obsidian/no_metadata.md | 1 - .../obsidian/tags_and_frontmatter.md | 36 - .../tests/example_data/theikuntest.pptx | Bin 34403 -> 0 bytes .../document_loaders/tests/figma.int.test.ts | 16 - .../tests/firecrawl.int.test.ts | 34 - .../tests/gitbook.int.test.ts | 23 - .../document_loaders/tests/github.int.test.ts | 140 -- .../src/document_loaders/tests/github.test.ts | 63 - .../src/document_loaders/tests/hn.int.test.ts | 7 - .../src/document_loaders/tests/imsdb.test.ts | 9 - .../document_loaders/tests/multi_file.test.ts | 34 +- .../src/document_loaders/tests/notion.test.ts | 16 - .../tests/notionapi.int.test.ts | 113 -- .../document_loaders/tests/notionapi.test.ts | 136 -- .../tests/notiondb.int.test.ts | 17 - .../document_loaders/tests/obsidian.test.ts | 191 --- .../document_loaders/tests/pdf-blob.test.ts | 51 - .../src/document_loaders/tests/pdf.test.ts | 39 - .../tests/playwright_web.int.test.ts | 31 - .../src/document_loaders/tests/pptx.test.ts | 27 - .../tests/puppeteer.int.test.ts | 55 - .../tests/recursive_url.int.test.ts | 87 -- .../src/document_loaders/tests/s3.int.test.ts | 60 - .../document_loaders/tests/searchapi.test.ts | 41 - .../document_loaders/tests/serpapi.test.ts | 29 - .../tests/sitemap.int.test.ts | 36 - .../tests/sonix_audio.int.test.ts | 70 - .../tests/sort_xyz_blockchain.int.test.ts | 52 - .../document_loaders/tests/srt-blob.test.ts | 24 - .../src/document_loaders/tests/srt.test.ts | 20 - .../tests/unstructured.int.test.ts | 100 -- .../document_loaders/tests/webpdf.int.test.ts | 113 -- .../src/document_loaders/web/apify_dataset.ts | 183 --- .../src/document_loaders/web/assemblyai.ts | 244 --- .../web/azure_blob_storage_container.ts | 96 -- .../web/azure_blob_storage_file.ts | 132 -- .../src/document_loaders/web/browserbase.ts | 87 -- langchain/src/document_loaders/web/cheerio.ts | 162 -- .../web/college_confidential.ts | 40 - .../src/document_loaders/web/confluence.ts | 249 --- .../src/document_loaders/web/couchbase.ts | 96 -- langchain/src/document_loaders/web/figma.ts | 144 -- .../src/document_loaders/web/firecrawl.ts | 116 -- langchain/src/document_loaders/web/gitbook.ts | 120 -- langchain/src/document_loaders/web/github.ts | 726 --------- langchain/src/document_loaders/web/hn.ts | 86 - langchain/src/document_loaders/web/imsdb.ts | 37 - .../src/document_loaders/web/notionapi.ts | 485 ------ .../src/document_loaders/web/notiondb.ts | 268 ---- langchain/src/document_loaders/web/pdf.ts | 144 -- .../src/document_loaders/web/playwright.ts | 129 -- .../src/document_loaders/web/puppeteer.ts | 185 --- .../src/document_loaders/web/recursive_url.ts | 223 --- langchain/src/document_loaders/web/s3.ts | 179 --- .../src/document_loaders/web/searchapi.ts | 186 --- langchain/src/document_loaders/web/serpapi.ts | 145 -- langchain/src/document_loaders/web/sitemap.ts | 164 -- .../src/document_loaders/web/sonix_audio.ts | 74 - .../web/sort_xyz_blockchain.ts | 185 --- langchain/src/document_loaders/web/youtube.ts | 134 -- langchain/src/load/import_constants.ts | 41 +- langchain/src/load/import_map.ts | 1 - langchain/src/output_parsers/openai_tools.ts | 12 +- langchain/src/retrievers/multi_query.ts | 1 + langchain/src/retrievers/self_query/chroma.ts | 53 - .../src/retrievers/self_query/pinecone.ts | 52 - .../src/retrievers/self_query/supabase.ts | 337 ---- .../retrievers/self_query/supabase_utils.ts | 285 ---- .../src/retrievers/self_query/vectara.ts | 192 --- .../src/retrievers/self_query/weaviate.ts | 273 ---- langchain/src/smith/config.ts | 4 +- .../src/smith/tests/runner_utils.int.test.ts | 4 +- langchain/src/types/assemblyai-types.ts | 6 - .../template/README.md | 12 +- .../template/package.json | 2 +- libs/langchain-anthropic/README.md | 10 +- libs/langchain-anthropic/package.json | 7 +- libs/langchain-aws/README.md | 8 +- libs/langchain-aws/package.json | 5 +- libs/langchain-azure-cosmosdb/README.md | 12 +- libs/langchain-azure-cosmosdb/package.json | 5 +- .../README.md | 10 +- .../package.json | 5 +- libs/langchain-azure-openai/README.md | 12 +- libs/langchain-azure-openai/package.json | 5 +- libs/langchain-baidu-qianfan/README.md | 2 +- libs/langchain-baidu-qianfan/package.json | 5 +- libs/langchain-cloudflare/README.md | 2 +- libs/langchain-cloudflare/package.json | 4 +- libs/langchain-cohere/README.md | 10 +- libs/langchain-cohere/package.json | 5 +- libs/langchain-community/.gitignore | 36 +- libs/langchain-community/README.md | 10 +- libs/langchain-community/langchain.config.js | 18 +- libs/langchain-community/package.json | 132 +- .../src/chat_models/googlevertexai/common.ts | 403 ----- .../src/chat_models/googlevertexai/index.ts | 64 - .../src/chat_models/googlevertexai/web.ts | 66 - .../tests/chatgooglepalm.int.test.ts | 115 -- .../chat_models/tests/chatgooglepalm.test.ts | 252 --- .../tests/chatgooglevertexai.int.test.ts | 128 -- .../tests/chatgooglevertexai.test.ts | 116 -- .../tests/chatgooglevertexai_web.int.test.ts | 129 -- .../tests/chatgooglevertexai_web.test.ts | 149 -- .../tests/example_data/notion/notion.md | 2 +- .../tests/recursive_url.int.test.ts | 4 +- .../src/embeddings/googlepalm.ts | 123 -- .../src/embeddings/googlevertexai.ts | 150 -- .../embeddings/tests/googlepalm.int.test.ts | 54 - .../tests/googlevertexai.int.test.ts | 48 - .../hubs/makersuite/chat_models.ts} | 0 .../hubs/makersuite/googlemakersuitehub.ts | 4 +- .../hubs/makersuite/llms.ts} | 0 .../tests/googlemakersuitehub.int.test.ts | 4 +- .../tests/googlemakersuitehub.test.ts | 2 +- .../src/experimental/tools/pyinterpreter.ts | 1 + .../tools/tests/pyinterpreter.int.test.ts | 0 .../src/llms/googlevertexai/common.ts | 236 --- .../src/llms/googlevertexai/index.ts | 66 - .../src/llms/googlevertexai/web.ts | 66 - .../src/llms/tests/googlepalm.int.test.ts | 32 - .../src/llms/tests/googlepalm.test.ts | 75 - .../src/llms/tests/googlevertexai.int.test.ts | 92 -- .../llms/tests/googlevertexai_web.int.test.ts | 91 -- .../src/load/import_constants.ts | 9 +- .../src/load/import_type.ts | 1 - .../src/utils/googlevertexai-gauth.ts | 38 - .../src/utils/googlevertexai-webauth.ts | 119 -- .../src/vectorstores/chroma.ts | 3 +- .../src/vectorstores/supabase.ts | 2 +- .../vectorstores/tests/convex/package.json | 2 +- libs/langchain-exa/README.md | 2 +- libs/langchain-exa/package.json | 5 +- libs/langchain-google-common/package.json | 5 +- libs/langchain-google-common/src/llms.ts | 6 + libs/langchain-google-gauth/package.json | 5 +- .../src/tests/chat_models.int.test.ts | 2 +- libs/langchain-google-genai/README.md | 12 +- libs/langchain-google-genai/package.json | 5 +- .../package.json | 5 +- .../src/chat_models.ts | 2 + .../langchain-google-vertexai-web/src/llms.ts | 2 + .../src/tests/chat_models.test.ts | 14 + .../src/tests/llms.test.ts | 14 + libs/langchain-google-vertexai/package.json | 5 +- .../src/chat_models.ts | 2 + libs/langchain-google-vertexai/src/llms.ts | 2 + .../src/tests/chat_models.int.test.ts | 2 +- .../src/tests/chat_models.test.ts | 10 + .../src/tests/llms.test.ts | 10 + libs/langchain-google-webauth/package.json | 5 +- .../src/tests/chat_models.int.test.ts | 2 +- libs/langchain-groq/README.md | 2 +- libs/langchain-groq/package.json | 5 +- libs/langchain-groq/src/chat_models.ts | 2 + .../src/tests/chat_models.test.ts | 12 + libs/langchain-mistralai/README.md | 12 +- libs/langchain-mistralai/package.json | 5 +- libs/langchain-mistralai/src/chat_models.ts | 2 + libs/langchain-mistralai/src/llms.ts | 10 + .../src/tests/chat_models.test.ts | 10 + .../src/tests/llms.test.ts | 10 + libs/langchain-mixedbread-ai/package.json | 5 +- libs/langchain-mongodb/README.md | 12 +- libs/langchain-mongodb/package.json | 5 +- libs/langchain-nomic/README.md | 2 +- libs/langchain-nomic/package.json | 5 +- libs/langchain-ollama/README.md | 2 +- libs/langchain-ollama/package.json | 5 +- libs/langchain-openai/README.md | 12 +- libs/langchain-openai/package.json | 7 +- libs/langchain-openai/src/llms.ts | 2 +- libs/langchain-openai/src/utils/tools.ts | 6 +- libs/langchain-pinecone/README.md | 2 +- libs/langchain-pinecone/package.json | 5 +- libs/langchain-qdrant/package.json | 5 +- libs/langchain-redis/README.md | 2 +- libs/langchain-redis/package.json | 5 +- libs/langchain-scripts/src/cli/docs/chat.ts | 2 +- .../src/cli/docs/document_loaders.ts | 2 +- .../src/cli/docs/kv_store.ts | 2 +- libs/langchain-scripts/src/cli/docs/llms.ts | 2 +- .../src/cli/docs/retrievers.ts | 2 +- .../src/cli/docs/templates/chat.ipynb | 2 +- .../cli/docs/templates/document_loaders.ipynb | 2 +- .../src/cli/docs/templates/kv_store.ipynb | 4 +- .../src/cli/docs/templates/llms.ipynb | 2 +- .../src/cli/docs/templates/retrievers.ipynb | 4 +- .../cli/docs/templates/text_embedding.ipynb | 2 +- .../src/cli/docs/templates/toolkits.ipynb | 2 +- .../src/cli/docs/templates/tools.ipynb | 2 +- .../src/cli/docs/templates/vectorstores.ipynb | 2 +- .../src/cli/docs/vectorstores.ts | 2 +- .../notebooks/check_notebook_type_errors.ts | 10 +- .../src/tests/__mdx__/modules/index.mdx | 30 +- .../src/tests/__mdx__/modules/two.mdx | 30 +- libs/langchain-textsplitters/README.md | 2 +- libs/langchain-textsplitters/package.json | 7 +- libs/langchain-weaviate/README.md | 2 +- libs/langchain-weaviate/package.json | 7 +- libs/langchain-yandex/README.md | 2 +- libs/langchain-yandex/package.json | 5 +- yarn.lock | 1385 ++++++++++------- 665 files changed, 2727 insertions(+), 19748 deletions(-) create mode 100644 dependency_range_tests/scripts/langchain/node/update_resolutions_latest.js create mode 100644 dependency_range_tests/scripts/with_standard_tests/anthropic/node/update_resolutions_latest.js create mode 100644 dependency_range_tests/scripts/with_standard_tests/cohere/node/update_resolutions_latest.js create mode 100644 dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_latest.js create mode 100644 dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_npm.js create mode 100644 dependency_range_tests/scripts/with_standard_tests/google-vertexai/node/update_resolutions_latest.js create mode 100644 dependency_range_tests/scripts/with_standard_tests/openai/node/update_resolutions_latest.js rename docs/core_docs/docs/how_to/{callbacks_backgrounding.ipynb => callbacks_serverless.ipynb} (57%) delete mode 100644 docs/core_docs/docs/integrations/chat/anthropic_tools.mdx delete mode 100644 docs/core_docs/docs/integrations/chat/google_palm.mdx delete mode 100644 docs/core_docs/docs/integrations/llms/google_palm.mdx delete mode 100644 docs/core_docs/docs/integrations/text_embedding/google_palm.mdx delete mode 100644 docs/core_docs/docs/tutorials/agents.mdx delete mode 100644 examples/src/document_loaders/notiondb.ts delete mode 100644 examples/src/llms/googlevertexai-code-bison_legacy.ts delete mode 100644 examples/src/llms/googlevertexai-code-gecko_legacy.ts delete mode 100644 examples/src/llms/googlevertexai-streaming_legacy.ts delete mode 100644 examples/src/llms/googlevertexai_legacy.ts delete mode 100644 examples/src/models/chat/integration_googlepalm.ts delete mode 100644 examples/src/models/chat/integration_googlevertexai-examples_legacy.ts delete mode 100644 examples/src/models/chat/integration_googlevertexai-streaming_legacy.ts delete mode 100644 examples/src/models/chat/integration_googlevertexai_legacy.ts delete mode 100644 examples/src/models/embeddings/googlepalm.ts delete mode 100644 examples/src/models/embeddings/googlevertexai.ts delete mode 100644 examples/src/models/llm/googlepalm.ts delete mode 100644 langchain/src/document_loaders/fs/chatgpt.ts delete mode 100644 langchain/src/document_loaders/fs/csv.ts delete mode 100644 langchain/src/document_loaders/fs/docx.ts delete mode 100644 langchain/src/document_loaders/fs/epub.ts delete mode 100644 langchain/src/document_loaders/fs/notion.ts delete mode 100644 langchain/src/document_loaders/fs/obsidian.ts delete mode 100644 langchain/src/document_loaders/fs/openai_whisper_audio.ts delete mode 100644 langchain/src/document_loaders/fs/pdf.ts delete mode 100644 langchain/src/document_loaders/fs/pptx.ts delete mode 100644 langchain/src/document_loaders/fs/srt.ts delete mode 100644 langchain/src/document_loaders/fs/unstructured.ts delete mode 100644 langchain/src/document_loaders/tests/assemblyai.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/chatgpt-blob.test.ts delete mode 100644 langchain/src/document_loaders/tests/chatgpt.test.ts delete mode 100644 langchain/src/document_loaders/tests/cheerio.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/college_confidential.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/confluence.test.ts delete mode 100644 langchain/src/document_loaders/tests/couchbase.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/csv-blob.test.ts delete mode 100644 langchain/src/document_loaders/tests/csv.test.ts delete mode 100644 langchain/src/document_loaders/tests/docx.test.ts delete mode 100644 langchain/src/document_loaders/tests/epub.test.ts delete mode 100644 langchain/src/document_loaders/tests/example_data/1706.03762.pdf delete mode 100644 langchain/src/document_loaders/tests/example_data/Jacob_Lee_Resume_2023.pdf delete mode 100644 langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.csv delete mode 100644 langchain/src/document_loaders/tests/example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.srt delete mode 100644 langchain/src/document_loaders/tests/example_data/attention.docx delete mode 100644 langchain/src/document_loaders/tests/example_data/attention.epub delete mode 100644 langchain/src/document_loaders/tests/example_data/chatgpt/example_conversations.json delete mode 100644 langchain/src/document_loaders/tests/example_data/emptyfile.pptx delete mode 100644 langchain/src/document_loaders/tests/example_data/example_separator.csv delete mode 100644 langchain/src/document_loaders/tests/example_data/github_api_responses.ts delete mode 100644 langchain/src/document_loaders/tests/example_data/notion/notion.md delete mode 100644 langchain/src/document_loaders/tests/example_data/notion_api/notion_database_response.json delete mode 100644 langchain/src/document_loaders/tests/example_data/notion_api/notion_page_response.json delete mode 100644 langchain/src/document_loaders/tests/example_data/obsidian/bad_frontmatter.md delete mode 100644 langchain/src/document_loaders/tests/example_data/obsidian/frontmatter.md delete mode 100644 langchain/src/document_loaders/tests/example_data/obsidian/no_frontmatter.md delete mode 100644 langchain/src/document_loaders/tests/example_data/obsidian/no_metadata.md delete mode 100644 langchain/src/document_loaders/tests/example_data/obsidian/tags_and_frontmatter.md delete mode 100644 langchain/src/document_loaders/tests/example_data/theikuntest.pptx delete mode 100644 langchain/src/document_loaders/tests/figma.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/firecrawl.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/gitbook.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/github.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/github.test.ts delete mode 100644 langchain/src/document_loaders/tests/hn.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/imsdb.test.ts delete mode 100644 langchain/src/document_loaders/tests/notion.test.ts delete mode 100644 langchain/src/document_loaders/tests/notionapi.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/notionapi.test.ts delete mode 100644 langchain/src/document_loaders/tests/notiondb.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/obsidian.test.ts delete mode 100644 langchain/src/document_loaders/tests/pdf-blob.test.ts delete mode 100644 langchain/src/document_loaders/tests/pdf.test.ts delete mode 100644 langchain/src/document_loaders/tests/playwright_web.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/pptx.test.ts delete mode 100644 langchain/src/document_loaders/tests/puppeteer.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/recursive_url.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/s3.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/searchapi.test.ts delete mode 100644 langchain/src/document_loaders/tests/serpapi.test.ts delete mode 100644 langchain/src/document_loaders/tests/sitemap.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/sonix_audio.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/sort_xyz_blockchain.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/srt-blob.test.ts delete mode 100644 langchain/src/document_loaders/tests/srt.test.ts delete mode 100644 langchain/src/document_loaders/tests/unstructured.int.test.ts delete mode 100644 langchain/src/document_loaders/tests/webpdf.int.test.ts delete mode 100644 langchain/src/document_loaders/web/apify_dataset.ts delete mode 100644 langchain/src/document_loaders/web/assemblyai.ts delete mode 100644 langchain/src/document_loaders/web/azure_blob_storage_container.ts delete mode 100644 langchain/src/document_loaders/web/azure_blob_storage_file.ts delete mode 100644 langchain/src/document_loaders/web/browserbase.ts delete mode 100644 langchain/src/document_loaders/web/cheerio.ts delete mode 100644 langchain/src/document_loaders/web/college_confidential.ts delete mode 100644 langchain/src/document_loaders/web/confluence.ts delete mode 100644 langchain/src/document_loaders/web/couchbase.ts delete mode 100644 langchain/src/document_loaders/web/figma.ts delete mode 100644 langchain/src/document_loaders/web/firecrawl.ts delete mode 100644 langchain/src/document_loaders/web/gitbook.ts delete mode 100644 langchain/src/document_loaders/web/github.ts delete mode 100644 langchain/src/document_loaders/web/hn.ts delete mode 100644 langchain/src/document_loaders/web/imsdb.ts delete mode 100644 langchain/src/document_loaders/web/notionapi.ts delete mode 100644 langchain/src/document_loaders/web/notiondb.ts delete mode 100644 langchain/src/document_loaders/web/pdf.ts delete mode 100644 langchain/src/document_loaders/web/playwright.ts delete mode 100644 langchain/src/document_loaders/web/puppeteer.ts delete mode 100644 langchain/src/document_loaders/web/recursive_url.ts delete mode 100644 langchain/src/document_loaders/web/s3.ts delete mode 100644 langchain/src/document_loaders/web/searchapi.ts delete mode 100644 langchain/src/document_loaders/web/serpapi.ts delete mode 100644 langchain/src/document_loaders/web/sitemap.ts delete mode 100644 langchain/src/document_loaders/web/sonix_audio.ts delete mode 100644 langchain/src/document_loaders/web/sort_xyz_blockchain.ts delete mode 100644 langchain/src/document_loaders/web/youtube.ts delete mode 100644 langchain/src/retrievers/self_query/chroma.ts delete mode 100644 langchain/src/retrievers/self_query/pinecone.ts delete mode 100644 langchain/src/retrievers/self_query/supabase.ts delete mode 100644 langchain/src/retrievers/self_query/supabase_utils.ts delete mode 100644 langchain/src/retrievers/self_query/vectara.ts delete mode 100644 langchain/src/retrievers/self_query/weaviate.ts delete mode 100644 langchain/src/types/assemblyai-types.ts delete mode 100644 libs/langchain-community/src/chat_models/googlevertexai/common.ts delete mode 100644 libs/langchain-community/src/chat_models/googlevertexai/index.ts delete mode 100644 libs/langchain-community/src/chat_models/googlevertexai/web.ts delete mode 100644 libs/langchain-community/src/chat_models/tests/chatgooglepalm.int.test.ts delete mode 100644 libs/langchain-community/src/chat_models/tests/chatgooglepalm.test.ts delete mode 100644 libs/langchain-community/src/chat_models/tests/chatgooglevertexai.int.test.ts delete mode 100644 libs/langchain-community/src/chat_models/tests/chatgooglevertexai.test.ts delete mode 100644 libs/langchain-community/src/chat_models/tests/chatgooglevertexai_web.int.test.ts delete mode 100644 libs/langchain-community/src/chat_models/tests/chatgooglevertexai_web.test.ts delete mode 100644 libs/langchain-community/src/embeddings/googlepalm.ts delete mode 100644 libs/langchain-community/src/embeddings/googlevertexai.ts delete mode 100644 libs/langchain-community/src/embeddings/tests/googlepalm.int.test.ts delete mode 100644 libs/langchain-community/src/embeddings/tests/googlevertexai.int.test.ts rename libs/langchain-community/src/{chat_models/googlepalm.ts => experimental/hubs/makersuite/chat_models.ts} (100%) rename libs/langchain-community/src/{llms/googlepalm.ts => experimental/hubs/makersuite/llms.ts} (100%) rename {langchain => libs/langchain-community}/src/experimental/tools/pyinterpreter.ts (98%) rename {langchain => libs/langchain-community}/src/experimental/tools/tests/pyinterpreter.int.test.ts (100%) delete mode 100644 libs/langchain-community/src/llms/googlevertexai/common.ts delete mode 100644 libs/langchain-community/src/llms/googlevertexai/index.ts delete mode 100644 libs/langchain-community/src/llms/googlevertexai/web.ts delete mode 100644 libs/langchain-community/src/llms/tests/googlepalm.int.test.ts delete mode 100644 libs/langchain-community/src/llms/tests/googlepalm.test.ts delete mode 100644 libs/langchain-community/src/llms/tests/googlevertexai.int.test.ts delete mode 100644 libs/langchain-community/src/llms/tests/googlevertexai_web.int.test.ts delete mode 100644 libs/langchain-community/src/utils/googlevertexai-gauth.ts delete mode 100644 libs/langchain-community/src/utils/googlevertexai-webauth.ts create mode 100644 libs/langchain-google-vertexai-web/src/tests/chat_models.test.ts create mode 100644 libs/langchain-google-vertexai-web/src/tests/llms.test.ts create mode 100644 libs/langchain-google-vertexai/src/tests/chat_models.test.ts create mode 100644 libs/langchain-google-vertexai/src/tests/llms.test.ts create mode 100644 libs/langchain-groq/src/tests/chat_models.test.ts create mode 100644 libs/langchain-mistralai/src/tests/llms.test.ts diff --git a/.github/DISCUSSION_TEMPLATE/q-a.yml b/.github/DISCUSSION_TEMPLATE/q-a.yml index 69112bbcddc1..383adfa0f68b 100644 --- a/.github/DISCUSSION_TEMPLATE/q-a.yml +++ b/.github/DISCUSSION_TEMPLATE/q-a.yml @@ -21,8 +21,8 @@ body: Relevant links to check before opening a question to see if your question has already been answered, fixed or if there's another way to solve your problem: - [LangChain.js documentation with the integrated search](https://js.langchain.com/v0.2/docs/introduction), - [API Reference](https://v02.api.js.langchain.com/), + [LangChain.js documentation with the integrated search](https://js.langchain.com/docs/introduction), + [API Reference](https://api.js.langchain.com/), [GitHub search](https://github.com/langchain-ai/langchainjs), [LangChain.js Github Discussions](https://github.com/langchain-ai/langchainjs/discussions), [LangChain.js Github Issues](https://github.com/langchain-ai/langchainjs/issues?q=is%3Aissue), diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 169d0fcf84b7..b1063e54b46b 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -15,8 +15,8 @@ body: Relevant links to check before filing a bug report to see if your issue has already been reported, fixed or if there's another way to solve your problem: - [LangChain.js documentation with the integrated search](https://js.langchain.com/v0.2/docs/introduction), - [API Reference](https://v02.api.js.langchain.com/), + [LangChain.js documentation with the integrated search](https://js.langchain.com/docs/introduction), + [API Reference](https://api.js.langchain.com/), [GitHub search](https://github.com/langchain-ai/langchainjs), [LangChain.js Github Discussions](https://github.com/langchain-ai/langchainjs/discussions), [LangChain.js Github Issues](https://github.com/langchain-ai/langchainjs/issues?q=is%3Aissue), diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml index 5944f3e2bdf5..35ada1d22652 100644 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -20,8 +20,8 @@ body: If you're in the wrong place, here are some helpful links to find a better place to ask your question: - [LangChain.js documentation with the integrated search](https://js.langchain.com/v0.2/docs/introduction), - [API Reference](https://v02.api.js.langchain.com/), + [LangChain.js documentation with the integrated search](https://js.langchain.com/docs/introduction), + [API Reference](https://api.js.langchain.com/), [GitHub search](https://github.com/langchain-ai/langchainjs), [LangChain.js Github Discussions](https://github.com/langchain-ai/langchainjs/discussions), [LangChain.js Github Issues](https://github.com/langchain-ai/langchainjs/issues?q=is%3Aissue), diff --git a/.github/workflows/validate_new_notebooks.yml b/.github/workflows/validate_new_notebooks.yml index d61b7ab9ec77..2d3580464fe6 100644 --- a/.github/workflows/validate_new_notebooks.yml +++ b/.github/workflows/validate_new_notebooks.yml @@ -50,10 +50,21 @@ jobs: run: | notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '^docs/core_docs/.*\.ipynb$' || true) if [ -n "$notebooks" ]; then + failed_notebooks=() for notebook in $notebooks; do absolute_path="$GITHUB_WORKSPACE/$notebook" + set +e yarn workspace @langchain/scripts notebook_validate "$absolute_path" + if [ $? -ne 0 ]; then + failed_notebooks+=("$notebook") + fi + set -e done + if [ ${#failed_notebooks[@]} -ne 0 ]; then + echo "The following notebooks failed validation:" + printf '%s\n' "${failed_notebooks[@]}" + exit 1 + fi else echo "No notebooks in docs/core_docs to validate." fi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a45a37c2e606..5b49049e637a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ LangChain supports several different types of integrations with third-party prov We welcome such contributions, but ask that you read our dedicated [integration contribution guide](https://github.com/langchain-ai/langchainjs/blob/main/.github/contributing/INTEGRATIONS.md) for specific details and patterns to consider before opening a pull request. -You can also check out the [guides on extending LangChain.js](https://js.langchain.com/v0.2/docs/how_to/#custom) in our docs. +You can also check out the [guides on extending LangChain.js](https://js.langchain.com/docs/how_to/#custom) in our docs. #### Integration packages diff --git a/README.md b/README.md index bcf98e556a10..988669952b12 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,10 @@ LangChain is written in TypeScript and can be used in: - **Reason**: rely on a language model to reason (about how to answer based on provided context, what actions to take, etc.) This framework consists of several parts. -- **Open-source libraries**: Build your applications using LangChain's open-source [building blocks](https://js.langchain.com/v0.2/docs/concepts#langchain-expression-language), [components](https://js.langchain.com/v0.2/docs/concepts), and [third-party integrations](https://js.langchain.com/v0.2/docs/integrations/platforms/). -Use [LangGraph.js](https://js.langchain.com/v0.2/docs/concepts/#langgraphjs) to build stateful agents with first-class streaming and human-in-the-loop support. +- **Open-source libraries**: Build your applications using LangChain's open-source [building blocks](https://js.langchain.com/docs/concepts#langchain-expression-language), [components](https://js.langchain.com/docs/concepts), and [third-party integrations](https://js.langchain.com/docs/integrations/platforms/). +Use [LangGraph.js](https://js.langchain.com/docs/concepts/#langgraphjs) to build stateful agents with first-class streaming and human-in-the-loop support. - **Productionization**: Use [LangSmith](https://docs.smith.langchain.com/) to inspect, monitor and evaluate your chains, so that you can continuously optimize and deploy with confidence. -- **Deployment**: Turn your LangGraph applications into production-ready APIs and Assistants with [LangGraph Cloud](https://langchain-ai.github.io/langgraph/cloud/) (currently Python-only). +- **Deployment**: Turn your LangGraph applications into production-ready APIs and Assistants with [LangGraph Cloud](https://langchain-ai.github.io/langgraph/cloud/). The LangChain libraries themselves are made up of several different packages. - **[`@langchain/core`](https://github.com/langchain-ai/langchainjs/blob/main/langchain-core)**: Base abstractions and LangChain Expression Language. @@ -53,12 +53,12 @@ This library aims to assist in the development of those types of applications. C **❓Question Answering over specific documents** -- [Documentation](https://js.langchain.com/v0.2/docs/tutorials/rag/) +- [Documentation](https://js.langchain.com/docs/tutorials/rag/) - End-to-end Example: [Doc-Chatbot](https://github.com/dissorial/doc-chatbot) **πŸ’¬ Chatbots** -- [Documentation](https://js.langchain.com/v0.2/docs/tutorials/chatbot) +- [Documentation](https://js.langchain.com/docs/tutorials/chatbot) - End-to-end Example: [Chat-LangChain](https://github.com/langchain-ai/chat-langchain) ## πŸš€ How does LangChain help? @@ -81,15 +81,15 @@ Data Augmented Generation involves specific types of chains that first interact **πŸ€– Agents:** -Agents allow an LLM autonomy over how a task is accomplished. Agents make decisions about which Actions to take, then take that Action, observe the result, and repeat until the task is complete. LangChain provides a [standard interface for agents](https://js.langchain.com/v0.2/docs/concepts/#agents), along with [LangGraph.js](https://github.com/langchain-ai/langgraphjs/) for building custom agents. +Agents allow an LLM autonomy over how a task is accomplished. Agents make decisions about which Actions to take, then take that Action, observe the result, and repeat until the task is complete. LangChain provides a [standard interface for agents](https://js.langchain.com/docs/concepts/#agents), along with [LangGraph.js](https://github.com/langchain-ai/langgraphjs/) for building custom agents. ## πŸ“– Documentation Please see [here](https://js.langchain.com) for full documentation, which includes: -- [Getting started](https://js.langchain.com/v0.2/docs/introduction): installation, setting up the environment, simple examples -- Overview of the [interfaces](https://js.langchain.com/v0.2/docs/how_to/lcel_cheatsheet/), [modules](https://js.langchain.com/v0.2/docs/concepts) and [integrations](https://js.langchain.com/v0.2/docs/integrations/platforms/) -- [Tutorial](https://js.langchain.com/v0.2/docs/tutorials/) walkthroughs +- [Getting started](https://js.langchain.com/docs/introduction): installation, setting up the environment, simple examples +- Overview of the [interfaces](https://js.langchain.com/docs/how_to/lcel_cheatsheet/), [modules](https://js.langchain.com/docs/concepts) and [integrations](https://js.langchain.com/docs/integrations/platforms/) +- [Tutorial](https://js.langchain.com/docs/tutorials/) walkthroughs - [Reference](https://api.js.langchain.com): full API docs ## πŸ’ Contributing diff --git a/cookbook/rag_fusion.ipynb b/cookbook/rag_fusion.ipynb index 4ca55c2055bd..fe1587d5bea9 100644 --- a/cookbook/rag_fusion.ipynb +++ b/cookbook/rag_fusion.ipynb @@ -19,7 +19,7 @@ "source": [ "## Setup\n", "\n", - "For this example we'll use an in memory store as our vectorstore/retriever, and some fake data. You can swap out the vectorstore for your [preferred LangChain.js option](https://js.langchain.com/v0.2/docs/integrations/vectorstores) later.\n" + "For this example we'll use an in memory store as our vectorstore/retriever, and some fake data. You can swap out the vectorstore for your [preferred LangChain.js option](https://js.langchain.com/docs/integrations/vectorstores) later.\n" ] }, { diff --git a/dependency_range_tests/scripts/langchain/node/update_resolutions_latest.js b/dependency_range_tests/scripts/langchain/node/update_resolutions_latest.js new file mode 100644 index 000000000000..ac3609e60a8a --- /dev/null +++ b/dependency_range_tests/scripts/langchain/node/update_resolutions_latest.js @@ -0,0 +1,17 @@ +const fs = require("fs"); + +const communityPackageJsonPath = "package.json"; +const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); + +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; + currentPackageJson.peerDependencies["@langchain/core"] = "latest"; +} + +// Stupid hack +currentPackageJson.resolutions = { + ...currentPackageJson.resolutions, + "jackspeak": "2.1.1" +}; + +fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/langchain/node/update_resolutions_lowest.js b/dependency_range_tests/scripts/langchain/node/update_resolutions_lowest.js index 5712a8b5770c..badc28a30819 100644 --- a/dependency_range_tests/scripts/langchain/node/update_resolutions_lowest.js +++ b/dependency_range_tests/scripts/langchain/node/update_resolutions_lowest.js @@ -5,28 +5,24 @@ const communityPackageJsonPath = "package.json"; const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); -if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.dependencies["@langchain/core"].includes("rc")) { +if (currentPackageJson.peerDependencies["@langchain/core"] && !currentPackageJson.peerDependencies["@langchain/core"].includes("rc")) { const minVersion = semver.minVersion( - currentPackageJson.dependencies["@langchain/core"] + currentPackageJson.peerDependencies["@langchain/core"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/core": minVersion, - }; - currentPackageJson.dependencies = { - ...currentPackageJson.dependencies, + currentPackageJson.peerDependencies = { + ...currentPackageJson.peerDependencies, "@langchain/core": minVersion, }; } +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; +} + if (currentPackageJson.dependencies["@langchain/openai"] && !currentPackageJson.dependencies["@langchain/openai"].includes("rc")) { const minVersion = semver.minVersion( currentPackageJson.dependencies["@langchain/openai"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/openai": minVersion, - }; currentPackageJson.dependencies = { ...currentPackageJson.dependencies, "@langchain/openai": minVersion, @@ -37,14 +33,16 @@ if (currentPackageJson.dependencies["@langchain/textsplitters"] && !currentPacka const minVersion = semver.minVersion( currentPackageJson.dependencies["@langchain/textsplitters"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/textsplitters": minVersion, - }; currentPackageJson.dependencies = { ...currentPackageJson.dependencies, "@langchain/textsplitters": minVersion, }; } +// Stupid hack +currentPackageJson.resolutions = { + ...currentPackageJson.resolutions, + "jackspeak": "2.1.1" +}; + fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/langchain/test-with-latest-deps.sh b/dependency_range_tests/scripts/langchain/test-with-latest-deps.sh index ca79988c4346..4488c5710cb7 100644 --- a/dependency_range_tests/scripts/langchain/test-with-latest-deps.sh +++ b/dependency_range_tests/scripts/langchain/test-with-latest-deps.sh @@ -10,7 +10,19 @@ shopt -s extglob # avoid copying build artifacts from the host cp -r ../langchain/!(node_modules|dist|dist-cjs|dist-esm|build|.next|.turbo) ./ +mkdir -p /updater_script +cp -r /scripts/langchain/node/!(node_modules|dist|dist-cjs|dist-esm|build|.next|.turbo) /updater_script/ + +cd /updater_script + +yarn + +cd /app + +node /updater_script/update_resolutions_latest.js + yarn +yarn add @langchain/core # Check the test command completes successfully NODE_OPTIONS=--experimental-vm-modules yarn run jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50% diff --git a/dependency_range_tests/scripts/langchain/test-with-lowest-deps.sh b/dependency_range_tests/scripts/langchain/test-with-lowest-deps.sh index e7f36a21cd01..36cf0443d9e1 100644 --- a/dependency_range_tests/scripts/langchain/test-with-lowest-deps.sh +++ b/dependency_range_tests/scripts/langchain/test-with-lowest-deps.sh @@ -21,7 +21,11 @@ cd /app node /updater_script/update_resolutions_lowest.js +# Read the @langchain/core version from peerDependencies +core_version=$(node -p "require('./package.json').peerDependencies['@langchain/core']") + yarn +yarn add @langchain/core@$core_version # Check the test command completes successfully NODE_OPTIONS=--experimental-vm-modules yarn run jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50% diff --git a/dependency_range_tests/scripts/with_standard_tests/anthropic/node/update_resolutions_latest.js b/dependency_range_tests/scripts/with_standard_tests/anthropic/node/update_resolutions_latest.js new file mode 100644 index 000000000000..2c2c9317d4db --- /dev/null +++ b/dependency_range_tests/scripts/with_standard_tests/anthropic/node/update_resolutions_latest.js @@ -0,0 +1,11 @@ +const fs = require("fs"); + +const communityPackageJsonPath = "/app/monorepo/libs/langchain-anthropic/package.json"; +const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); + +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; + currentPackageJson.peerDependencies["@langchain/core"] = "latest"; +} + +fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/anthropic/node/update_resolutions_lowest.js b/dependency_range_tests/scripts/with_standard_tests/anthropic/node/update_resolutions_lowest.js index d2ed5e7ac928..5500268dba0d 100644 --- a/dependency_range_tests/scripts/with_standard_tests/anthropic/node/update_resolutions_lowest.js +++ b/dependency_range_tests/scripts/with_standard_tests/anthropic/node/update_resolutions_lowest.js @@ -5,18 +5,18 @@ const communityPackageJsonPath = "/app/monorepo/libs/langchain-anthropic/package const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); -if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.dependencies["@langchain/core"].includes("rc")) { +if (currentPackageJson.peerDependencies["@langchain/core"] && !currentPackageJson.peerDependencies["@langchain/core"].includes("rc")) { const minVersion = semver.minVersion( - currentPackageJson.dependencies["@langchain/core"] + currentPackageJson.peerDependencies["@langchain/core"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/core": minVersion, - }; - currentPackageJson.dependencies = { - ...currentPackageJson.dependencies, + currentPackageJson.peerDependencies = { + ...currentPackageJson.peerDependencies, "@langchain/core": minVersion, }; } +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; +} + fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/anthropic/test-with-latest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/anthropic/test-with-latest-deps.sh index 80beb0a3568d..bcf32dfbaa9a 100644 --- a/dependency_range_tests/scripts/with_standard_tests/anthropic/test-with-latest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/anthropic/test-with-latest-deps.sh @@ -23,6 +23,7 @@ cd "$updater_script_dir" # Update any workspace dep to the latest version since not all workspaces are # available in the test enviroment. node "update_workspace_deps.js" +node "update_resolutions_latest.js" # Navigate back to monorepo root and install dependencies cd "$monorepo_dir" @@ -32,4 +33,6 @@ yarn # We need to run inside the anthropic directory so turbo repo does # not try to build the package/its workspace dependencies. cd "$monorepo_anthropic_dir" + +yarn add @langchain/core yarn test diff --git a/dependency_range_tests/scripts/with_standard_tests/anthropic/test-with-lowest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/anthropic/test-with-lowest-deps.sh index 0ae8ac11503b..11eae9e21a80 100644 --- a/dependency_range_tests/scripts/with_standard_tests/anthropic/test-with-lowest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/anthropic/test-with-lowest-deps.sh @@ -5,7 +5,7 @@ set -euxo pipefail export CI=true monorepo_dir="/app/monorepo" -monorepo_openai_dir="/app/monorepo/libs/langchain-anthropic" +monorepo_anthropic_dir="/app/monorepo/libs/langchain-anthropic" updater_script_dir="/app/updater_script" original_updater_script_dir="/scripts/with_standard_tests/anthropic/node" @@ -20,8 +20,8 @@ cp "$original_updater_script_dir"/* "$updater_script_dir/" cd "$updater_script_dir" yarn # Run the updater script -node "update_resolutions_lowest.js" node "update_workspace_deps.js" +node "update_resolutions_lowest.js" # Navigate back to monorepo root and install dependencies cd "$monorepo_dir" @@ -30,5 +30,11 @@ yarn # Navigate into `@langchain/anthropic` to build and run tests # We need to run inside the package directory so turbo repo does # not try to build the package/its workspace dependencies. -cd "$monorepo_openai_dir" +cd "$monorepo_anthropic_dir" + +# Read the @langchain/core version from peerDependencies +core_version=$(node -p "require('./package.json').peerDependencies['@langchain/core']") + +# Install @langchain/core at the specified version +yarn add @langchain/core@$core_version yarn test diff --git a/dependency_range_tests/scripts/with_standard_tests/cohere/node/update_resolutions_latest.js b/dependency_range_tests/scripts/with_standard_tests/cohere/node/update_resolutions_latest.js new file mode 100644 index 000000000000..607a8d3298b6 --- /dev/null +++ b/dependency_range_tests/scripts/with_standard_tests/cohere/node/update_resolutions_latest.js @@ -0,0 +1,11 @@ +const fs = require("fs"); + +const communityPackageJsonPath = "/app/monorepo/libs/langchain-cohere/package.json"; +const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); + +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; + currentPackageJson.peerDependencies["@langchain/core"] = "latest"; +} + +fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/cohere/node/update_resolutions_lowest.js b/dependency_range_tests/scripts/with_standard_tests/cohere/node/update_resolutions_lowest.js index 4f349584032b..10b1cc7160e7 100644 --- a/dependency_range_tests/scripts/with_standard_tests/cohere/node/update_resolutions_lowest.js +++ b/dependency_range_tests/scripts/with_standard_tests/cohere/node/update_resolutions_lowest.js @@ -5,18 +5,18 @@ const communityPackageJsonPath = "/app/monorepo/libs/langchain-cohere/package.js const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); -if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.dependencies["@langchain/core"].includes("rc")) { +if (currentPackageJson.peerDependencies["@langchain/core"] && !currentPackageJson.peerDependencies["@langchain/core"].includes("rc")) { const minVersion = semver.minVersion( - currentPackageJson.dependencies["@langchain/core"] + currentPackageJson.peerDependencies["@langchain/core"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/core": minVersion, - }; - currentPackageJson.dependencies = { - ...currentPackageJson.dependencies, + currentPackageJson.peerDependencies = { + ...currentPackageJson.peerDependencies, "@langchain/core": minVersion, }; } +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; +} + fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/cohere/test-with-latest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/cohere/test-with-latest-deps.sh index 0c7c23bd9793..24c5ccc872f8 100644 --- a/dependency_range_tests/scripts/with_standard_tests/cohere/test-with-latest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/cohere/test-with-latest-deps.sh @@ -6,11 +6,24 @@ export CI=true # New monorepo directory paths monorepo_dir="/app/monorepo" -monorepo_openai_dir="/app/monorepo/libs/langchain-cohere" +monorepo_cohere_dir="/app/monorepo/libs/langchain-cohere" + +# Updater script will not live inside the monorepo +updater_script_dir="/app/updater_script" + +# Original directory paths +original_updater_script_dir="/scripts/with_standard_tests/cohere/node" # Run the shared script to copy all necessary folders/files bash /scripts/with_standard_tests/shared.sh cohere +mkdir -p "$updater_script_dir" +cp "$original_updater_script_dir"/* "$updater_script_dir/" +cd "$updater_script_dir" +# Update any workspace dep to the latest version since not all workspaces are +# available in the test enviroment. +node "update_resolutions_latest.js" + # Navigate back to monorepo root and install dependencies cd "$monorepo_dir" yarn @@ -18,5 +31,7 @@ yarn # Navigate into `@langchain/cohere` to build and run tests # We need to run inside the cohere directory so turbo repo does # not try to build the package/its workspace dependencies. -cd "$monorepo_openai_dir" +cd "$monorepo_cohere_dir" + +yarn add @langchain/core yarn test diff --git a/dependency_range_tests/scripts/with_standard_tests/cohere/test-with-lowest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/cohere/test-with-lowest-deps.sh index 7ec4bc0c2d84..3868e0a9d6c0 100644 --- a/dependency_range_tests/scripts/with_standard_tests/cohere/test-with-lowest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/cohere/test-with-lowest-deps.sh @@ -32,4 +32,10 @@ yarn # We need to run inside the cohere directory so turbo repo does # not try to build the package/its workspace dependencies. cd "$monorepo_cohere_dir" + +# Read the @langchain/core version from peerDependencies +core_version=$(node -p "require('./package.json').peerDependencies['@langchain/core']") + +# Install @langchain/core at the specified version +yarn add @langchain/core@$core_version yarn test diff --git a/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_latest.js b/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_latest.js new file mode 100644 index 000000000000..6c143c486d54 --- /dev/null +++ b/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_latest.js @@ -0,0 +1,16 @@ +const fs = require("fs"); + +const communityPackageJsonPath = "/app/monorepo/libs/langchain-community/package.json"; +const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); + +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; + currentPackageJson.peerDependencies["@langchain/core"] = "latest"; +} + +if (currentPackageJson.dependencies["@langchain/openai"]) { + delete currentPackageJson.dependencies["@langchain/openai"]; + currentPackageJson.dependencies["@langchain/openai"] = "latest"; +} + +fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_lowest.js b/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_lowest.js index b0da1629189e..791929cdca90 100644 --- a/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_lowest.js +++ b/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_lowest.js @@ -5,32 +5,32 @@ const communityPackageJsonPath = "/app/monorepo/libs/langchain-community/package const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); -if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.dependencies["@langchain/core"].includes("rc")) { +if (currentPackageJson.peerDependencies["@langchain/core"] && !currentPackageJson.peerDependencies["@langchain/core"].includes("rc")) { const minVersion = semver.minVersion( - currentPackageJson.dependencies["@langchain/core"] + currentPackageJson.peerDependencies["@langchain/core"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/core": minVersion, - }; - currentPackageJson.dependencies = { - ...currentPackageJson.dependencies, + currentPackageJson.peerDependencies = { + ...currentPackageJson.peerDependencies, "@langchain/core": minVersion, }; } +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; +} + if (currentPackageJson.dependencies["@langchain/openai"] && !currentPackageJson.dependencies["@langchain/openai"].includes("rc")) { const minVersion = semver.minVersion( currentPackageJson.dependencies["@langchain/openai"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/openai": minVersion, - }; currentPackageJson.dependencies = { ...currentPackageJson.dependencies, "@langchain/openai": minVersion, }; } +if (currentPackageJson.devDependencies["@langchain/openai"]) { + delete currentPackageJson.devDependencies["@langchain/openai"]; +} + fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_npm.js b/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_npm.js new file mode 100644 index 000000000000..9a80bc65bade --- /dev/null +++ b/dependency_range_tests/scripts/with_standard_tests/community/node/update_resolutions_npm.js @@ -0,0 +1,10 @@ +const fs = require("fs"); + +const communityPackageJsonPath = "/app/monorepo/libs/langchain-community/package.json"; +const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); + +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; +} + +fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/community/npm-install.sh b/dependency_range_tests/scripts/with_standard_tests/community/npm-install.sh index c5294fe8eb2f..4e33fae2dd58 100644 --- a/dependency_range_tests/scripts/with_standard_tests/community/npm-install.sh +++ b/dependency_range_tests/scripts/with_standard_tests/community/npm-install.sh @@ -8,10 +8,23 @@ export CI=true monorepo_dir="/app/monorepo" monorepo_community_dir="/app/monorepo/libs/langchain-community" +# Updater script will not live inside the monorepo +updater_script_dir="/app/updater_script" + +# Original directory paths +original_updater_script_dir="/scripts/with_standard_tests/community/node" + # Run the shared script to copy all necessary folders/files bash /scripts/with_standard_tests/shared.sh community +mkdir -p "$updater_script_dir" +cp "$original_updater_script_dir"/* "$updater_script_dir/" +cd "$updater_script_dir" + +node "update_resolutions_npm.js" + # Navigate back to monorepo root and install dependencies cd "$monorepo_dir" +npm install @langchain/core npm install diff --git a/dependency_range_tests/scripts/with_standard_tests/community/test-with-latest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/community/test-with-latest-deps.sh index f7c65b71ac00..df63a38f8546 100644 --- a/dependency_range_tests/scripts/with_standard_tests/community/test-with-latest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/community/test-with-latest-deps.sh @@ -8,9 +8,22 @@ export CI=true monorepo_dir="/app/monorepo" monorepo_community_dir="/app/monorepo/libs/langchain-community" +# Updater script will not live inside the monorepo +updater_script_dir="/app/updater_script" + +# Original directory paths +original_updater_script_dir="/scripts/with_standard_tests/community/node" + # Run the shared script to copy all necessary folders/files bash /scripts/with_standard_tests/shared.sh community +mkdir -p "$updater_script_dir" +cp "$original_updater_script_dir"/* "$updater_script_dir/" +cd "$updater_script_dir" +# Update any workspace dep to the latest version since not all workspaces are +# available in the test enviroment. +node "update_resolutions_latest.js" + # Navigate back to monorepo root and install dependencies cd "$monorepo_dir" yarn @@ -19,4 +32,6 @@ yarn # We need to run inside the community directory so turbo repo does # not try to build the package/its workspace dependencies. cd "$monorepo_community_dir" + +yarn add @langchain/core yarn test diff --git a/dependency_range_tests/scripts/with_standard_tests/community/test-with-lowest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/community/test-with-lowest-deps.sh index a96debf040b7..e6d70012a809 100644 --- a/dependency_range_tests/scripts/with_standard_tests/community/test-with-lowest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/community/test-with-lowest-deps.sh @@ -32,4 +32,10 @@ yarn # We need to run inside the package directory so turbo repo does # not try to build the package/its workspace dependencies. cd "$monorepo_community_dir" + +# Read the @langchain/core version from peerDependencies +core_version=$(node -p "require('./package.json').peerDependencies['@langchain/core']") + +# Install @langchain/core at the specified version +yarn add @langchain/core@$core_version yarn test diff --git a/dependency_range_tests/scripts/with_standard_tests/google-vertexai/node/update_resolutions_latest.js b/dependency_range_tests/scripts/with_standard_tests/google-vertexai/node/update_resolutions_latest.js new file mode 100644 index 000000000000..78c768cd15a1 --- /dev/null +++ b/dependency_range_tests/scripts/with_standard_tests/google-vertexai/node/update_resolutions_latest.js @@ -0,0 +1,11 @@ +const fs = require("fs"); + +const communityPackageJsonPath = "/app/monorepo/libs/langchain-google-vertexai/package.json"; +const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); + +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; + currentPackageJson.peerDependencies["@langchain/core"] = "latest"; +} + +fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/google-vertexai/node/update_resolutions_lowest.js b/dependency_range_tests/scripts/with_standard_tests/google-vertexai/node/update_resolutions_lowest.js index a600da592199..91d3e5eab402 100644 --- a/dependency_range_tests/scripts/with_standard_tests/google-vertexai/node/update_resolutions_lowest.js +++ b/dependency_range_tests/scripts/with_standard_tests/google-vertexai/node/update_resolutions_lowest.js @@ -5,28 +5,24 @@ const communityPackageJsonPath = "/app/monorepo/libs/langchain-google-vertexai/p const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); -if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.dependencies["@langchain/core"].includes("rc")) { +if (currentPackageJson.peerDependencies["@langchain/core"] && !currentPackageJson.peerDependencies["@langchain/core"].includes("rc")) { const minVersion = semver.minVersion( - currentPackageJson.dependencies["@langchain/core"] + currentPackageJson.peerDependencies["@langchain/core"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/core": minVersion, - }; - currentPackageJson.dependencies = { - ...currentPackageJson.dependencies, + currentPackageJson.peerDependencies = { + ...currentPackageJson.peerDependencies, "@langchain/core": minVersion, }; } +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; +} + if (currentPackageJson.dependencies["@langchain/google-gauth"] && !currentPackageJson.dependencies["@langchain/google-gauth"].includes("rc")) { const minVersion = semver.minVersion( currentPackageJson.dependencies["@langchain/google-gauth"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/google-gauth": minVersion, - }; currentPackageJson.dependencies = { ...currentPackageJson.dependencies, "@langchain/google-gauth": minVersion, diff --git a/dependency_range_tests/scripts/with_standard_tests/google-vertexai/test-with-latest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/google-vertexai/test-with-latest-deps.sh index 3d43d870e321..567366beb19e 100644 --- a/dependency_range_tests/scripts/with_standard_tests/google-vertexai/test-with-latest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/google-vertexai/test-with-latest-deps.sh @@ -6,11 +6,24 @@ export CI=true # New monorepo directory paths monorepo_dir="/app/monorepo" -monorepo_openai_dir="/app/monorepo/libs/langchain-google-vertexai" +monorepo_vertexai_dir="/app/monorepo/libs/langchain-google-vertexai" + +# Updater script will not live inside the monorepo +updater_script_dir="/app/updater_script" + +# Original directory paths +original_updater_script_dir="/scripts/with_standard_tests/google-vertexai/node" # Run the shared script to copy all necessary folders/files bash /scripts/with_standard_tests/shared.sh google-vertexai +mkdir -p "$updater_script_dir" +cp "$original_updater_script_dir"/* "$updater_script_dir/" +cd "$updater_script_dir" +# Update any workspace dep to the latest version since not all workspaces are +# available in the test enviroment. +node "update_resolutions_latest.js" + # Navigate back to monorepo root and install dependencies cd "$monorepo_dir" yarn @@ -18,5 +31,7 @@ yarn # Navigate into `@langchain/google-vertexai` to build and run tests # We need to run inside the google-vertexai directory so turbo repo does # not try to build the package/its workspace dependencies. -cd "$monorepo_openai_dir" +cd "$monorepo_vertexai_dir" + +yarn add @langchain/core @langchain/google-gauth yarn test diff --git a/dependency_range_tests/scripts/with_standard_tests/google-vertexai/test-with-lowest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/google-vertexai/test-with-lowest-deps.sh index a8de92d9b983..23dcf3ba0d82 100644 --- a/dependency_range_tests/scripts/with_standard_tests/google-vertexai/test-with-lowest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/google-vertexai/test-with-lowest-deps.sh @@ -5,7 +5,7 @@ set -euxo pipefail export CI=true monorepo_dir="/app/monorepo" -monorepo_openai_dir="/app/monorepo/libs/langchain-google-vertexai" +monorepo_vertexai_dir="/app/monorepo/libs/langchain-google-vertexai" updater_script_dir="/app/updater_script" updater_script_dir="/app/updater_script" original_updater_script_dir="/scripts/with_standard_tests/google-vertexai/node" @@ -31,5 +31,11 @@ yarn # Navigate into `@langchain/package` to build and run tests # We need to run inside the package directory so turbo repo does # not try to build the package/its workspace dependencies. -cd "$monorepo_openai_dir" +cd "$monorepo_vertexai_dir" + +# Read the @langchain/core version from peerDependencies +core_version=$(node -p "require('./package.json').peerDependencies['@langchain/core']") + +# Install @langchain/core at the specified version +yarn add @langchain/core@$core_version yarn test diff --git a/dependency_range_tests/scripts/with_standard_tests/node/update_workspace_dependencies.js b/dependency_range_tests/scripts/with_standard_tests/node/update_workspace_dependencies.js index 755700a9c749..2d769e5d0082 100644 --- a/dependency_range_tests/scripts/with_standard_tests/node/update_workspace_dependencies.js +++ b/dependency_range_tests/scripts/with_standard_tests/node/update_workspace_dependencies.js @@ -14,7 +14,7 @@ if (currentPackageJson.dependencies["@langchain/core"]) { if (currentPackageJson.devDependencies["@langchain/scripts"]) { currentPackageJson.devDependencies = { ...currentPackageJson.devDependencies, - "@langchain/scripts": "latest", + "@langchain/scripts": "*", }; } diff --git a/dependency_range_tests/scripts/with_standard_tests/openai/node/update_resolutions_latest.js b/dependency_range_tests/scripts/with_standard_tests/openai/node/update_resolutions_latest.js new file mode 100644 index 000000000000..c402ea87ed7d --- /dev/null +++ b/dependency_range_tests/scripts/with_standard_tests/openai/node/update_resolutions_latest.js @@ -0,0 +1,11 @@ +const fs = require("fs"); + +const communityPackageJsonPath = "/app/monorepo/libs/langchain-openai/package.json"; +const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); + +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; + currentPackageJson.peerDependencies["@langchain/core"] = "latest"; +} + +fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/openai/node/update_resolutions_lowest.js b/dependency_range_tests/scripts/with_standard_tests/openai/node/update_resolutions_lowest.js index d54d62d708e7..ed5b19175245 100644 --- a/dependency_range_tests/scripts/with_standard_tests/openai/node/update_resolutions_lowest.js +++ b/dependency_range_tests/scripts/with_standard_tests/openai/node/update_resolutions_lowest.js @@ -5,18 +5,18 @@ const communityPackageJsonPath = "/app/monorepo/libs/langchain-openai/package.js const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); -if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.dependencies["@langchain/core"].includes("rc")) { +if (currentPackageJson.peerDependencies["@langchain/core"] && !currentPackageJson.peerDependencies["@langchain/core"].includes("rc")) { const minVersion = semver.minVersion( - currentPackageJson.dependencies["@langchain/core"] + currentPackageJson.peerDependencies["@langchain/core"] ).version; - currentPackageJson.overrides = { - ...currentPackageJson.overrides, - "@langchain/core": minVersion, - }; - currentPackageJson.dependencies = { - ...currentPackageJson.dependencies, + currentPackageJson.peerDependencies = { + ...currentPackageJson.peerDependencies, "@langchain/core": minVersion, }; } +if (currentPackageJson.devDependencies["@langchain/core"]) { + delete currentPackageJson.devDependencies["@langchain/core"]; +} + fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); diff --git a/dependency_range_tests/scripts/with_standard_tests/openai/test-with-latest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/openai/test-with-latest-deps.sh index 69bb581e414a..2080ec786467 100644 --- a/dependency_range_tests/scripts/with_standard_tests/openai/test-with-latest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/openai/test-with-latest-deps.sh @@ -8,9 +8,22 @@ export CI=true monorepo_dir="/app/monorepo" monorepo_openai_dir="/app/monorepo/libs/langchain-openai" +# Updater script will not live inside the monorepo +updater_script_dir="/app/updater_script" + +# Original directory paths +original_updater_script_dir="/scripts/with_standard_tests/openai/node" + # Run the shared script to copy all necessary folders/files bash /scripts/with_standard_tests/shared.sh openai +mkdir -p "$updater_script_dir" +cp "$original_updater_script_dir"/* "$updater_script_dir/" +cd "$updater_script_dir" +# Update any workspace dep to the latest version since not all workspaces are +# available in the test enviroment. +node "update_resolutions_latest.js" + # Navigate back to monorepo root and install dependencies cd "$monorepo_dir" yarn @@ -19,4 +32,6 @@ yarn # We need to run inside the openai directory so turbo repo does # not try to build the package/its workspace dependencies. cd "$monorepo_openai_dir" + +yarn add @langchain/core yarn test diff --git a/dependency_range_tests/scripts/with_standard_tests/openai/test-with-lowest-deps.sh b/dependency_range_tests/scripts/with_standard_tests/openai/test-with-lowest-deps.sh index 91536708b13c..6f47d13e8aa1 100644 --- a/dependency_range_tests/scripts/with_standard_tests/openai/test-with-lowest-deps.sh +++ b/dependency_range_tests/scripts/with_standard_tests/openai/test-with-lowest-deps.sh @@ -32,4 +32,10 @@ yarn # We need to run inside the package directory so turbo repo does # not try to build the package/its workspace dependencies. cd "$monorepo_openai_dir" + +# Read the @langchain/core version from peerDependencies +core_version=$(node -p "require('./package.json').peerDependencies['@langchain/core']") + +# Install @langchain/core at the specified version +yarn add @langchain/core@$core_version yarn test diff --git a/docs/api_refs/scripts/create-entrypoints.js b/docs/api_refs/scripts/create-entrypoints.js index 6ffd4d34a056..9f51f27fa1b2 100644 --- a/docs/api_refs/scripts/create-entrypoints.js +++ b/docs/api_refs/scripts/create-entrypoints.js @@ -28,7 +28,7 @@ const BASE_TYPEDOC_CONFIG = { name: "LangChain.js", skipErrorChecking: true, exclude: ["dist"], - hostedBaseUrl: "https://v02.api.js.langchain.com/", + hostedBaseUrl: "https://v03.api.js.langchain.com/", entryPointStrategy: "packages", }; diff --git a/docs/api_refs/scripts/typedoc-plugin.js b/docs/api_refs/scripts/typedoc-plugin.js index d3eae80196ab..b32db37d77d6 100644 --- a/docs/api_refs/scripts/typedoc-plugin.js +++ b/docs/api_refs/scripts/typedoc-plugin.js @@ -67,7 +67,8 @@ const SCRIPT_HTML = `