mirror of https://github.com/hwchase17/langchain
master
v0.2
wfh/toks
bagatur/enable_azure_feats
cc/extended_tests
eugene/add_memory_equivalents
v0.1
isaac/toolerrorpassing
cc/release_mongo
eugene/robocorp
eugene/foo
eugene/pydantic_v1_foo
erick/community-release-0-2-17
erick/docs-mdx-v3-compat-wip
eugene/update_is_caller_internal
isaac/toolerrorhandling03
bagatur/des_from_path
bagatur/v0.3/preview_api_ref
bagatur/run_tutorials
bagatur/run_all_docs_how_to
isaac/toolerrorhandling
bagatur/rfc_docs_gha
eugene/foo_meow
bagatur/fix_embeddings_filter_init
wfh/keyword_runnable_like_bu
eugene/add_mypy_plugin
eugene/v0.3_wut
bagatur/core_0_3_0_dev1
bagatur/v0.3rc_merge_master_2
bagatur/v0.3rc_merge_master
eugene/core_0.3rc_first
bagatur/oai_emb_fix
isaac-recursiveurlloader-testing
harrison/3.0
bagatur/core_pydocstyle_lint
harrison/support-kwargs-vectorstore
wfh/more_interops
bagatur/format_content_as
erick/community-undo-azure-ad-access-token-breaking-change
isaac/responseformatstuff
bagatur/delight
erick/ai21-integration-test-fixes
erick/all-more-lint-additions
erick/infra-continue-on-error
erick/ai21-address-breaking-changes-in-sdk-2-14-0-wip
bagatur/rfc_anthropic_cache_usage
bagatur/json_mode_standard
bagatur/dict_msg_tmpl2
wfh/nowarn
bagatur/rfc_dont_update_run_name
bagatur/oai_disabled_params
jacob/templates
bagatur/content_block_template
erick/chroma-fix-typing
isaac/moreembeddingtests
eugene/openai_0.3
bagatur/standard_tests_async
eugene/merge_pydantic_3_changes
eugene/0.3_release_docs
cc/deprecate_evaluators
bagatur/selector_add_examples
bagatutr/langsmith_example_selector
docs/fix_chat_model_os
eugene/security_related
eugene/add_async_api
eugene/integration_docs_cohere
eugene/multimodal_embedding_model
isaac/moretooltables
bagatur/merged_docs_styling
eugene/clean_up_pre_init
eugene/v0.3_meow
bagatur/serialize-pydantic-metadata
eugene/fix_tool_extra
erick/infra-pydantic-v2-scheduled-testing
bagatur/add_pydantic_sys_info
eugene/community_draft
cc/fix_exp_ci
eugene/pydantic_v_3
erick/docs-llm-embed-index-tables-wip
eugene/update_llm_result_types
eugene/add_json_schema_methods
bagatur/docs_versioning
bagatur/simplify_docs_header_footer
bagatur/docs_cp_ls_theme
erick/cli-new-template-types
isaac/ollamauniversalchat
isaac/llmintegrationtests
bagatur/fewshot_scratch
isaac/ollamallmfix
wfh/warn_name
eugene/add_indexer_to_retriever
bagatur/07_26_24/poetry_lock
cc/toolkits
erick/docs-new-integrations-docs
cc/api_chain
wfh/link
eugene/rate_limiting_requests
eugene/add_rate_limiter_integrations
isaac/ollamaimageissues
cc/many_tools_guide
eugene/update_relative_imports
eugene/add_timeout_for_tests
isaac/tavilynewlinefix
isaac/create_react_agent_doc_fix
eugene/add_tests_for_pydantic_models
eugene/document_indexer_v2
bagatur/ruff_0_5_3
wfh/parent
wfh/async_chromium
erick/infra-try-removing-uv-for-editable-install
eugene/indexing_abstraction_minimal
jacob/currying_docs
jacob/curry_tools
eugene/indexing_abstraction
wfh/triggered
cc/bind_tools
jacob/docs_style
isaac/fewshotpromptdocs
eugene/migrate_graphvectorstore_to_community
jacob/tools_additional_params
wfh/curry
wfh/inherit
eugene/stores_new
bagatur/rfc_tool_call_id_in_config
bagatur/docs_intro_wording
bagatur/lint_all_core_deps
eugene/update_add_texts
eugene/index_manager
eugene/tracing_interop2
eugene/migrate_vectorstores
eugene/cleanup_deprecated_code
wfh/is_error
eugene/root_validators_02
eugene/root_validators_03
eugene/pinecone_add_standard_tests
eugene/indexing_v2
wfh/url
bagatur/rfc_configurable_model
cc/tool_token_counts
renderer
bagatur/mypy_v1_update
wfh/add_list_support
bagatur/rfc_tool_call_filter
erick/anthropic-release-0-1-16
wfh/add_tool_param_descripts_2
wfh/add_tool_param_descripts
nc/19jun/core-no-pydantic
bagatur/opinionated_formatter
bagatur/rfc_docstring_lint
cc/fix_milvus
cc/update_pydantic_dep
maddy/support-options-in-langchainhub
isaac/chatopenaiparalleltoolcallingparam
erick/huggingface-relax-tokenizers-dep
rlm/test-llama-cpp
bagatur/retrieval_v2_scratch
erick/core-loosen-packaging-lib-version
eugene/disable_lint_rule
eugene/get_model_defaults
wfh/allyourtreesarebelongtome
eugene/pydantic_migration_2_b
isaac/sitemaploader-goldendocs
bagatur/recursive_url_bash
erick/docs-update-chatbedrock-with-tool-calling-docs-dont-use
erick/docs-update-chatbedrock-with-tool-calling-docs-do-not-use
isaac/sitemaploader-testing
isaac/sitemaploader-tests
eugene/pydantic_migration_2
erick/core-throw-error-on-invalid-alternative-import-in-deprecated
erick/core-throw-errors-on-invalid-alternative-import
bagatur/rfc_smithify_docs
eugene/async_history_2
bagatur/ai21_0_1_6
erick/docs-rewrite-contributor-docs
cc/update_openai_streaming_token_counts
eugene/llm_token_counts
eugene/langchain_how_to_config
bagatur/docs-format-api-ref
eugene/callbacks_propagate
erick/docs-v02-url-rfc
maddy/default-prompt-private-in-hub
eugene/update_version_docs
bagatur/parse_tool_docstring_fix
erick/docs-algolia-api-key-update
eugene/how_does_this_stream
eugene/langchain_core_manager
eugene/update_linting
erick/docs-ignore-echo-false-blocks
dqbd/api_ref_styles
erick/infra-codespell-v1
erick/infra-codespell-in-v1-branch
erick/community-release-0-2-0rc1
eugene/add_change_log2
harrison/new-docs
cc/retriever_score
bagatur/community_0_0_37
wfh/may3/help
eugene/core_0.2.0rc1
cc/docs_build
eugene/update_warnings2
bagatur/oai_tool_choice_required
cc/fix_openai
wfh/add_rid_to_chain
eugene/migrate_document_loaders
bagatur/mistral_client
wfh/add_parameter_descriptions
erick/core-remove-batch-size-from-llm-start-callbacks
eugene/refactor_deprecations
eugene/release_0_2_0
eugene/web_retriever
eugene/move_memories_2
bagatur/tryout_uv
eugene/entity_store
eugene/run_type_for_lambdas
bagatur/rfc_standardize_input_msgs
bagatur/rfc_serialized_tool
brace/show-last-update-docs
erick/release-note-experiments
eugene/runnable_config
cc/function_message
rlm/rag_eval_guide
bagatur/rfc_token_usage
eugene/custom_embeddings
eugene/community_fix_imports
bagatur/goog_doc_nit
erick/docs-runnable-list-operations
bagatur/rm_convert_to_tool_docs
eugen/providers_update
erick/core-deprecate-vectorstore-relevance-scoring
eugene/outline_wrapper_1
erick/pytest-experiments-2
erick/pytest-experiments
erick/partner-cloudflare
rlm/langsmith_testing
erick/community-patch-clickhouse-make-it-possible-to-not-specify-index
eugene/postgres_vectorstore
bagatur/openllm_new_api
bagatur/layerupai
cc/deprecated_imports
erick/cohere-adaptive-rag-cookbook
erick/cohere-multi-tool-integration-test
dqbd/openai-lax-jsonschema
eugene/xml_again
brace/format-dpcs
eugene/pull_to_funcs
bagatur/fix_getattr
erick/core-patch-placeholder-message-shorthand
bagatur/0.2
eugene/unsafe_pydantic
bagatur/community_migration_script
bagatur/versioned_docs_2
bagatur/versioned_docs
bagatur/find_broken_links
bagatur/stream_pydantic
wfh/add_hub_version
eugene/stackframe
wfh/log_error
wfh/add_eval_metadata
erick/airbyte-patch-baseloader-wip
bagatur/rename_msg_kwargs
wfh/specify_version
fork/feature_audio_loader_auzre_speech
erick/infra-remove-venv-from-poetry-cache
erick/ci-test-timeout
erick/test-community-ci
erick/test-ci
wfh/add_warnings
eugene/huggingface
erick/core-patch-community-patch-baseloader-to-core
erick/core-minor-multimodal-document-page-content-rfc
bagatur/support_pydantic_context
bagatur/rfc_structured_list
erick/test-partner-failure
erick/test-partner-success
erick/test-error
eugene/fix_openai_community_stream
erick/test-ci-should-fail
erick/testutils
jacob/people
erick/docs-remove-platforms-redirect
eugene/add_people
erick/infra-check-min-versions-in-pr-ci
langchain-ai/langchain@5cbabbd
eugene/test_lint
erick/exa-lint
bagatur/make_cohere_client_optional
bagatur/rfc_as_str
erick/infra--individual-template-ci-
bagatur/rfc_@chain_typing
erick/infra-try-1-job-sphinx-build
rlm/mistral_cookbook
bagatur/rfc_chat_invoke_llm_res
erick/infra-rtd-build-bump-null
erick/infra-rtd-build-bump
erick/autoapi-test
bagatur/speedup_sphinx
erick/community-lint
erick/partner-nomic
erick/cli-langchain-dep-versions
bagatur/init_chat_prompt_msg_like
wfh/custom_prompt
fork/async-doc-loader
rlm/rag_from_scratch
eugene/message_history_test
erick/api-ref-navbar-update
bagatur/rfc_bind_collision
bagatur/bind_outside_agent
erick/release-notes
jacob/chatbot_message_passing
bagatur/3_12_ci
bagatur/assign_unpack
bagatur/docs_top_nav
bagatur/batch_overload_typing
bagatur/core_0_1_15_rc_1
bagatur/rfc_rich_retrieval
bagatur/runnable_drop
bagatur/class_chain
bagatur/initial_tool_choices
eugene/streaming_events
erick/core-patch-fallbacks-error-chain
harrison/tool-invocation
bagatur/tool_executor
erick/deepinfra-chat
eugene/agents_docs
eugene/update_index.md
bagatur/rfc_tool_executor
bagatur/rfc_extraction_improvement
bagatur/downgrade_setup_python
erick/mistralai-patch-enforce-stop-tokens
bagatur/thread_inof
bagatur/docs_last_updated_2
bagatur/docs_last_updated
erick/google-docs
dqbd/json-output-oai-parser-serialization
bagatur/cli_pkg_tmpl_lc_ver
erick/infra-try-show-last-update-time
bagatur/try_stat
bagatur/core_tracer_backwards_compat
erick/infra-ci-python-matrix-update-3-12
bagatur/rfc_retriever_return_str
do-not-merge
bagatur/dispatch_main_ci
bagatur/show_last_update_time
harrison/docs-m
harrison/docs-revamp-mirror
harrison/new-docs-revamp
harrison/agents-rewrite-code
bagatur/api_flyout
harrison/revamp-memory
harrison/merged-branches
bagatur/stuff_docs_lcel
harrison/agent-docs-concepts
harrison/agent-docs-custom
bagatur/api-ref-navbar-update
bagatur/combine_docs_chain_as_runnable
erick/ci-test-do-not-merge
bagatur/chat_hf
erick/infra--run-ci-on-all-prs-
bagatur/core_update_ruff_mypy
erick/nbconvert
bagatur/lc_stack_update
wfh/bind_tools
eugene/fix_xml_agent
harrison/anthropic-package
wfh/vertexai_fixup
bagatur/core_0_0_13
wfh/add_oai_agent_core_examples
erick/docs-bullet-points
wfh/gemini
eugene/bug_history
bagatur/community
harrison/turn-off-serializable
harrison/serializable-baga
wfh/prevent_outside
harrison/mongo-agent
erick/all-patch---change-ci-title-in-event-of-no-matrix-expansion-
rlm/update-img-prompt
eugene/update_file_chat_memory
harrison/deepsparse
bagatur/core_0.1
harrison/integrations
erick/docs-docusaurus-3
rlm/mm-rag-deck
bagatur/core_lint_docstring
bagatur/core_0_0_8
bagatur/lcel_get_started
bagatur/fmt_notebooks
bagatur/export_prompt_chat_classes
harrison/add-imports
bagatur/serialization_tests
bagatur/patch_0.0.400
wfh/tqdm_for_wait
bagatur/fix_core_namespace
erick/core-namespace-same
erick/api-docs-core-bugfix-
brace/new-lc-stack-svg
wfh/tqdm_wait
v0.0.339
bagatur/cogniswitch
dqbd/docs-responsivity-fix
bagatur/multi_return_source
wfh/func_eval
bagatur/full_template_docs
bagatur/callbacks-refactor
(vectorstore)/PGVectorAsync
rlm/mm_template
bagatur/rfc_bind_getattr
erick/skip-release-check-cli
bagatur/rm_return_direct_error
rlm/sql-pgvector-template
erick/improvement-format-notebooks
erick/improvement-default-docs-url-root
bagautr/rfc_image_template
refactorChromaInitLogic
rlm/ollama_json
bagatur/rfc_pinecone_hybrid
eugene/document_runnables2
harrison/root-listeners
wfh/add_llm_output_to_adapter
rlm/biomedical-rag
bagatur/cohere_input_type
bagatur/update-schema
erick/cli-codegen
wfh/content_union
bagatur/docs_smith_serve
rlm/open_clip_embd_expt
rlm/multi-modal-template
wfh/ossinvoc
pg/test-publish-rc-versions
wfh/conversational_feedback
bagatur/voyage-ai
template-readme-missing-env
rescana-com/master
bagatur/lakefs-loader
bagatur/readthedocs-loader-improvements
hwchase17-patch-1
eugene/fix_type_onbase_transformer
bagatur/deep_memory_version_1
api-reference-agents-functions
erick/cli-ci
bagatur/retry_nit
wfh/tree_distance
jacoblee93-patch-1-1
wfh/runnable_traceable
bagatur/rfc_chat_batch_gen
rlm/text-to-pgvector
bagatur/e2b-integration2
bagatur/api-reference-agents-functions
shorthills-ai/master
bagatur/e2b-integration
wfh/save_model_name
bagatur/voyage
rlm/LLaMA2_sql_scrub
bagatur/cogniswitch_chains
bagatur/private_fn
erick/langservehub
bagatur/rfc_vecstore_interface
nc/repl-lib
charlie/fine-tuning-notebook
harrison/move-imports
wfh/rtds
wfh/json_schema_evaluator
pg/python-3.12
wfh/eval_public_dataset
ankush/single-generations
nc/pandas-eval
eugene/update_warning_class
ankush/single-input
ankush/delete_v1_tracer
wfh/background
bagatur/bump_304
bagatur/dedup_transformer
eugene/fix_webbase_loader
harrison/move-pydantic-v1
wfh/vectorstore_tracing
vdaas-feature/vald
harrison/agents-exoskelton-1
harrison/agents-exoskeleton
jacob/routing_cookbook
harrison/more-imports
harrison/remove-from-init
eugene/automaton_variant_4
harrison/specified-input-keys
bagatur/docs_zoom
jacob/feature_vercel_analytics
wfh/update_types
francisco/sql_agent_improvements
wfh/implicit_client
bagatur/auto_rewrite_retrieval
bagatur/konko
eugene/automaton_variant_3
wfh/default_retries
bagatur/lint_fix
rlm/fix-prompts
wfh/redirects
eugene/automaton_variant_2
bagatur/fix_multiquery
wfh/json_other
wfh/fix_link
bagatur/add-data-anonymizer
bagatur/mem_session
molly/vectorstore-batching
deepsense-ai/llama-cpp-grammar
bagatur/gpt_4_docstring
harrison/add-llm-kwargs
bagatur/redis_refactor
rlm/llama-grammar
bagatur/runnable_mem
wfh/clirun
eugene/document_pipeline
harrison/retrieval-agents
bagatur/rfc_fallback_inherit
bagatur/epsilla
bagatur/promptguard
harrison/pydantic-bridge
bagatur/cheatsheet
wfh/update_criteria_prompt
pydantic/b2_bump
eugene/pydantic_v2_tools2
wfh/criteria_strat
eugene/wrap_openapi_stuff
bagatur/bump_264
bagatur/new_msg
rlm/agent_use_case
harrison/remove-things-from-init
harrison/clean-up-imports
bagatur/lite_llm
bagatur/rfc_zep_search
bagatur/pydantic_agnostic
bagatur/bagel
bagatur/fix_sched_2
wfh/async_eval_default
bagatur/respect_light_mode
bagatur/docsly
eugene/automaton_variant_1
wfh/return_exceptions
wfh/example_id_config
bagatur/rm_nuclia_ext
wfh/fix_recursive_url_loader
bagatur/runnable_locals
wfh/embeddings_callbacks_v3
bagatur/google_drive
rlm/chatbots_use_case
wfh/langsmith_nopydantic
eugene/enum_rendering
harrison/add-memory-to-sql
bagatur/rfc_fallbacks
harrison/xml-agent
bagatur/mod_desc
wfh/memory_interface
wfh/throw_on_broken_links
eugene/expand_documentation
wfh/api_ref
wfh/swizzle
eugene/test
harrison/async-web
harrison/fix-typo
wfh/retriever_additional_data
harrison/experimental-package
bagatu/rfc_pkg_per_chain
wfh/default_data_type
harrison/move-to-schema/chain
harrison/move-to-schema-more-callbacks
wfh/to_prompt_template
wfh/not_implemented
wfh/limit_concurrency
wfh/delete_deprecated
harrison/move_to_core
harrison/move-to-core/prompts
wfh/add_agent_trajectory_loader
ankush/message-eval
harrison/variable-table
wfh/skip_no_output
harrison/apply-async
harrison/improve-docs-formatting
vwp/embedding_fuzzy
wfh/evals_docs_reorg_draft
vwp/comparison_with_references
wfh/comparison_with_references
harrison/split-schema-dir
vwp/accept_no_reasoning
wfh/embeddings_callbcaks
vwp/fix_promptlayer
wfh/key_matching
harrison/marqo
vwp/make_new_eval_chain_run
vwp/any_callable
vwp/time_to_first_token
vwp/accept_chain
vwp/evals_docs_reorg
vwp/similarity
vwp/use_langsmith
vwp/rm_dep
vwp/script_for_adding_docs
octoml/master
harrison/set-pydantic-docs
harrison/markdown-docs
vwp/drafts/unit_testing
harrison/functions
ankush/asyncio-gather-agenerate
vwp/retriever_callbacks_v2
vwp/schema_dir
harrison/allow-kwargs
eugene/persistence_db
vwp/anthropic_token_usage
vwp/evaluator_chains
vwp/envurl
eugene/research_v1
eugene/chain_generics
harrison/neo4j-lint
ankush/callbacks-cleanup
dev2049/pgvector_fix
harrison/anthropic-chat
vwp/simplify_tracer2
vwp/simplify_tracer
harrison/schema-directory
harrison/comp-prompt
dev2049/rough_draft_doc_manager
vwp/child_runs
ankush/chat-agent-parsing
dev2049/combine_quickstart
dev2049/concise_get_started
vwp/feedback_crud
harrison/exclude-embedings
dev2049/azure_vecstore
vwp/base_model
dev2049/getting_started_clean
dev2049/change_llm_name
dev2049/embedding_rename
eugene/prompt_template
harrison/serialize-chat
dev2049/embed_docs_to_texts
dev2049/doc_clean
dev2049/chroma_cleanup
harrison/few-shot-w-template-fix
retrievalqafinetune
dev2049/retrieval_eval
vwp/tracing_docs
vwp/bold_headergs
eugene/add_file_system
harrison/return-prompt
vwp/tracer-async-call
eugene/check_something
dev2049/combine_refac
eugene/updat_extended_tests
eugene/meow_draft
eugene/fix_google_palm_tests
vwp/dcv2
eugene/retriever_version
tjaffri/dgloader
harrison/pdfplumber
vwp/patch
harrison/character-chat-agent
harrison/mongo-loader
harrison/sharepoint
eugene/add_caching_from_master_only
dev2049/save-to-notion-tool
dev2049/self_query_integration
dev2049/update_lock
eugene/revert_workflows
revert-4465-harrison/env-var
dev2049/pgvector-size-fix
vwp/eval_examples
fork-chains
eugene/test_branch
vwp/add-github-api-utility
vwp/from_llm_and_tools
vwp/pandas_cb_manager
add-scenexplain-tool
vwp/tools_callbacks
vwp/relax_chat_agent
vwp/parser__type
vwp/filter_ambiguous_args
harrison/get-working-with-agents
dev2049/null_callback_hack
dev2049/llm_requests_chain
vwp/test_on_built_wheel
vwp/avoid_poetry_deps_in_ci
eugene/openai_optional
vwp/agent_tests
vwp/structured_tools
vwp/align_search_tools
vwp/structured_tools_with_pyd
vwp/inheritance_same_agents
vwp/chatregtests
dev2049/default_models
dev2049/perfect_retriever
dev2049/docs_stateful
vwp/add_args
khimaros/master
vwp/chroma_elements
vwp/default_dont_raise
vwp/lintfix
harrison/anthropic
dev2049/retrieval_eval_nb
harrison/contextual-compression
vwp/marathon
agents-4-18
harrison-outerr-exc
vwp/hf_image_gen
vwp/hf_imagen
vwp/tools_undo
vwp/characters_2
vwp/tools-refactor-2
harrison/autogpt
harrison/typeo
dev2049/fmt_nbs
vwp/numexpr
harrison/characters-nb
vwp/characters_with_planning
harrison/pinecone-backwards-compat
vwp/openapi_with_tool_retrieval
harrison/aws-text
ankush/patch1
harrison/processor
harrison/script-update
harrison/api-chain
harrison/ai21-embeddings
harrison/alpaca
nc/poe-handler-chat-model
nc/poe-handler
harrison/mrkl-parser
harrison/agent-experiments
harrison/replicate
harrison/chat-chain
harrison/update-wandb
harrison/debug
harrison/qasper
harrison/dbpedia
harrison/changes
jeremy/guardrails
nc/guardrails-error-handling
harrison/guardrails
harrison/use-output-parsers
John-Church-guard
agent_evaluation
harrison/kor-chain
harrison/inference-api
ankush/callback-refactor
harrison/eval
harrison/audio
ankush/prompt-abstractions
harrison/memory-chat
harrison/indexes
ankush/partial-prompt-apply
harrison/sagemaker
harrison/datetime
harrison/openapiagent
harrison/paged-pdf
harrison/pswsl
ankush/example-runner
harrison/guards
scad/api-chain
harrison/prompt-bugs
harrison/sql-agent
harrison/pinecone-try-except
harrison/callback-updates
harrison/map-rerank
harrison/combine-docs-parse
harrison/azure-rfc
harrison/sequential_chain_from_prompts
harrison/agent-refactor
harrison/agent_intermediate_steps
harrison/agent_multi_inputs
harrison/promot-mrkl
harrison/fix_logging_api
harrison/use_output_parser
harrison/track_intermediate_steps
harrison/sql_error
harrison/logging_to_file
harrison/output_parser
harrison/flexible_model_args
harrison/agent-improvements
harrison/router_docs
harrison/docs
samantha/add_llm_to_example
harrison/reorg_smart_chains
mako-templates
harrison/save_metadatas
harrison/router
harrison/custom_pipeline
harrison/chain_pipeline
harrison/prompts_docs
harrison/attempt_citing_in_prompt
harrison/load_prompt
harrison/prompts_take_2
harrison/ape
harrison/prompt_examples
harrison/add_dependencies
langchain-ai21==0.1.4
langchain-ai21==0.1.5
langchain-ai21==0.1.6
langchain-ai21==0.1.7
langchain-airbyte==0.1.1
langchain-anthropic==0.1.12
langchain-anthropic==0.1.13
langchain-anthropic==0.1.14rc1
langchain-anthropic==0.1.14rc2
langchain-anthropic==0.1.15
langchain-anthropic==0.1.16
langchain-anthropic==0.1.17
langchain-anthropic==0.1.18
langchain-anthropic==0.1.19
langchain-anthropic==0.1.20
langchain-anthropic==0.1.21
langchain-anthropic==0.1.22
langchain-anthropic==0.1.23
langchain-anthropic==0.2.0
langchain-anthropic==0.2.0.dev0
langchain-anthropic==0.2.0.dev1
langchain-anthropic==0.2.1
langchain-azure-dynamic-sessions==0.1.0
langchain-azure-dynamic-sessions==0.1.0rc0
langchain-azure-dynamic-sessions==0.2.0
langchain-box==0.1.0
langchain-box==0.2.0
langchain-chroma==0.1.1
langchain-chroma==0.1.2
langchain-chroma==0.1.4
langchain-cli==0.0.22
langchain-cli==0.0.23
langchain-cli==0.0.24
langchain-cli==0.0.25
langchain-cli==0.0.26
langchain-cli==0.0.27
langchain-cli==0.0.28
langchain-cli==0.0.29
langchain-cli==0.0.30
langchain-cli==0.0.31
langchain-community==0.0.35
langchain-community==0.0.36
langchain-community==0.0.37
langchain-community==0.0.38
langchain-community==0.2.0
langchain-community==0.2.0rc1
langchain-community==0.2.1
langchain-community==0.2.10
langchain-community==0.2.11
langchain-community==0.2.12
langchain-community==0.2.13
langchain-community==0.2.14
langchain-community==0.2.15
langchain-community==0.2.16
langchain-community==0.2.17
langchain-community==0.2.2
langchain-community==0.2.3
langchain-community==0.2.4
langchain-community==0.2.5
langchain-community==0.2.6
langchain-community==0.2.7
langchain-community==0.2.9
langchain-community==0.3.0
langchain-community==0.3.0.dev1
langchain-community==0.3.0.dev2
langchain-core==0.1.47
langchain-core==0.1.48
langchain-core==0.1.50
langchain-core==0.1.51
langchain-core==0.1.52
langchain-core==0.2.0
langchain-core==0.2.0rc1
langchain-core==0.2.1
langchain-core==0.2.10
langchain-core==0.2.11
langchain-core==0.2.12
langchain-core==0.2.13
langchain-core==0.2.15
langchain-core==0.2.16
langchain-core==0.2.17
langchain-core==0.2.18
langchain-core==0.2.19
langchain-core==0.2.2
langchain-core==0.2.20
langchain-core==0.2.21
langchain-core==0.2.22
langchain-core==0.2.23
langchain-core==0.2.24
langchain-core==0.2.25
langchain-core==0.2.26
langchain-core==0.2.27
langchain-core==0.2.28
langchain-core==0.2.29
langchain-core==0.2.29rc1
langchain-core==0.2.2rc1
langchain-core==0.2.3
langchain-core==0.2.30
langchain-core==0.2.31
langchain-core==0.2.32
langchain-core==0.2.33
langchain-core==0.2.34
langchain-core==0.2.35
langchain-core==0.2.36
langchain-core==0.2.37
langchain-core==0.2.38
langchain-core==0.2.39
langchain-core==0.2.4
langchain-core==0.2.40
langchain-core==0.2.5
langchain-core==0.2.6
langchain-core==0.2.7
langchain-core==0.2.8
langchain-core==0.2.9
langchain-core==0.3.0
langchain-core==0.3.0.dev1
langchain-core==0.3.0.dev2
langchain-core==0.3.0.dev3
langchain-core==0.3.0.dev4
langchain-core==0.3.0.dev5
langchain-core==0.3.1
langchain-couchbase==0.0.1
langchain-couchbase==0.1.0
langchain-couchbase==0.1.1
langchain-exa==0.1.0
langchain-exa==0.2.0
langchain-experimental==0.0.58
langchain-experimental==0.0.59
langchain-experimental==0.0.60
langchain-experimental==0.0.61
langchain-experimental==0.0.62
langchain-experimental==0.0.63
langchain-experimental==0.0.64
langchain-experimental==0.0.65
langchain-experimental==0.3.0
langchain-experimental==0.3.0.dev1
langchain-fireworks==0.1.3
langchain-fireworks==0.1.4
langchain-fireworks==0.1.5
langchain-fireworks==0.1.6
langchain-fireworks==0.1.7
langchain-fireworks==0.2.0
langchain-fireworks==0.2.0.dev0
langchain-fireworks==0.2.0.dev1
langchain-fireworks==0.2.0.dev2
langchain-groq==0.1.10
langchain-groq==0.1.4
langchain-groq==0.1.5
langchain-groq==0.1.6
langchain-groq==0.1.8
langchain-groq==0.1.9
langchain-groq==0.2.0
langchain-groq==0.2.0.dev0
langchain-groq==0.2.0.dev1
langchain-huggingface==0.0.1
langchain-huggingface==0.0.2
langchain-huggingface==0.0.3
langchain-huggingface==0.1.0
langchain-huggingface==0.1.0.dev1
langchain-ibm==0.1.5
langchain-ibm==0.1.6
langchain-ibm==0.1.7
langchain-ibm==0.1.8
langchain-ibm==0.1.9
langchain-milvus==0.1.0
langchain-milvus==0.1.1
langchain-milvus==0.1.2
langchain-milvus==0.1.3
langchain-milvus==0.1.4
langchain-milvus==0.1.5
langchain-mistralai==0.1.10
langchain-mistralai==0.1.11
langchain-mistralai==0.1.12
langchain-mistralai==0.1.13
langchain-mistralai==0.1.6
langchain-mistralai==0.1.7
langchain-mistralai==0.1.8
langchain-mistralai==0.1.9
langchain-mistralai==0.2.0
langchain-mistralai==0.2.0.dev1
langchain-mongodb==0.1.4
langchain-mongodb==0.1.5
langchain-mongodb==0.1.6
langchain-mongodb==0.1.7
langchain-mongodb==0.1.8
langchain-mongodb==0.1.9
langchain-mongodb==0.2.0
langchain-mongodb==0.2.0.dev1
langchain-nomic==0.1.0
langchain-nomic==0.1.1
langchain-nomic==0.1.2
langchain-nomic==0.1.3
langchain-ollama==0.1.0
langchain-ollama==0.1.1
langchain-ollama==0.1.2
langchain-ollama==0.1.3
langchain-ollama==0.2.0
langchain-ollama==0.2.0.dev1
langchain-openai==0.1.10
langchain-openai==0.1.11
langchain-openai==0.1.12
langchain-openai==0.1.13
langchain-openai==0.1.14
langchain-openai==0.1.15
langchain-openai==0.1.16
langchain-openai==0.1.17
langchain-openai==0.1.19
langchain-openai==0.1.20
langchain-openai==0.1.21
langchain-openai==0.1.21rc1
langchain-openai==0.1.21rc2
langchain-openai==0.1.22
langchain-openai==0.1.23
langchain-openai==0.1.24
langchain-openai==0.1.25
langchain-openai==0.1.5
langchain-openai==0.1.6
langchain-openai==0.1.7
langchain-openai==0.1.8
langchain-openai==0.1.8rc1
langchain-openai==0.1.9
langchain-openai==0.2.0
langchain-openai==0.2.0.dev0
langchain-openai==0.2.0.dev1
langchain-openai==0.2.0.dev2
langchain-pinecone==0.1.1
langchain-pinecone==0.1.2
langchain-pinecone==0.1.3
langchain-pinecone==0.2.0
langchain-pinecone==0.2.0.dev1
langchain-prompty==0.0.1
langchain-prompty==0.0.2
langchain-prompty==0.0.3
langchain-prompty==0.1.0
langchain-qdrant==0.0.1
langchain-qdrant==0.1.0
langchain-qdrant==0.1.1
langchain-qdrant==0.1.2
langchain-qdrant==0.1.3
langchain-qdrant==0.1.4
langchain-qdrant==0.2.0.dev1
langchain-robocorp==0.0.10
langchain-robocorp==0.0.10.post1
langchain-robocorp==0.0.6
langchain-robocorp==0.0.7
langchain-robocorp==0.0.8
langchain-robocorp==0.0.9
langchain-robocorp==0.0.9.post1
langchain-text-splitters==0.0.2
langchain-text-splitters==0.2.0
langchain-text-splitters==0.2.1
langchain-text-splitters==0.2.2
langchain-text-splitters==0.2.4
langchain-text-splitters==0.3.0
langchain-text-splitters==0.3.0.dev0
langchain-text-splitters==0.3.0.dev1
langchain-together==0.1.1
langchain-together==0.1.2
langchain-together==0.1.3
langchain-together==0.1.4
langchain-together==0.1.5
langchain-unstructured==0.1.0
langchain-unstructured==0.1.1
langchain-unstructured==0.1.2
langchain-unstructured==0.1.4
langchain-upstage==0.1.4
langchain-upstage==0.1.5
langchain-voyageai==0.1.1
langchain-voyageai==0.1.2
langchain==0.1.17
langchain==0.1.19
langchain==0.1.20
langchain==0.2.0
langchain==0.2.0rc1
langchain==0.2.0rc2
langchain==0.2.1
langchain==0.2.10
langchain==0.2.11
langchain==0.2.12
langchain==0.2.13
langchain==0.2.14
langchain==0.2.15
langchain==0.2.16
langchain==0.2.2
langchain==0.2.3
langchain==0.2.4
langchain==0.2.5
langchain==0.2.6
langchain==0.2.7
langchain==0.2.8
langchain==0.2.9
langchain==0.3.0
langchain==0.3.0.dev1
langchain==0.3.0.dev2
v0.0.1
v0.0.100
v0.0.101
v0.0.102
v0.0.103
v0.0.104
v0.0.105
v0.0.106
v0.0.107
v0.0.108
v0.0.109
v0.0.110
v0.0.111
v0.0.112
v0.0.113
v0.0.114
v0.0.115
v0.0.116
v0.0.117
v0.0.118
v0.0.119
v0.0.120
v0.0.121
v0.0.122
v0.0.123
v0.0.124
v0.0.125
v0.0.126
v0.0.127
v0.0.128
v0.0.129
v0.0.130
v0.0.131
v0.0.132
v0.0.133
v0.0.134
v0.0.135
v0.0.136
v0.0.137
v0.0.138
v0.0.139
v0.0.140
v0.0.141
v0.0.142
v0.0.143
v0.0.144
v0.0.145
v0.0.146
v0.0.147
v0.0.148
v0.0.149
v0.0.150
v0.0.151
v0.0.152
v0.0.153
v0.0.154
v0.0.155
v0.0.156
v0.0.157
v0.0.158
v0.0.159
v0.0.160
v0.0.161
v0.0.162
v0.0.163
v0.0.164
v0.0.165
v0.0.166
v0.0.167
v0.0.168
v0.0.169
v0.0.170
v0.0.171
v0.0.172
v0.0.173
v0.0.174
v0.0.175
v0.0.176
v0.0.177
v0.0.178
v0.0.179
v0.0.180
v0.0.181
v0.0.182
v0.0.183
v0.0.184
v0.0.185
v0.0.186
v0.0.187
v0.0.188
v0.0.189
v0.0.190
v0.0.191
v0.0.192
v0.0.193
v0.0.194
v0.0.195
v0.0.196
v0.0.197
v0.0.198
v0.0.199
v0.0.1rc0
v0.0.1rc1
v0.0.1rc2
v0.0.1rc3
v0.0.1rc4
v0.0.2
v0.0.200
v0.0.201
v0.0.202
v0.0.203
v0.0.204
v0.0.205
v0.0.206
v0.0.207
v0.0.208
v0.0.209
v0.0.210
v0.0.211
v0.0.212
v0.0.213
v0.0.214
v0.0.215
v0.0.216
v0.0.217
v0.0.218
v0.0.219
v0.0.220
v0.0.221
v0.0.222
v0.0.223
v0.0.224
v0.0.225
v0.0.226
v0.0.227
v0.0.228
v0.0.229
v0.0.230
v0.0.231
v0.0.232
v0.0.233
v0.0.234
v0.0.235
v0.0.236
v0.0.237
v0.0.238
v0.0.239
v0.0.240
v0.0.240rc0
v0.0.240rc1
v0.0.240rc4
v0.0.242
v0.0.243
v0.0.244
v0.0.245
v0.0.247
v0.0.248
v0.0.249
v0.0.250
v0.0.251
v0.0.252
v0.0.253
v0.0.254
v0.0.255
v0.0.256
v0.0.257
v0.0.258
v0.0.259
v0.0.260
v0.0.261
v0.0.262
v0.0.263
v0.0.264
v0.0.265
v0.0.266
v0.0.267
v0.0.268
v0.0.269
v0.0.270
v0.0.271
v0.0.272
v0.0.273
v0.0.274
v0.0.275
v0.0.276
v0.0.277
v0.0.278
v0.0.279
v0.0.281
v0.0.283
v0.0.284
v0.0.285
v0.0.286
v0.0.287
v0.0.288
v0.0.289
v0.0.290
v0.0.291
v0.0.292
v0.0.293
v0.0.294
v0.0.295
v0.0.296
v0.0.297
v0.0.298
v0.0.299
v0.0.300
v0.0.301
v0.0.302
v0.0.303
v0.0.304
v0.0.305
v0.0.306
v0.0.307
v0.0.308
v0.0.309
v0.0.310
v0.0.311
v0.0.312
v0.0.313
v0.0.314
v0.0.315
v0.0.316
v0.0.317
v0.0.318
v0.0.319
v0.0.320
v0.0.321
v0.0.322
v0.0.323
v0.0.324
v0.0.325
v0.0.326
v0.0.327
v0.0.329
v0.0.330
v0.0.331
v0.0.331rc0
v0.0.331rc1
v0.0.331rc2
v0.0.331rc3
v0.0.332
v0.0.333
v0.0.334
v0.0.335
v0.0.336
v0.0.337
v0.0.338
v0.0.339
v0.0.339rc0
v0.0.339rc1
v0.0.339rc2
v0.0.339rc3
v0.0.340
v0.0.341
v0.0.342
v0.0.343
v0.0.344
v0.0.345
v0.0.346
v0.0.347
v0.0.348
v0.0.349
v0.0.349-rc.1
v0.0.349-rc.2
v0.0.350
v0.0.351
v0.0.352
v0.0.353
v0.0.354
v0.0.4
v0.0.5
v0.0.64
v0.0.65
v0.0.66
v0.0.67
v0.0.68
v0.0.69
v0.0.70
v0.0.71
v0.0.72
v0.0.73
v0.0.74
v0.0.75
v0.0.76
v0.0.77
v0.0.78
v0.0.79
v0.0.80
v0.0.81
v0.0.82
v0.0.83
v0.0.84
v0.0.85
v0.0.86
v0.0.87
v0.0.88
v0.0.89
v0.0.90
v0.0.91
v0.0.92
v0.0.93
v0.0.94
v0.0.95
v0.0.96
v0.0.97
v0.0.98
v0.0.99
v0.1.0
v0.1.1
v0.1.10
v0.1.11
v0.1.12
v0.1.13
v0.1.14
v0.1.15
v0.1.16
v0.1.17rc1
v0.1.2
v0.1.3
v0.1.4
v0.1.5
v0.1.6
v0.1.7
v0.1.8
v0.1.9
${ noResults }
388 Commits (b8b8a138df0e70a2073682d9082f7cc6ae2acb41)
Author | SHA1 | Message | Date |
---|---|---|---|
Kacper Łukawski |
1ff5b67025
|
Implement async API for Qdrant vector store (#7704)
Inspired by #5550, I implemented full async API support in Qdrant. The docs were extended to mention the existence of asynchronous operations in Langchain. I also used that chance to restructure the tests of Qdrant and provided a suite of tests for the async version. Async API requires the GRPC protocol to be enabled. Thus, it doesn't work on local mode yet, but we're considering including the support to be consistent. |
1 year ago |
Aarav Borthakur |
210296a71f
|
Integrate Rockset as a document loader (#7681)
<!-- Thank you for contributing to LangChain! Replace this comment with: - Description: a description of the change, - Issue: the issue # it fixes (if applicable), - Dependencies: any dependencies required for this change, - Tag maintainer: for a quicker response, tag the relevant maintainer (see below), - Twitter handle: we announce bigger features on Twitter. If your PR gets announced and you'd like a mention, we'll gladly shout you out! If you're adding a new integration, please include: 1. a test for the integration, preferably unit tests that do not rely on network access, 2. an example notebook showing its use. Maintainer responsibilities: - General / Misc / if you don't know who to tag: @baskaryan - DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev - Models / Prompts: @hwchase17, @baskaryan - Memory: @hwchase17 - Agents / Tools / Toolkits: @hinthornw - Tracing / Callbacks: @agola11 - Async: @agola11 If no one reviews your PR within a few days, feel free to @-mention the same people again. See contribution guidelines for more information on how to write/run tests, lint, etc: https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md --> Integrate [Rockset](https://rockset.com/docs/) as a document loader. Issue: None Dependencies: Nothing new (rockset's dependency was already added [here](https://github.com/hwchase17/langchain/pull/6216)) Tag maintainer: @rlancemartin I have added a test for the integration and an example notebook showing its use. I ran `make lint` and everything looks good. --------- Co-authored-by: Bagatur <baskaryan@gmail.com> |
1 year ago |
Leonid Kuligin |
85e1c9b348
|
Added support for examples for VertexAI chat models. (#7636)
#5278 Co-authored-by: Leonid Kuligin <kuligin@google.com> |
1 year ago |
Richy Wang |
45bb414be2
|
Add LLM for Alibaba's Damo Academy's Tongyi Qwen API (#7477)
- Add langchain.llms.Tonyi for text completion, in examples into the Tonyi Text API, - Add system tests. Note async completion for the Text API is not yet supported and will be included in a future PR. Dependencies: dashscope. It will be installed manually cause it is not need by everyone. Happy for feedback on any aspect of this PR @hwchase17 @baskaryan. |
1 year ago |
UmerHA |
82f3e32d8d
|
[Small upgrade] Allow document limit in AzureCognitiveSearchRetriever (#7690)
Multiple people have asked in #5081 for a way to limit the documents returned from an AzureCognitiveSearchRetriever. This PR adds the `top_n` parameter to allow that. Twitter handle: [@UmerHAdil](twitter.com/umerHAdil) |
1 year ago |
EllieRoseS |
c087ce74f7
|
Added matching async load func to PlaywrightURLLoader (#5938)
Fixes # (issue) The existing PlaywrightURLLoader load() function uses a synchronous browser which is not compatible with jupyter. This PR adds a sister function aload() which can be run insisde a notebook. --------- Co-authored-by: Harrison Chase <hw.chase.17@gmail.com> |
1 year ago |
Bagatur |
c17a80f11c
|
fix chroma updated upsert interface (#7643)
new chroma release seems to not support empty dicts for metadata. related to #7633 |
1 year ago |
William FH |
a673a51efa
|
[Breaking] Update Evaluation Functionality (#7388)
- Migrate from deprecated langchainplus_sdk to `langsmith` package - Update the `run_on_dataset()` API to use an eval config - Update a number of evaluators, as well as the loading logic - Update docstrings / reference docs - Update tracer to share single HTTP session |
1 year ago |
Bagatur |
b08f903755
|
fix chroma init bug (#7639) | 1 year ago |
Jason Fan |
8effd90be0
|
Add new types of document transformers (#7379)
- Description: Add two new document transformers that translates documents into different languages and converts documents into q&a format to improve vector search results. Uses OpenAI function calling via the [doctran](https://github.com/psychic-api/doctran/tree/main) library. - Issue: N/A - Dependencies: `doctran = "^0.0.5"` - Tag maintainer: @rlancemartin @eyurtsev @hwchase17 - Twitter handle: @psychicapi or @jfan001 Notes - Adheres to the `DocumentTransformer` abstraction set by @dev2049 in #3182 - refactored `EmbeddingsRedundantFilter` to put it in a file under a new `document_transformers` module - Added basic docs for `DocumentInterrogator`, `DocumentTransformer` as well as the existing `EmbeddingsRedundantFilter` --------- Co-authored-by: Lance Martin <lance@langchain.dev> Co-authored-by: Bagatur <baskaryan@gmail.com> |
1 year ago |
Yaroslav Halchenko |
0d92a7f357
|
codespell: workflow, config + some (quite a few) typos fixed (#6785)
Probably the most boring PR to review ;) Individual commits might be easier to digest --------- Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com> |
1 year ago |
Bagatur |
2babe3069f
|
Revert pinecone v4 support (#7566)
Revert
|
1 year ago |
Kacper Łukawski |
1f83b5f47e
|
Reuse the existing collection if configured properly in Qdrant.from_texts (#7530)
This PR changes the behavior of `Qdrant.from_texts` so the collection is reused if not requested to recreate it. Previously, calling `Qdrant.from_texts` or `Qdrant.from_documents` resulted in removing the old data which was confusing for many. |
1 year ago |
Leonid Kuligin |
6674b33cf5
|
Added support for chat_history (#7555)
#7469 Co-authored-by: Leonid Kuligin <kuligin@google.com> |
1 year ago |
Boris |
9129318466
|
CPAL (#6255)
# Causal program-aided language (CPAL) chain ## Motivation This builds on the recent [PAL](https://arxiv.org/abs/2211.10435) to stop LLM hallucination. The problem with the [PAL](https://arxiv.org/abs/2211.10435) approach is that it hallucinates on a math problem with a nested chain of dependence. The innovation here is that this new CPAL approach includes causal structure to fix hallucination. For example, using the below word problem, PAL answers with 5, and CPAL answers with 13. "Tim buys the same number of pets as Cindy and Boris." "Cindy buys the same number of pets as Bill plus Bob." "Boris buys the same number of pets as Ben plus Beth." "Bill buys the same number of pets as Obama." "Bob buys the same number of pets as Obama." "Ben buys the same number of pets as Obama." "Beth buys the same number of pets as Obama." "If Obama buys one pet, how many pets total does everyone buy?" The CPAL chain represents the causal structure of the above narrative as a causal graph or DAG, which it can also plot, as shown below. ![complex-graph](https://github.com/hwchase17/langchain/assets/367522/d938db15-f941-493d-8605-536ad530f576) . The two major sections below are: 1. Technical overview 2. Future application Also see [this jupyter notebook](https://github.com/borisdev/langchain/blob/master/docs/extras/modules/chains/additional/cpal.ipynb) doc. ## 1. Technical overview ### CPAL versus PAL Like [PAL](https://arxiv.org/abs/2211.10435), CPAL intends to reduce large language model (LLM) hallucination. The CPAL chain is different from the PAL chain for a couple of reasons. * CPAL adds a causal structure (or DAG) to link entity actions (or math expressions). * The CPAL math expressions are modeling a chain of cause and effect relations, which can be intervened upon, whereas for the PAL chain math expressions are projected math identities. PAL's generated python code is wrong. It hallucinates when complexity increases. ```python def solution(): """Tim buys the same number of pets as Cindy and Boris.Cindy buys the same number of pets as Bill plus Bob.Boris buys the same number of pets as Ben plus Beth.Bill buys the same number of pets as Obama.Bob buys the same number of pets as Obama.Ben buys the same number of pets as Obama.Beth buys the same number of pets as Obama.If Obama buys one pet, how many pets total does everyone buy?""" obama_pets = 1 tim_pets = obama_pets cindy_pets = obama_pets + obama_pets boris_pets = obama_pets + obama_pets total_pets = tim_pets + cindy_pets + boris_pets result = total_pets return result # math result is 5 ``` CPAL's generated python code is correct. ```python story outcome data name code value depends_on 0 obama pass 1.0 [] 1 bill bill.value = obama.value 1.0 [obama] 2 bob bob.value = obama.value 1.0 [obama] 3 ben ben.value = obama.value 1.0 [obama] 4 beth beth.value = obama.value 1.0 [obama] 5 cindy cindy.value = bill.value + bob.value 2.0 [bill, bob] 6 boris boris.value = ben.value + beth.value 2.0 [ben, beth] 7 tim tim.value = cindy.value + boris.value 4.0 [cindy, boris] query data { "question": "how many pets total does everyone buy?", "expression": "SELECT SUM(value) FROM df", "llm_error_msg": "" } # query result is 13 ``` Based on the comments below, CPAL's intended location in the library is `experimental/chains/cpal` and PAL's location is`chains/pal`. ### CPAL vs Graph QA Both the CPAL chain and the Graph QA chain extract entity-action-entity relations into a DAG. The CPAL chain is different from the Graph QA chain for a few reasons. * Graph QA does not connect entities to math expressions * Graph QA does not associate actions in a sequence of dependence. * Graph QA does not decompose the narrative into these three parts: 1. Story plot or causal model 4. Hypothetical question 5. Hypothetical condition ### Evaluation Preliminary evaluation on simple math word problems shows that this CPAL chain generates less hallucination than the PAL chain on answering questions about a causal narrative. Two examples are in [this jupyter notebook](https://github.com/borisdev/langchain/blob/master/docs/extras/modules/chains/additional/cpal.ipynb) doc. ## 2. Future application ### "Describe as Narrative, Test as Code" The thesis here is that the Describe as Narrative, Test as Code approach allows you to represent a causal mental model both as code and as a narrative, giving you the best of both worlds. #### Why describe a causal mental mode as a narrative? The narrative form is quick. At a consensus building meeting, people use narratives to persuade others of their causal mental model, aka. plan. You can share, version control and index a narrative. #### Why test a causal mental model as a code? Code is testable, complex narratives are not. Though fast, narratives are problematic as their complexity increases. The problem is LLMs and humans are prone to hallucination when predicting the outcomes of a narrative. The cost of building a consensus around the validity of a narrative outcome grows as its narrative complexity increases. Code does not require tribal knowledge or social power to validate. Code is composable, complex narratives are not. The answer of one CPAL chain can be the hypothetical conditions of another CPAL Chain. For stochastic simulations, a composable plan can be integrated with the [DoWhy library](https://github.com/py-why/dowhy). Lastly, for the futuristic folk, a composable plan as code allows ordinary community folk to design a plan that can be integrated with a blockchain for funding. An explanation of a dependency planning application is [here.](https://github.com/borisdev/cpal-llm-chain-demo) --- Twitter handle: @boris_dev --------- Co-authored-by: Boris Dev <borisdev@Boriss-MacBook-Air.local> |
1 year ago |
Hashem Alsaket |
1dd4236177
|
Fix HF endpoint returns blank for text-generation (#7386)
Description: Current `_call` function in the `langchain.llms.HuggingFaceEndpoint` class truncates response when `task=text-generation`. Same error discussed a few days ago on Hugging Face: https://huggingface.co/tiiuae/falcon-40b-instruct/discussions/51 Issue: Fixes #7353 Tag maintainer: @hwchase17 @baskaryan @hinthornw --------- Co-authored-by: Bagatur <baskaryan@gmail.com> |
1 year ago |
Raymond Yuan |
5171c3bcca
|
Refactor vector storage to correctly handle relevancy scores (#6570)
Description: This pull request aims to support generating the correct generic relevancy scores for different vector stores by refactoring the relevance score functions and their selection in the base class and subclasses of VectorStore. This is especially relevant with VectorStores that require a distance metric upon initialization. Note many of the current implenetations of `_similarity_search_with_relevance_scores` are not technically correct, as they just return `self.similarity_search_with_score(query, k, **kwargs)` without applying the relevant score function Also includes changes associated with: https://github.com/hwchase17/langchain/pull/6564 and https://github.com/hwchase17/langchain/pull/6494 See more indepth discussion in thread in #6494 Issue: https://github.com/hwchase17/langchain/issues/6526 https://github.com/hwchase17/langchain/issues/6481 https://github.com/hwchase17/langchain/issues/6346 Dependencies: None The changes include: - Properly handling score thresholding in FAISS `similarity_search_with_score_by_vector` for the corresponding distance metric. - Refactoring the `_similarity_search_with_relevance_scores` method in the base class and removing it from the subclasses for incorrectly implemented subclasses. - Adding a `_select_relevance_score_fn` method in the base class and implementing it in the subclasses to select the appropriate relevance score function based on the distance strategy. - Updating the `__init__` methods of the subclasses to set the `relevance_score_fn` attribute. - Removing the `_default_relevance_score_fn` function from the FAISS class and using the base class's `_euclidean_relevance_score_fn` instead. - Adding the `DistanceStrategy` enum to the `utils.py` file and updating the imports in the vector store classes. - Updating the tests to import the `DistanceStrategy` enum from the `utils.py` file. --------- Co-authored-by: Hanit <37485638+hanit-com@users.noreply.github.com> |
1 year ago |
Stanko Kuveljic |
9d13dcd17c
|
Pinecone: Add V4 support (#7473) | 1 year ago |
Adilkhan Sarsen |
5debd5043e
|
Added deeplake use case examples of the new features (#6528)
<!-- Thank you for contributing to LangChain! Your PR will appear in our release under the title you set. Please make sure it highlights your valuable contribution. Replace this with a description of the change, the issue it fixes (if applicable), and relevant context. List any dependencies required for this change. After you're done, someone will review your PR. They may suggest improvements. If no one reviews your PR within a few days, feel free to @-mention the same people again, as notifications can get lost. Finally, we'd love to show appreciation for your contribution - if you'd like us to shout you out on Twitter, please also include your handle! --> <!-- Remove if not applicable --> Fixes # (issue) #### Before submitting <!-- If you're adding a new integration, please include: 1. a test for the integration - favor unit tests that does not rely on network access. 2. an example notebook showing its use See contribution guidelines for more information on how to write tests, lint etc: https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md --> #### Who can review? Tag maintainers/contributors who might be interested: <!-- For a quicker response, figure out the right person to tag with @ @hwchase17 - project lead Tracing / Callbacks - @agola11 Async - @agola11 DataLoaders - @eyurtsev Models - @hwchase17 - @agola11 Agents / Tools / Toolkits - @hwchase17 VectorStores / Retrievers / Memory - @dev2049 --> 1. Added use cases of the new features 2. Done some code refactoring --------- Co-authored-by: Ivo Stranic <istranic@gmail.com> |
1 year ago |
Yifei Song |
7d29bb2c02
|
Add Xorbits Dataframe as a Document Loader (#7319)
- [Xorbits](https://doc.xorbits.io/en/latest/) is an open-source computing framework that makes it easy to scale data science and machine learning workloads in parallel. Xorbits can leverage multi cores or GPUs to accelerate computation on a single machine, or scale out up to thousands of machines to support processing terabytes of data. - This PR added support for the Xorbits document loader, which allows langchain to leverage Xorbits to parallelize and distribute the loading of data. - Dependencies: This change requires the Xorbits library to be installed in order to be used. `pip install xorbits` - Request for review: @rlancemartin, @eyurtsev - Twitter handle: https://twitter.com/Xorbitsio Co-authored-by: Bagatur <baskaryan@gmail.com> |
1 year ago |
Sergio Moreno |
21a353e9c2
|
feat: ctransformers support async chain (#6859)
- Description: Adding async method for CTransformers - Issue: I've found impossible without this code to run Websockets inside a FastAPI micro service and a CTransformers model. - Tag maintainer: Not necessary yet, I don't like to mention directly - Twitter handle: @_semoal |
1 year ago |
Paul-Emile Brotons |
d2cf0d16b3
|
adding max_marginal_relevance_search method to MongoDBAtlasVectorSearch (#7310)
Adding a maximal_marginal_relevance method to the MongoDBAtlasVectorSearch vectorstore enhances the user experience by providing more diverse search results Issue: #7304 |
1 year ago |
Matt Robinson |
bcab894f4e
|
feat: Add `UnstructuredTSVLoader` (#7367)
### Summary Adds an `UnstructuredTSVLoader` for TSV files. Also updates the doc strings for `UnstructuredCSV` and `UnstructuredExcel` loaders. ### Testing ```python from langchain.document_loaders.tsv import UnstructuredTSVLoader loader = UnstructuredTSVLoader( file_path="example_data/mlb_teams_2012.csv", mode="elements" ) docs = loader.load() ``` |
1 year ago |
Jona Sassenhagen |
7ffc431b3a
|
Add spacy sentencizer (#7442)
`SpacyTextSplitter` currently uses spacy's statistics-based `en_core_web_sm` model for sentence splitting. This is a good splitter, but it's also pretty slow, and in this case it's doing a lot of work that's not needed given that the spacy parse is then just thrown away. However, there is also a simple rules-based spacy sentencizer. Using this is at least an order of magnitude faster than using `en_core_web_sm` according to my local tests. Also, spacy sentence tokenization based on `en_core_web_sm` can be sped up in this case by not doing the NER stage. This shaves some cycles too, both when loading the model and when parsing the text. Consequently, this PR adds the option to use the basic spacy sentencizer, and it disables the NER stage for the current approach, *which is kept as the default*. Lastly, when extracting the tokenized sentences, the `text` attribute is called directly instead of doing the string conversion, which is IMO a bit more idiomatic. |
1 year ago |
Delgermurun |
a1603fccfb
|
integrate JinaChat (#6927)
Integration with https://chat.jina.ai/api. It is OpenAI compatible API. - Twitter handle: [https://twitter.com/JinaAI_](https://twitter.com/JinaAI_) --------- Co-authored-by: Harrison Chase <hw.chase.17@gmail.com> |
1 year ago |
William FH |
4789c99bc2
|
Add String Distance and Embedding Evaluators (#7123)
Add a string evaluator and pairwise string evaluator implementation for: - Embedding distance - String distance Update docs |
1 year ago |
William FH |
c5edbea34a
|
Load Run Evaluator (#7101)
Current problems: 1. Evaluating LLMs or Chat models isn't smooth. Even specifying 'generations' as the output inserts a redundant list into the eval template 2. Configuring input / prediction / reference keys in the `get_qa_evaluator` function is confusing. Unless you are using a chain with the default keys, you have to specify all the variables and need to reason about whether the key corresponds to the traced run's inputs, outputs or the examples inputs or outputs. Proposal: - Configure the run evaluator according to a model. Use the model type and input/output keys to assert compatibility where possible. Only need to specify a reference_key for certain evaluators (which is less confusing than specifying input keys) When does this work: - If you have your langchain model available (assumed always for run_on_dataset flow) - If you are evaluating an LLM, Chat model, or chain - If the LLM or chat models are traced by langchain (wouldn't work if you add an incompatible schema via the REST API) When would this fail: - Currently if you directly create an example from an LLM run, the outputs are generations with all the extra metadata present. A simple `example_key` and dumping all to the template could make the evaluations unreliable - Doesn't help if you're not using the low level API - If you want to instantiate the evaluator without instantiating your chain or LLM (maybe common for monitoring, for instance) -> could also load from run or run type though What's ugly: - Personally think it's better to load evaluators one by one since passing a config down is pretty confusing. - Lots of testing needs to be added - Inconsistent in that it makes a separate run and example input mapper instead of the original `RunEvaluatorInputMapper`, which maps a run and example to a single input. Example usage running the for an LLM, Chat Model, and Agent. ``` # Test running for the string evaluators evaluator_names = ["qa", "criteria"] model = ChatOpenAI() configured_evaluators = load_run_evaluators_for_model(evaluator_names, model=model, reference_key="answer") run_on_dataset(ds_name, model, run_evaluators=configured_evaluators) ``` <details> <summary>Full code with dataset upload</summary> ``` ## Create dataset from langchain.evaluation.run_evaluators.loading import load_run_evaluators_for_model from langchain.evaluation import load_dataset import pandas as pd lcds = load_dataset("llm-math") df = pd.DataFrame(lcds) from uuid import uuid4 from langsmith import Client client = Client() ds_name = "llm-math - " + str(uuid4())[0:8] ds = client.upload_dataframe(df, name=ds_name, input_keys=["question"], output_keys=["answer"]) ## Define the models we'll test over from langchain.llms import OpenAI from langchain.chat_models import ChatOpenAI from langchain.agents import initialize_agent, AgentType from langchain.tools import tool llm = OpenAI(temperature=0) chat_model = ChatOpenAI(temperature=0) @tool def sum(a: float, b: float) -> float: """Add two numbers""" return a + b def construct_agent(): return initialize_agent( llm=chat_model, tools=[sum], agent=AgentType.OPENAI_MULTI_FUNCTIONS, ) agent = construct_agent() # Test running for the string evaluators evaluator_names = ["qa", "criteria"] models = [llm, chat_model, agent] run_evaluators = [] for model in models: run_evaluators.append(load_run_evaluators_for_model(evaluator_names, model=model, reference_key="answer")) # Run on LLM, Chat Model, and Agent from langchain.client.runner_utils import run_on_dataset to_test = [llm, chat_model, construct_agent] for model, configured_evaluators in zip(to_test, run_evaluators): run_on_dataset(ds_name, model, run_evaluators=configured_evaluators, verbose=True) ``` </details> --------- Co-authored-by: Nuno Campos <nuno@boringbits.io> |
1 year ago |
Bagatur |
4d427b2397
|
Base language model docstrings (#7104) | 1 year ago |
German Martin |
3ce4e46c8c
|
The Fellowship of the Vectors: New Embeddings Filter using clustering. (#7015)
Continuing with Tolkien inspired series of langchain tools. I bring to you: **The Fellowship of the Vectors**, AKA EmbeddingsClusteringFilter. This document filter uses embeddings to group vectors together into clusters, then allows you to pick an arbitrary number of documents vector based on proximity to the cluster centers. That's a representative sample of the cluster. The original idea is from [Greg Kamradt](https://github.com/gkamradt) from this video (Level4): https://www.youtube.com/watch?v=qaPMdcCqtWk&t=365s I added few tricks to make it a bit more versatile, so you can parametrize what to do with duplicate documents in case of cluster overlap: replace the duplicates with the next closest document or remove it. This allow you to use it as an special kind of redundant filter too. Additionally you can choose 2 diff orders: grouped by cluster or respecting the original retriever scores. In my use case I was using the docs grouped by cluster to run refine chains per cluster to generate summarization over a large corpus of documents. Let me know if you want to change anything! @rlancemartin, @eyurtsev, @hwchase17, --------- Co-authored-by: rlm <pexpresss31@gmail.com> |
1 year ago |
Jan Kubica |
fed64ae060
|
Chroma: add vector search with scores (#6864)
- Description: Adding to Chroma integration the option to run a similarity search by a vector with relevance scores. Fixing two minor typos. - Issue: The "lambda_mult" typo is related to #4861 - Maintainer: @rlancemartin, @eyurtsev |
1 year ago |
Tom |
e533da8bf2
|
Adding Marqo to vectorstore ecosystem (#7068)
This PR brings in a vectorstore interface for [Marqo](https://www.marqo.ai/). The Marqo vectorstore exposes some of Marqo's functionality in addition the the VectorStore base class. The Marqo vectorstore also makes the embedding parameter optional because inference for embeddings is an inherent part of Marqo. Docs, notebook examples and integration tests included. Related PR: https://github.com/hwchase17/langchain/pull/2807 --------- Co-authored-by: Tom Hamer <tom@marqo.ai> Co-authored-by: Harrison Chase <hw.chase.17@gmail.com> |
1 year ago |
Harrison Chase |
6711854e30
|
Harrison/dataforseo (#7214)
Co-authored-by: Alexander <sune357@gmail.com> |
1 year ago |
Richy Wang |
cab7d86f23
|
Implement delete interface of vector store on AnalyticDB (#7170)
Hi, there This pull request contains two commit: **1. Implement delete interface with optional ids parameter on AnalyticDB.** **2. Allow customization of database connection behavior by exposing engine_args parameter in interfaces.** - This commit adds the `engine_args` parameter to the interfaces, allowing users to customize the behavior of the database connection. The `engine_args` parameter accepts a dictionary of additional arguments that will be passed to the create_engine function. Users can now modify various aspects of the database connection, such as connection pool size and recycle time. This enhancement provides more flexibility and control to users when interacting with the database through the exposed interfaces. This commit is related to VectorStores @rlancemartin @eyurtsev Thank you for your attention and consideration. |
1 year ago |
Jamal |
a2f191a322
|
Replace JIRA Arbitrary Code Execution vulnerability with finer grain API wrapper (#6992)
This fixes #4833 and the critical vulnerability
https://nvd.nist.gov/vuln/detail/CVE-2023-34540
Previously, the JIRA API Wrapper had a mode that simply pipelined user
input into an `exec()` function.
[The intended use of the 'other' mode is to cover any of Atlassian's API
that don't have an existing
interface](
|
1 year ago |
Ankush Gola |
4c1c05c2c7
|
support adding custom metadata to runs (#7120)
- [x] wire up tools - [x] wire up retrievers - [x] add integration test <!-- Thank you for contributing to LangChain! Replace this comment with: - Description: a description of the change, - Issue: the issue # it fixes (if applicable), - Dependencies: any dependencies required for this change, - Tag maintainer: for a quicker response, tag the relevant maintainer (see below), - Twitter handle: we announce bigger features on Twitter. If your PR gets announced and you'd like a mention, we'll gladly shout you out! If you're adding a new integration, please include: 1. a test for the integration, preferably unit tests that do not rely on network access, 2. an example notebook showing its use. Maintainer responsibilities: - General / Misc / if you don't know who to tag: @baskaryan - DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev - Models / Prompts: @hwchase17, @baskaryan - Memory: @hwchase17 - Agents / Tools / Toolkits: @hinthornw - Tracing / Callbacks: @agola11 - Async: @agola11 If no one reviews your PR within a few days, feel free to @-mention the same people again. See contribution guidelines for more information on how to write/run tests, lint, etc: https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md --> |
1 year ago |
Nuno Campos |
81e5b1ad36
|
Add serialized object to retriever start callback (#7074)
<!-- Thank you for contributing to LangChain! Replace this comment with: - Description: a description of the change, - Issue: the issue # it fixes (if applicable), - Dependencies: any dependencies required for this change, - Tag maintainer: for a quicker response, tag the relevant maintainer (see below), - Twitter handle: we announce bigger features on Twitter. If your PR gets announced and you'd like a mention, we'll gladly shout you out! If you're adding a new integration, please include: 1. a test for the integration, preferably unit tests that do not rely on network access, 2. an example notebook showing its use. Maintainer responsibilities: - General / Misc / if you don't know who to tag: @dev2049 - DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev - Models / Prompts: @hwchase17, @dev2049 - Memory: @hwchase17 - Agents / Tools / Toolkits: @vowelparrot - Tracing / Callbacks: @agola11 - Async: @agola11 If no one reviews your PR within a few days, feel free to @-mention the same people again. See contribution guidelines for more information on how to write/run tests, lint, etc: https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md --> |
1 year ago |
felixocker |
db98c44f8f
|
Support for SPARQL (#7165)
# [SPARQL](https://www.w3.org/TR/rdf-sparql-query/) for [LangChain](https://github.com/hwchase17/langchain) ## Description LangChain support for knowledge graphs relying on W3C standards using RDFlib: SPARQL/ RDF(S)/ OWL with special focus on RDF \ * Works with local files, files from the web, and SPARQL endpoints * Supports both SELECT and UPDATE queries * Includes both a Jupyter notebook with an example and integration tests ## Contribution compared to related PRs and discussions * [Wikibase agent](https://github.com/hwchase17/langchain/pull/2690) - uses SPARQL, but specifically for wikibase querying * [Cypher qa](https://github.com/hwchase17/langchain/pull/5078) - graph DB question answering for Neo4J via Cypher * [PR 6050](https://github.com/hwchase17/langchain/pull/6050) - tries something similar, but does not cover UPDATE queries and supports only RDF * Discussions on [w3c mailing list](mailto:semantic-web@w3.org) related to the combination of LLMs (specifically ChatGPT) and knowledge graphs ## Dependencies * [RDFlib](https://github.com/RDFLib/rdflib) ## Tag maintainer Graph database related to memory -> @hwchase17 |
1 year ago |
Simon Cheung |
81eebc4070
|
Add HugeGraphQAChain to support gremlin generating chain (#7132)
[Apache HugeGraph](https://github.com/apache/incubator-hugegraph) is a convenient, efficient, and adaptable graph database, compatible with the Apache TinkerPop3 framework and the Gremlin query language. In this PR, the HugeGraph and HugeGraphQAChain provide the same functionality as the existing integration with Neo4j and enables query generation and question answering over HugeGraph database. The difference is that the graph query language supported by HugeGraph is not cypher but another very popular graph query language [Gremlin](https://tinkerpop.apache.org/gremlin.html). A notebook example and a simple test case have also been added. --------- Co-authored-by: Bagatur <baskaryan@gmail.com> |
1 year ago |
Nuno Campos |
696886f397
|
Use serialized format for messages in tracer (#6827)
<!-- Thank you for contributing to LangChain! Replace this comment with: - Description: a description of the change, - Issue: the issue # it fixes (if applicable), - Dependencies: any dependencies required for this change, - Tag maintainer: for a quicker response, tag the relevant maintainer (see below), - Twitter handle: we announce bigger features on Twitter. If your PR gets announced and you'd like a mention, we'll gladly shout you out! If you're adding a new integration, please include: 1. a test for the integration, preferably unit tests that do not rely on network access, 2. an example notebook showing its use. Maintainer responsibilities: - General / Misc / if you don't know who to tag: @dev2049 - DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev - Models / Prompts: @hwchase17, @dev2049 - Memory: @hwchase17 - Agents / Tools / Toolkits: @vowelparrot - Tracing / Callbacks: @agola11 - Async: @agola11 If no one reviews your PR within a few days, feel free to @-mention the same people again. See contribution guidelines for more information on how to write/run tests, lint, etc: https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md --> |
1 year ago |
Mike Salvatore |
d0c7f7c317
|
Remove `None` default value for FAISS relevance_score_fn (#7085)
## Description The type hint for `FAISS.__init__()`'s `relevance_score_fn` parameter allowed the parameter to be set to `None`. However, a default function is provided by the constructor. This led to an unnecessary check in the code, as well as a test to verify this check. **ASSUMPTION**: There's no reason to ever set `relevance_score_fn` to `None`. This PR changes the type hint and removes the unnecessary code. |
1 year ago |
Ofer Mendelevitch |
153b56d19b
|
Vectara upd2 (#6506)
Update to Vectara integration - By user request added "add_files" to take advantage of Vectara capabilities to process files on the backend, without the need for separate loading of documents and chunking in the chain. - Updated vectara.ipynb example notebook to be broader and added testing of add_file() @hwchase17 - project lead --------- Co-authored-by: rlm <pexpresss31@gmail.com> |
1 year ago |
Bagatur |
7acd524210
|
Rm retriever kwargs (#7013)
Doesn't actually limit the Retriever interface but hopefully in practice it does |
1 year ago |
skspark |
e5f6f0ffc4
|
Support params on GoogleSearchApiWrapper (#6810) (#7014)
## Description Support search params in GoogleSearchApiWrapper's result call, for the extra filtering on search, to support extra query parameters that google cse provides: https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list?hl=ko ## Issue #6810 |
1 year ago |
Stefano Lottini |
8d2281a8ca
|
Second Attempt - Add concurrent insertion of vector rows in the Cassandra Vector Store (#7017)
Retrying with the same improvements as in #6772, this time trying not to mess up with branches. @rlancemartin doing a fresh new PR from a branch with a new name. This should do. Thank you for your help! --------- Co-authored-by: Jonathan Ellis <jbellis@datastax.com> Co-authored-by: rlm <pexpresss31@gmail.com> |
1 year ago |
Harrison Chase |
3bfe7cf467
|
Harrison/split schema dir (#7025)
should be no functional changes also keep __init__ exposing a lot for backwards compat --------- Co-authored-by: Dev 2049 <dev.dev2049@gmail.com> Co-authored-by: Bagatur <baskaryan@gmail.com> |
1 year ago |
Matt Robinson |
0498dad562
|
feat: enable `UnstructuredEmailLoader` to process attachments (#6977)
### Summary Updates `UnstructuredEmailLoader` so that it can process attachments in addition to the e-mail content. The loader will process attachments if the `process_attachments` kwarg is passed when the loader is instantiated. ### Testing ```python file_path = "fake-email-attachment.eml" loader = UnstructuredEmailLoader( file_path, mode="elements", process_attachments=True ) docs = loader.load() docs[-1] ``` ### Reviewers - @rlancemartin - @eyurtsev - @hwchase17 |
1 year ago |
Kacper Łukawski |
140ba682f1
|
Support named vectors in Qdrant (#6871)
# Description This PR makes it possible to use named vectors from Qdrant in Langchain. That was requested multiple times, as people want to reuse externally created collections in Langchain. It doesn't change anything for the existing applications. The changes were covered with some integration tests and included in the docs. ## Example ```python Qdrant.from_documents( docs, embeddings, location=":memory:", collection_name="my_documents", vector_name="custom_vector", ) ``` ### Issue: #2594 Tagging @rlancemartin & @eyurtsev. I'd appreciate your review. |
1 year ago |
Stefano Lottini |
75fb9d2fdc
|
Cassandra support for chat history using CassIO library (#6771)
### Overview This PR aims at building on #4378, expanding the capabilities and building on top of the `cassIO` library to interface with the database (as opposed to using the core drivers directly). Usage of `cassIO` (a library abstracting Cassandra access for ML/GenAI-specific purposes) is already established since #6426 was merged, so no new dependencies are introduced. In the same spirit, we try to uniform the interface for using Cassandra instances throughout LangChain: all our appreciation of the work by @jj701 notwithstanding, who paved the way for this incremental work (thank you!), we identified a few reasons for changing the way a `CassandraChatMessageHistory` is instantiated. Advocating a syntax change is something we don't take lighthearted way, so we add some explanations about this below. Additionally, this PR expands on integration testing, enables use of Cassandra's native Time-to-Live (TTL) features and improves the phrasing around the notebook example and the short "integrations" documentation paragraph. We would kindly request @hwchase to review (since this is an elaboration and proposed improvement of #4378 who had the same reviewer). ### About the __init__ breaking changes There are [many](https://docs.datastax.com/en/developer/python-driver/3.28/api/cassandra/cluster/) options when creating the `Cluster` object, and new ones might be added at any time. Choosing some of them and exposing them as `__init__` parameters `CassandraChatMessageHistory` will prove to be insufficient for at least some users. On the other hand, working through `kwargs` or adding a long, long list of arguments to `__init__` is not a desirable option either. For this reason, (as done in #6426), we propose that whoever instantiates the Chat Message History class provide a Cassandra `Session` object, ready to use. This also enables easier injection of mocks and usage of Cassandra-compatible connections (such as those to the cloud database DataStax Astra DB, obtained with a different set of init parameters than `contact_points` and `port`). We feel that a breaking change might still be acceptable since LangChain is at `0.*`. However, while maintaining that the approach we propose will be more flexible in the future, room could be made for a "compatibility layer" that respects the current init method. Honestly, we would to that only if there are strong reasons for it, as that would entail an additional maintenance burden. ### Other changes We propose to remove the keyspace creation from the class code for two reasons: first, production Cassandra instances often employ RBAC so that the database user reading/writing from tables does not necessarily (and generally shouldn't) have permission to create keyspaces, and second that programmatic keyspace creation is not a best practice (it should be done more or less manually, with extra care about schema mismatched among nodes, etc). Removing this (usually unnecessary) operation from the `__init__` path would also improve initialization performance (shorter time). We suggest, likewise, to remove the `__del__` method (which would close the database connection), for the following reason: it is the recommended best practice to create a single Cassandra `Session` object throughout an application (it is a resource-heavy object capable to handle concurrency internally), so in case Cassandra is used in other ways by the app there is the risk of truncating the connection for all usages when the history instance is destroyed. Moreover, the `Session` object, in typical applications, is best left to garbage-collect itself automatically. As mentioned above, we defer the actual database I/O to the `cassIO` library, which is designed to encode practices optimized for LLM applications (among other) without the need to expose LangChain developers to the internals of CQL (Cassandra Query Language). CassIO is already employed by the LangChain's Vector Store support for Cassandra. We added a few more connection options in the companion notebook example (most notably, Astra DB) to encourage usage by anyone who cannot run their own Cassandra cluster. We surface the `ttl_seconds` option for automatic handling of an expiration time to chat history messages, a likely useful feature given that very old messages generally may lose their importance. We elaborated a bit more on the integration testing (Time-to-live, separation of "session ids", ...). ### Remarks from linter & co. We reinstated `cassio` as a dependency both in the "optional" group and in the "integration testing" group of `pyproject.toml`. This might not be the right thing do to, in which case the author of this PR offer his apologies (lack of confidence with Poetry - happy to be pointed in the right direction, though!). During linter tests, we were hit by some errors which appear unrelated to the code in the PR. We left them here and report on them here for awareness: ``` langchain/vectorstores/mongodb_atlas.py:137: error: Argument 1 to "insert_many" of "Collection" has incompatible type "List[Dict[str, Sequence[object]]]"; expected "Iterable[Union[MongoDBDocumentType, RawBSONDocument]]" [arg-type] langchain/vectorstores/mongodb_atlas.py:186: error: Argument 1 to "aggregate" of "Collection" has incompatible type "List[object]"; expected "Sequence[Mapping[str, Any]]" [arg-type] langchain/vectorstores/qdrant.py:16: error: Name "grpc" is not defined [name-defined] langchain/vectorstores/qdrant.py:19: error: Name "grpc" is not defined [name-defined] langchain/vectorstores/qdrant.py:20: error: Name "grpc" is not defined [name-defined] langchain/vectorstores/qdrant.py:22: error: Name "grpc" is not defined [name-defined] langchain/vectorstores/qdrant.py:23: error: Name "grpc" is not defined [name-defined] ``` In the same spirit, we observe that to even get `import langchain` run, it seems that a `pip install bs4` is missing from the minimal package installation path. Thank you! |
1 year ago |
Harrison Chase |
3ac08c3de4
|
Harrison/octo ml (#6897)
Co-authored-by: Bassem Yacoube <125713079+AI-Bassem@users.noreply.github.com> Co-authored-by: Shotaro Kohama <khmshtr28@gmail.com> Co-authored-by: Rian Dolphin <34861538+rian-dolphin@users.noreply.github.com> Co-authored-by: Dev 2049 <dev.dev2049@gmail.com> Co-authored-by: Shashank Deshpande <shashankdeshpande18@gmail.com> |
1 year ago |
Rian Dolphin |
2e39ede848
|
add with score option for max marginal relevance (#6867)
### Adding the functionality to return the scores with retrieved documents when using the max marginal relevance - Description: Add the method `max_marginal_relevance_search_with_score_by_vector` to the FAISS wrapper. Functionality operates the same as `similarity_search_with_score_by_vector` except for using the max marginal relevance retrieval framework like is used in the `max_marginal_relevance_search_by_vector` method. - Dependencies: None - Tag maintainer: @rlancemartin @eyurtsev - Twitter handle: @RianDolphin --------- Co-authored-by: Dev 2049 <dev.dev2049@gmail.com> |
1 year ago |