├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── babel.config.js ├── cookbook ├── Gemma_LangChain.ipynb ├── LLaMA2_sql_chat.ipynb ├── Multi_modal_RAG.ipynb ├── Multi_modal_RAG_google.ipynb ├── RAPTOR.ipynb ├── README.md ├── Semi_Structured_RAG.ipynb ├── Semi_structured_and_multi_modal_RAG.ipynb ├── Semi_structured_multi_modal_RAG_LLaMA2.ipynb ├── advanced_rag_eval.ipynb ├── agent_vectorstore.ipynb ├── airbyte_github.ipynb ├── amazon_personalize_how_to.ipynb ├── analyze_document.ipynb ├── anthropic_structured_outputs.ipynb ├── apache_kafka_message_handling.ipynb ├── autogpt │ ├── autogpt.ipynb │ └── marathon_times.ipynb ├── azure_container_apps_dynamic_sessions_data_analyst.ipynb ├── baby_agi.ipynb ├── baby_agi_with_agent.ipynb ├── camel_role_playing.ipynb ├── causal_program_aided_language_model.ipynb ├── code-analysis-deeplake.ipynb ├── cql_agent.ipynb ├── custom_agent_with_plugin_retrieval.ipynb ├── custom_agent_with_plugin_retrieval_using_plugnplai.ipynb ├── custom_agent_with_tool_retrieval.ipynb ├── custom_multi_action_agent.ipynb ├── data │ └── imdb_top_1000.csv ├── databricks_sql_db.ipynb ├── deeplake_semantic_search_over_chat.ipynb ├── docugami_xml_kg_rag.ipynb ├── elasticsearch_db_qa.ipynb ├── extraction_openai_tools.ipynb ├── fake_llm.ipynb ├── fireworks_rag.ipynb ├── forward_looking_retrieval_augmented_generation.ipynb ├── generative_agents_interactive_simulacra_of_human_behavior.ipynb ├── gymnasium_agent_simulation.ipynb ├── hugginggpt.ipynb ├── human_approval.ipynb ├── human_input_chat_model.ipynb ├── human_input_llm.ipynb ├── hypothetical_document_embeddings.ipynb ├── langgraph_agentic_rag.ipynb ├── langgraph_crag.ipynb ├── langgraph_self_rag.ipynb ├── learned_prompt_optimization.ipynb ├── llm_bash.ipynb ├── llm_checker.ipynb ├── llm_math.ipynb ├── llm_summarization_checker.ipynb ├── llm_symbolic_math.ipynb ├── meta_prompt.ipynb ├── mongodb-langchain-cache-memory.ipynb ├── multi_modal_QA.ipynb ├── multi_modal_RAG_chroma.ipynb ├── multi_modal_RAG_vdms.ipynb ├── multi_modal_output_agent.ipynb ├── multi_player_dnd.ipynb ├── multiagent_authoritarian.ipynb ├── multiagent_bidding.ipynb ├── myscale_vector_sql.ipynb ├── nomic_embedding_rag.ipynb ├── openai_functions_retrieval_qa.ipynb ├── openai_v1_cookbook.ipynb ├── optimization.ipynb ├── oracleai_demo.ipynb ├── petting_zoo.ipynb ├── plan_and_execute_agent.ipynb ├── press_releases.ipynb ├── program_aided_language_model.ipynb ├── qa_citations.ipynb ├── qianfan_baidu_elasticesearch_RAG.ipynb ├── rag_fusion.ipynb ├── rag_semantic_chunking_azureaidocintelligence.ipynb ├── rag_upstage_layout_analysis_groundedness_check.ipynb ├── rag_with_quantized_embeddings.ipynb ├── retrieval_in_sql.ipynb ├── rewrite.ipynb ├── sales_agent_with_context.ipynb ├── selecting_llms_based_on_context_length.ipynb ├── self-discover.ipynb ├── self_query_hotel_search.ipynb ├── sharedmemory_for_tools.ipynb ├── smart_llm.ipynb ├── sql_db_qa.mdx ├── stepback-qa.ipynb ├── together_ai.ipynb ├── tool_call_messages.ipynb ├── tree_of_thought.ipynb ├── twitter-the-algorithm-analysis-deeplake.ipynb ├── two_agent_debate_tools.ipynb ├── two_player_dnd.ipynb ├── video_captioning │ └── video_captioning.ipynb └── wikibase_agent.ipynb ├── data └── people.yml ├── docs ├── _templates │ └── integration.mdx ├── additional_resources │ ├── arxiv_references.mdx │ ├── dependents.mdx │ ├── tutorials.mdx │ └── youtube.mdx ├── changes │ └── changelog │ │ ├── core.mdx │ │ └── langchain.mdx ├── concepts.mdx ├── contributing │ ├── code.mdx │ ├── documentation │ │ ├── style_guide.mdx │ │ └── technical_logistics.mdx │ ├── faq.mdx │ ├── index.mdx │ ├── integrations.mdx │ ├── repo_structure.mdx │ └── testing.mdx ├── cookbook.mdx ├── how_to │ ├── HTML_header_metadata_splitter.md │ ├── HTML_section_aware_splitter.md │ ├── MultiQueryRetriever.md │ ├── add_scores_retriever.md │ ├── agent_executor.md │ ├── assign.md │ ├── binding.md │ ├── caching_embeddings.md │ ├── callbacks_async.md │ ├── callbacks_attach.md │ ├── callbacks_constructor.md │ ├── callbacks_runtime.md │ ├── character_text_splitter.md │ ├── chat_model_caching.md │ ├── chat_streaming.md │ ├── chat_token_usage_tracking.md │ ├── chatbots_memory.md │ ├── chatbots_retrieval.md │ ├── chatbots_tools.md │ ├── code_splitter.md │ ├── configure.md │ ├── contextual_compression.md │ ├── custom_callbacks.md │ ├── custom_chat_model.md │ ├── custom_llm.md │ ├── custom_retriever.md │ ├── custom_tools.md │ ├── debugging.md │ ├── document_loader_csv.md │ ├── document_loader_custom.md │ ├── document_loader_directory.md │ ├── document_loader_html.md │ ├── document_loader_json.mdx │ ├── document_loader_markdown.md │ ├── document_loader_office_file.mdx │ ├── document_loader_pdf.md │ ├── dynamic_chain.md │ ├── embed_text.mdx │ ├── ensemble_retriever.md │ ├── example_selectors.md │ ├── example_selectors_length_based.md │ ├── example_selectors_mmr.md │ ├── example_selectors_ngram.md │ ├── example_selectors_similarity.md │ ├── extraction_examples.md │ ├── extraction_long_text.md │ ├── extraction_parse.md │ ├── fallbacks.md │ ├── few_shot_examples.md │ ├── few_shot_examples_chat.md │ ├── function_calling.md │ ├── functions.md │ ├── graph_constructing.md │ ├── graph_mapping.md │ ├── graph_prompting.md │ ├── graph_semantic.md │ ├── hybrid.md │ ├── index.mdx │ ├── indexing.md │ ├── inspect.md │ ├── installation.mdx │ ├── lcel_cheatsheet.md │ ├── llm_caching.md │ ├── llm_token_usage_tracking.md │ ├── local_llms.md │ ├── logprobs.md │ ├── long_context_reorder.md │ ├── markdown_header_metadata_splitter.md │ ├── message_history.md │ ├── migrate_agent.md │ ├── multi_vector.md │ ├── output_parser_custom.md │ ├── output_parser_fixing.md │ ├── output_parser_json.md │ ├── output_parser_retry.md │ ├── output_parser_structured.md │ ├── output_parser_xml.md │ ├── output_parser_yaml.md │ ├── parallel.md │ ├── parent_document_retriever.md │ ├── passthrough.md │ ├── prompts_composition.md │ ├── prompts_partial.md │ ├── qa_chat_history_how_to.md │ ├── qa_citations.md │ ├── qa_per_user.md │ ├── qa_sources.md │ ├── qa_streaming.md │ ├── query_constructing_filters.md │ ├── query_few_shot.md │ ├── query_high_cardinality.md │ ├── query_multiple_queries.md │ ├── query_multiple_retrievers.md │ ├── query_no_queries.md │ ├── recursive_json_splitter.md │ ├── recursive_text_splitter.md │ ├── response_metadata.md │ ├── routing.md │ ├── self_query.md │ ├── semantic-chunker.md │ ├── sequence.md │ ├── split_by_token.md │ ├── sql_csv.md │ ├── sql_large_db.md │ ├── sql_prompting.md │ ├── sql_query_checking.md │ ├── streaming.md │ ├── streaming_llm.md │ ├── structured_output.md │ ├── test.md │ ├── time_weighted_vectorstore.md │ ├── tool_calling.md │ ├── tool_calls_multi_modal.md │ ├── toolkits.mdx │ ├── tools_as_openai_functions.md │ ├── tools_builtin.md │ ├── tools_chain.md │ ├── tools_error.md │ ├── tools_human.md │ ├── tools_prompting.md │ ├── vectorstore_retriever.md │ └── vectorstores.mdx ├── integrations │ ├── adapters │ │ ├── openai-old.md │ │ └── openai.md │ ├── callbacks │ │ ├── argilla.md │ │ ├── comet_tracing.md │ │ ├── confident.md │ │ ├── context.md │ │ ├── fiddler.md │ │ ├── infino.md │ │ ├── labelstudio.md │ │ ├── llmonitor.md │ │ ├── promptlayer.md │ │ ├── sagemaker_tracking.md │ │ ├── streamlit.md │ │ ├── trubrics.md │ │ └── uptrain.md │ ├── chat │ │ ├── ai21.md │ │ ├── alibaba_cloud_pai_eas.md │ │ ├── anthropic.md │ │ ├── anthropic_functions.md │ │ ├── anyscale.md │ │ ├── azure_chat_openai.md │ │ ├── azureml_chat_endpoint.md │ │ ├── baichuan.md │ │ ├── baidu_qianfan_endpoint.md │ │ ├── bedrock.md │ │ ├── cohere.md │ │ ├── coze.md │ │ ├── dappier.md │ │ ├── deepinfra.md │ │ ├── edenai.md │ │ ├── ernie.md │ │ ├── everlyai.md │ │ ├── fireworks.md │ │ ├── friendli.md │ │ ├── gigachat.md │ │ ├── google_generative_ai.md │ │ ├── google_vertex_ai_palm.md │ │ ├── gpt_router.md │ │ ├── groq.md │ │ ├── huggingface.md │ │ ├── index.mdx │ │ ├── jinachat.md │ │ ├── kinetica.md │ │ ├── konko.md │ │ ├── litellm.md │ │ ├── litellm_router.md │ │ ├── llama2_chat.md │ │ ├── llama_api.md │ │ ├── llama_edge.md │ │ ├── maritalk.md │ │ ├── minimax.md │ │ ├── mistralai.md │ │ ├── mlx.md │ │ ├── moonshot.md │ │ ├── nvidia_ai_endpoints.md │ │ ├── octoai.md │ │ ├── ollama.md │ │ ├── ollama_functions.md │ │ ├── openai.md │ │ ├── perplexity.md │ │ ├── premai.md │ │ ├── promptlayer_chatopenai.md │ │ ├── solar.md │ │ ├── sparkllm.md │ │ ├── tencent_hunyuan.md │ │ ├── together.md │ │ ├── tongyi.md │ │ ├── upstage.md │ │ ├── vllm.md │ │ ├── volcengine_maas.md │ │ ├── yandex.md │ │ ├── yuan2.md │ │ └── zhipuai.md │ ├── chat_loaders │ │ ├── discord.md │ │ ├── facebook.md │ │ ├── gmail.md │ │ ├── imessage.md │ │ ├── langsmith_dataset.md │ │ ├── langsmith_llm_runs.md │ │ ├── slack.md │ │ ├── telegram.md │ │ ├── twitter.md │ │ ├── wechat.md │ │ └── whatsapp.md │ ├── document_loaders │ │ ├── acreom.md │ │ ├── airbyte.md │ │ ├── airbyte_cdk.md │ │ ├── airbyte_gong.md │ │ ├── airbyte_hubspot.md │ │ ├── airbyte_json.md │ │ ├── airbyte_salesforce.md │ │ ├── airbyte_shopify.md │ │ ├── airbyte_stripe.md │ │ ├── airbyte_typeform.md │ │ ├── airbyte_zendesk_support.md │ │ ├── airtable.md │ │ ├── alibaba_cloud_maxcompute.md │ │ ├── amazon_textract.md │ │ ├── apify_dataset.md │ │ ├── arcgis.md │ │ ├── arxiv.md │ │ ├── assemblyai.md │ │ ├── astradb.md │ │ ├── async_chromium.md │ │ ├── async_html.md │ │ ├── athena.md │ │ ├── aws_s3_directory.md │ │ ├── aws_s3_file.md │ │ ├── azlyrics.md │ │ ├── azure_ai_data.md │ │ ├── azure_blob_storage_container.md │ │ ├── azure_blob_storage_file.md │ │ ├── azure_document_intelligence.md │ │ ├── bibtex.md │ │ ├── bilibili.md │ │ ├── blackboard.md │ │ ├── blockchain.md │ │ ├── brave_search.md │ │ ├── browserbase.md │ │ ├── browserless.md │ │ ├── cassandra.md │ │ ├── chatgpt_loader.md │ │ ├── college_confidential.md │ │ ├── concurrent.md │ │ ├── confluence.md │ │ ├── conll-u.md │ │ ├── copypaste.md │ │ ├── couchbase.md │ │ ├── csv.md │ │ ├── cube_semantic.md │ │ ├── datadog_logs.md │ │ ├── diffbot.md │ │ ├── discord.md │ │ ├── docugami.md │ │ ├── docusaurus.md │ │ ├── dropbox.md │ │ ├── duckdb.md │ │ ├── email.md │ │ ├── epub.md │ │ ├── etherscan.md │ │ ├── evernote.md │ │ ├── facebook_chat.md │ │ ├── fauna.md │ │ ├── figma.md │ │ ├── firecrawl.md │ │ ├── geopandas.md │ │ ├── git.md │ │ ├── gitbook.md │ │ ├── github.md │ │ ├── glue_catalog.md │ │ ├── google_alloydb.md │ │ ├── google_bigquery.md │ │ ├── google_bigtable.md │ │ ├── google_cloud_sql_mssql.md │ │ ├── google_cloud_sql_mysql.md │ │ ├── google_cloud_sql_pg.md │ │ ├── google_cloud_storage_directory.md │ │ ├── google_cloud_storage_file.md │ │ ├── google_datastore.md │ │ ├── google_drive.md │ │ ├── google_el_carro.md │ │ ├── google_firestore.md │ │ ├── google_memorystore_redis.md │ │ ├── google_spanner.md │ │ ├── google_speech_to_text.md │ │ ├── grobid.md │ │ ├── gutenberg.md │ │ ├── hacker_news.md │ │ ├── huawei_obs_directory.md │ │ ├── huawei_obs_file.md │ │ ├── hugging_face_dataset.md │ │ ├── ifixit.md │ │ ├── image.md │ │ ├── image_captions.md │ │ ├── imsdb.md │ │ ├── iugu.md │ │ ├── joplin.md │ │ ├── jupyter_notebook.md │ │ ├── kinetica.md │ │ ├── lakefs.md │ │ ├── larksuite.md │ │ ├── llmsherpa.md │ │ ├── mastodon.md │ │ ├── mediawikidump.md │ │ ├── merge_doc.md │ │ ├── mhtml.md │ │ ├── microsoft_excel.md │ │ ├── microsoft_onedrive.md │ │ ├── microsoft_onenote.md │ │ ├── microsoft_powerpoint.md │ │ ├── microsoft_sharepoint.md │ │ ├── microsoft_word.md │ │ ├── mintbase.md │ │ ├── modern_treasury.md │ │ ├── mongodb.md │ │ ├── news.md │ │ ├── notion.md │ │ ├── notiondb.md │ │ ├── nuclia.md │ │ ├── obsidian.md │ │ ├── odt.md │ │ ├── open_city_data.md │ │ ├── oracleadb_loader.md │ │ ├── oracleai.md │ │ ├── org_mode.md │ │ ├── pandas_dataframe.md │ │ ├── pebblo.md │ │ ├── polars_dataframe.md │ │ ├── psychic.md │ │ ├── pubmed.md │ │ ├── pyspark_dataframe.md │ │ ├── quip.md │ │ ├── readthedocs_documentation.md │ │ ├── recursive_url.md │ │ ├── reddit.md │ │ ├── roam.md │ │ ├── rockset.md │ │ ├── rspace.md │ │ ├── rss.md │ │ ├── rst.md │ │ ├── sitemap.md │ │ ├── slack.md │ │ ├── snowflake.md │ │ ├── source_code.md │ │ ├── spider.md │ │ ├── spreedly.md │ │ ├── stripe.md │ │ ├── subtitle.md │ │ ├── surrealdb.md │ │ ├── telegram.md │ │ ├── tencent_cos_directory.md │ │ ├── tencent_cos_file.md │ │ ├── tensorflow_datasets.md │ │ ├── tidb.md │ │ ├── tomarkdown.md │ │ ├── toml.md │ │ ├── trello.md │ │ ├── tsv.md │ │ ├── twitter.md │ │ ├── unstructured_file.md │ │ ├── upstage.md │ │ ├── url.md │ │ ├── vsdx.md │ │ ├── weather.md │ │ ├── web_base.md │ │ ├── whatsapp_chat.md │ │ ├── wikipedia.md │ │ ├── xml.md │ │ ├── xorbits.md │ │ ├── youtube_audio.md │ │ ├── youtube_transcript.md │ │ └── yuque.md │ ├── document_transformers │ │ ├── ai21_semantic_text_splitter.md │ │ ├── beautiful_soup.md │ │ ├── cross_encoder_reranker.md │ │ ├── doctran_extract_properties.md │ │ ├── doctran_interrogate_document.md │ │ ├── doctran_translate_document.md │ │ ├── google_cloud_vertexai_rerank.md │ │ ├── google_docai.md │ │ ├── google_translate.md │ │ ├── html2text.md │ │ ├── jina_rerank.md │ │ ├── markdownify.md │ │ ├── nuclia_transformer.md │ │ ├── openai_metadata_tagger.md │ │ ├── openvino_rerank.md │ │ └── voyageai-reranker.md │ ├── graphs │ │ ├── amazon_neptune_open_cypher.md │ │ ├── amazon_neptune_sparql.md │ │ ├── apache_age.md │ │ ├── arangodb.md │ │ ├── azure_cosmosdb_gremlin.md │ │ ├── diffbot.md │ │ ├── falkordb.md │ │ ├── hugegraph.md │ │ ├── kuzu_db.md │ │ ├── memgraph.md │ │ ├── nebula_graph.md │ │ ├── neo4j_cypher.md │ │ ├── networkx.md │ │ ├── ontotext.md │ │ ├── rdflib_sparql.md │ │ └── tigergraph.mdx │ ├── llms │ │ ├── ai21.md │ │ ├── aleph_alpha.md │ │ ├── alibabacloud_pai_eas_endpoint.md │ │ ├── amazon_api_gateway.md │ │ ├── anthropic.md │ │ ├── anyscale.md │ │ ├── aphrodite.md │ │ ├── arcee.md │ │ ├── azure_ml.md │ │ ├── azure_openai.md │ │ ├── baichuan.md │ │ ├── baidu_qianfan_endpoint.md │ │ ├── banana.md │ │ ├── baseten.md │ │ ├── beam.md │ │ ├── bedrock.md │ │ ├── bittensor.md │ │ ├── cerebriumai.md │ │ ├── chatglm.md │ │ ├── clarifai.md │ │ ├── cloudflare_workersai.md │ │ ├── cohere.md │ │ ├── ctransformers.md │ │ ├── ctranslate2.md │ │ ├── databricks.md │ │ ├── deepinfra.md │ │ ├── deepsparse.md │ │ ├── edenai.md │ │ ├── exllamav2.md │ │ ├── fireworks.md │ │ ├── forefrontai.md │ │ ├── friendli.md │ │ ├── gigachat.md │ │ ├── google_ai.md │ │ ├── google_vertex_ai_palm.md │ │ ├── gooseai.md │ │ ├── gpt4all.md │ │ ├── gradient.md │ │ ├── huggingface_endpoint.md │ │ ├── huggingface_pipelines.md │ │ ├── ibm_watsonx.md │ │ ├── index.mdx │ │ ├── ipex_llm.md │ │ ├── javelin.md │ │ ├── jsonformer_experimental.md │ │ ├── koboldai.md │ │ ├── konko.md │ │ ├── layerup_security.mdx │ │ ├── llamacpp.md │ │ ├── llamafile.md │ │ ├── llm_caching.md │ │ ├── lmformatenforcer_experimental.md │ │ ├── manifest.md │ │ ├── minimax.md │ │ ├── mlx_pipelines.md │ │ ├── modal.md │ │ ├── moonshot.md │ │ ├── mosaicml.md │ │ ├── nlpcloud.md │ │ ├── oci_generative_ai.md │ │ ├── oci_model_deployment_endpoint.md │ │ ├── octoai.md │ │ ├── ollama.md │ │ ├── opaqueprompts.md │ │ ├── openai.md │ │ ├── openllm.md │ │ ├── openlm.md │ │ ├── openvino.md │ │ ├── petals.md │ │ ├── pipelineai.md │ │ ├── predibase.md │ │ ├── predictionguard.md │ │ ├── promptlayer_openai.md │ │ ├── rellm_experimental.md │ │ ├── replicate.md │ │ ├── runhouse.md │ │ ├── sagemaker.md │ │ ├── sambanova.md │ │ ├── solar.md │ │ ├── sparkllm.md │ │ ├── stochasticai.md │ │ ├── symblai_nebula.md │ │ ├── textgen.md │ │ ├── titan_takeoff.md │ │ ├── together.md │ │ ├── tongyi.md │ │ ├── vllm.md │ │ ├── volcengine_maas.md │ │ ├── weight_only_quantization.md │ │ ├── writer.md │ │ ├── xinference.md │ │ ├── yandex.md │ │ └── yuan2.md │ ├── memory │ │ ├── astradb_chat_message_history.md │ │ ├── aws_dynamodb.md │ │ ├── cassandra_chat_message_history.md │ │ ├── elasticsearch_chat_message_history.md │ │ ├── google_alloydb.md │ │ ├── google_bigtable.md │ │ ├── google_el_carro.md │ │ ├── google_firestore.md │ │ ├── google_firestore_datastore.md │ │ ├── google_memorystore_redis.md │ │ ├── google_spanner.md │ │ ├── google_sql_mssql.md │ │ ├── google_sql_mysql.md │ │ ├── google_sql_pg.md │ │ ├── momento_chat_message_history.md │ │ ├── mongodb_chat_message_history.md │ │ ├── motorhead_memory.md │ │ ├── neo4j_chat_message_history.md │ │ ├── postgres_chat_message_history.md │ │ ├── redis_chat_message_history.md │ │ ├── remembrall.md │ │ ├── rockset_chat_message_history.md │ │ ├── singlestoredb_chat_message_history.md │ │ ├── sql_chat_message_history.md │ │ ├── sqlite.md │ │ ├── streamlit_chat_message_history.md │ │ ├── tidb_chat_message_history.md │ │ ├── upstash_redis_chat_message_history.md │ │ ├── xata_chat_message_history.md │ │ └── zep_memory.md │ ├── platforms │ │ ├── anthropic.mdx │ │ ├── aws.mdx │ │ ├── google.mdx │ │ ├── huggingface.mdx │ │ ├── index.mdx │ │ ├── microsoft.mdx │ │ └── openai.mdx │ ├── providers │ │ ├── acreom.mdx │ │ ├── activeloop_deeplake.mdx │ │ ├── ai21.mdx │ │ ├── aim_tracking.md │ │ ├── ainetwork.mdx │ │ ├── airbyte.mdx │ │ ├── airtable.md │ │ ├── alchemy.mdx │ │ ├── aleph_alpha.mdx │ │ ├── alibaba_cloud.mdx │ │ ├── analyticdb.mdx │ │ ├── annoy.mdx │ │ ├── anyscale.mdx │ │ ├── apache_doris.mdx │ │ ├── apify.mdx │ │ ├── arangodb.mdx │ │ ├── arcee.mdx │ │ ├── arcgis.mdx │ │ ├── argilla.mdx │ │ ├── arthur_tracking.md │ │ ├── arxiv.mdx │ │ ├── assemblyai.mdx │ │ ├── astradb.mdx │ │ ├── atlas.mdx │ │ ├── awadb.md │ │ ├── azlyrics.mdx │ │ ├── bagel.mdx │ │ ├── bageldb.mdx │ │ ├── baichuan.mdx │ │ ├── baidu.mdx │ │ ├── bananadev.mdx │ │ ├── baseten.md │ │ ├── beam.mdx │ │ ├── beautiful_soup.mdx │ │ ├── bibtex.mdx │ │ ├── bilibili.mdx │ │ ├── bittensor.mdx │ │ ├── blackboard.mdx │ │ ├── brave_search.mdx │ │ ├── breebs.md │ │ ├── browserbase.mdx │ │ ├── browserless.mdx │ │ ├── byte_dance.mdx │ │ ├── cassandra.mdx │ │ ├── cerebriumai.mdx │ │ ├── chaindesk.mdx │ │ ├── chroma.mdx │ │ ├── clarifai.mdx │ │ ├── clearml_tracking.md │ │ ├── clickhouse.mdx │ │ ├── cloudflare.mdx │ │ ├── cnosdb.mdx │ │ ├── cohere.mdx │ │ ├── college_confidential.mdx │ │ ├── comet_tracking.md │ │ ├── confident.mdx │ │ ├── confluence.mdx │ │ ├── context.mdx │ │ ├── couchbase.mdx │ │ ├── ctransformers.mdx │ │ ├── ctranslate2.mdx │ │ ├── cube.mdx │ │ ├── dashvector.mdx │ │ ├── databricks.md │ │ ├── datadog.mdx │ │ ├── datadog_logs.mdx │ │ ├── dataforseo.mdx │ │ ├── dataherald.mdx │ │ ├── deepinfra.mdx │ │ ├── deepsparse.mdx │ │ ├── diffbot.mdx │ │ ├── dingo.mdx │ │ ├── discord.mdx │ │ ├── docarray.mdx │ │ ├── doctran.mdx │ │ ├── docugami.mdx │ │ ├── docusaurus.mdx │ │ ├── dropbox.mdx │ │ ├── dspy.md │ │ ├── duckdb.mdx │ │ ├── edenai.mdx │ │ ├── elasticsearch.mdx │ │ ├── elevenlabs.mdx │ │ ├── epsilla.mdx │ │ ├── etherscan.mdx │ │ ├── evernote.mdx │ │ ├── exa_search.md │ │ ├── facebook.mdx │ │ ├── fauna.mdx │ │ ├── fiddler.md │ │ ├── figma.mdx │ │ ├── fireworks.md │ │ ├── flyte.mdx │ │ ├── forefrontai.mdx │ │ ├── geopandas.mdx │ │ ├── git.mdx │ │ ├── gitbook.mdx │ │ ├── github.mdx │ │ ├── golden.mdx │ │ ├── google_serper.mdx │ │ ├── gooseai.mdx │ │ ├── gpt4all.mdx │ │ ├── gradient.mdx │ │ ├── graphsignal.mdx │ │ ├── grobid.mdx │ │ ├── groq.mdx │ │ ├── gutenberg.mdx │ │ ├── hacker_news.mdx │ │ ├── hazy_research.mdx │ │ ├── helicone.mdx │ │ ├── hologres.mdx │ │ ├── html2text.mdx │ │ ├── huawei.mdx │ │ ├── ibm.mdx │ │ ├── ifixit.mdx │ │ ├── imsdb.mdx │ │ ├── infinispanvs.mdx │ │ ├── infinity.mdx │ │ ├── infino.mdx │ │ ├── intel.mdx │ │ ├── iugu.mdx │ │ ├── jaguar.mdx │ │ ├── javelin_ai_gateway.mdx │ │ ├── jina.mdx │ │ ├── johnsnowlabs.mdx │ │ ├── joplin.mdx │ │ ├── kdbai.mdx │ │ ├── kinetica.mdx │ │ ├── konko.mdx │ │ ├── labelstudio.mdx │ │ ├── lakefs.mdx │ │ ├── lancedb.mdx │ │ ├── langchain_decorators.mdx │ │ ├── lantern.mdx │ │ ├── llamacpp.mdx │ │ ├── llmonitor.mdx │ │ ├── log10.mdx │ │ ├── marqo.md │ │ ├── mediawikidump.mdx │ │ ├── meilisearch.mdx │ │ ├── metal.mdx │ │ ├── milvus.mdx │ │ ├── mindsdb.mdx │ │ ├── minimax.mdx │ │ ├── mistralai.mdx │ │ ├── mlflow.mdx │ │ ├── mlflow_ai_gateway.mdx │ │ ├── mlflow_tracking.md │ │ ├── modal.mdx │ │ ├── modelscope.mdx │ │ ├── modern_treasury.mdx │ │ ├── momento.mdx │ │ ├── mongodb_atlas.mdx │ │ ├── motherduck.mdx │ │ ├── motorhead.mdx │ │ ├── myscale.mdx │ │ ├── neo4j.mdx │ │ ├── nlpcloud.mdx │ │ ├── nomic.md │ │ ├── notion.mdx │ │ ├── nuclia.mdx │ │ ├── nvidia.mdx │ │ ├── obsidian.mdx │ │ ├── oci.mdx │ │ ├── ollama.mdx │ │ ├── ontotext_graphdb.mdx │ │ ├── openllm.mdx │ │ ├── opensearch.mdx │ │ ├── openweathermap.mdx │ │ ├── oracleai.mdx │ │ ├── outline.mdx │ │ ├── petals.mdx │ │ ├── pg_embedding.mdx │ │ ├── pgvector.mdx │ │ ├── pinecone.mdx │ │ ├── pipelineai.mdx │ │ ├── portkey │ │ │ ├── index.md │ │ │ └── logging_tracing_portkey.md │ │ ├── predibase.md │ │ ├── predictionguard.mdx │ │ ├── premai.md │ │ ├── promptlayer.mdx │ │ ├── psychic.mdx │ │ ├── pubmed.md │ │ ├── pygmalionai.mdx │ │ ├── qdrant.mdx │ │ ├── ragatouille.md │ │ ├── ray_serve.md │ │ ├── rebuff.md │ │ ├── reddit.mdx │ │ ├── redis.mdx │ │ ├── remembrall.mdx │ │ ├── replicate.mdx │ │ ├── roam.mdx │ │ ├── robocorp.mdx │ │ ├── rockset.mdx │ │ ├── runhouse.mdx │ │ ├── rwkv.mdx │ │ ├── salute_devices.mdx │ │ ├── searchapi.mdx │ │ ├── searx.mdx │ │ ├── semadb.mdx │ │ ├── serpapi.mdx │ │ ├── shaleprotocol.md │ │ ├── singlestoredb.mdx │ │ ├── sklearn.mdx │ │ ├── slack.mdx │ │ ├── snowflake.mdx │ │ ├── spacy.mdx │ │ ├── sparkllm.mdx │ │ ├── spreedly.mdx │ │ ├── sqlite.mdx │ │ ├── stackexchange.mdx │ │ ├── starrocks.mdx │ │ ├── stochasticai.mdx │ │ ├── streamlit.mdx │ │ ├── stripe.mdx │ │ ├── supabase.mdx │ │ ├── symblai_nebula.mdx │ │ ├── tair.mdx │ │ ├── telegram.mdx │ │ ├── tencent.mdx │ │ ├── tensorflow_datasets.mdx │ │ ├── tidb.mdx │ │ ├── tigergraph.mdx │ │ ├── tigris.mdx │ │ ├── together.md │ │ ├── tomarkdown.mdx │ │ ├── trello.mdx │ │ ├── trubrics.mdx │ │ ├── trulens.mdx │ │ ├── twitter.mdx │ │ ├── typesense.mdx │ │ ├── unstructured.mdx │ │ ├── upstage.md │ │ ├── upstash.mdx │ │ ├── uptrain.md │ │ ├── usearch.mdx │ │ ├── vdms.mdx │ │ ├── vearch.md │ │ ├── vectara │ │ │ ├── index.mdx │ │ │ ├── vectara_chat.md │ │ │ └── vectara_summary.md │ │ ├── vespa.mdx │ │ ├── vlite.mdx │ │ ├── voyageai.mdx │ │ ├── wandb_tracing.md │ │ ├── wandb_tracking.md │ │ ├── weather.mdx │ │ ├── weaviate.mdx │ │ ├── whatsapp.mdx │ │ ├── whylabs_profiling.md │ │ ├── wikipedia.mdx │ │ ├── wolfram_alpha.mdx │ │ ├── writer.mdx │ │ ├── xata.mdx │ │ ├── xinference.mdx │ │ ├── yandex.mdx │ │ ├── yeagerai.mdx │ │ ├── youtube.mdx │ │ ├── zep.mdx │ │ └── zilliz.mdx │ ├── retrievers │ │ ├── activeloop.md │ │ ├── amazon_kendra_retriever.md │ │ ├── arcee.md │ │ ├── arxiv.md │ │ ├── asknews.md │ │ ├── azure_ai_search.md │ │ ├── bedrock.md │ │ ├── bm25.md │ │ ├── breebs.md │ │ ├── chaindesk.md │ │ ├── chatgpt-plugin.md │ │ ├── cohere-reranker.md │ │ ├── cohere.md │ │ ├── docarray_retriever.md │ │ ├── dria_index.md │ │ ├── elastic_search_bm25.md │ │ ├── elasticsearch_retriever.md │ │ ├── embedchain.md │ │ ├── flashrank-reranker.md │ │ ├── fleet_context.md │ │ ├── google_drive.md │ │ ├── google_vertex_ai_search.md │ │ ├── jaguar.md │ │ ├── kay.md │ │ ├── kinetica.md │ │ ├── knn.md │ │ ├── llmlingua.md │ │ ├── merger_retriever.md │ │ ├── metal.md │ │ ├── outline.md │ │ ├── pinecone_hybrid_search.md │ │ ├── pubmed.md │ │ ├── qdrant-sparse.md │ │ ├── ragatouille.md │ │ ├── re_phrase.md │ │ ├── rememberizer.md │ │ ├── sec_filings.md │ │ ├── self_query │ │ │ ├── activeloop_deeplake_self_query.md │ │ │ ├── astradb.md │ │ │ ├── chroma_self_query.md │ │ │ ├── dashvector.md │ │ │ ├── databricks_vector_search.md │ │ │ ├── dingo.md │ │ │ ├── elasticsearch_self_query.md │ │ │ ├── index.mdx │ │ │ ├── milvus_self_query.md │ │ │ ├── mongodb_atlas.md │ │ │ ├── myscale_self_query.md │ │ │ ├── opensearch_self_query.md │ │ │ ├── pgvector_self_query.md │ │ │ ├── pinecone.md │ │ │ ├── qdrant_self_query.md │ │ │ ├── redis_self_query.md │ │ │ ├── supabase_self_query.md │ │ │ ├── tencentvectordb.md │ │ │ ├── timescalevector_self_query.md │ │ │ ├── vectara_self_query.md │ │ │ └── weaviate_self_query.md │ │ ├── singlestoredb.md │ │ ├── svm.md │ │ ├── tavily.md │ │ ├── tf_idf.md │ │ ├── thirdai_neuraldb.md │ │ ├── vespa.md │ │ ├── weaviate-hybrid.md │ │ ├── wikipedia.md │ │ ├── you-retriever.md │ │ └── zep_memorystore.md │ ├── stores │ │ ├── astradb.md │ │ ├── file_system.md │ │ ├── in_memory.md │ │ ├── index.mdx │ │ ├── redis.md │ │ └── upstash_redis.md │ ├── text_embedding │ │ ├── ai21.md │ │ ├── aleph_alpha.md │ │ ├── anyscale.md │ │ ├── awadb.md │ │ ├── azureopenai.md │ │ ├── baichuan.md │ │ ├── baidu_qianfan_endpoint.md │ │ ├── bedrock.md │ │ ├── bge_huggingface.md │ │ ├── bookend.md │ │ ├── clarifai.md │ │ ├── cloudflare_workersai.md │ │ ├── cohere.md │ │ ├── dashscope.md │ │ ├── deepinfra.md │ │ ├── edenai.md │ │ ├── elasticsearch.md │ │ ├── embaas.md │ │ ├── ernie.md │ │ ├── fake.md │ │ ├── fastembed.md │ │ ├── fireworks.md │ │ ├── gigachat.md │ │ ├── google_generative_ai.md │ │ ├── google_vertex_ai_palm.md │ │ ├── gpt4all.md │ │ ├── gradient.md │ │ ├── huggingfacehub.md │ │ ├── ibm_watsonx.md │ │ ├── infinity.md │ │ ├── instruct_embeddings.md │ │ ├── itrex.md │ │ ├── jina.md │ │ ├── johnsnowlabs_embedding.md │ │ ├── laser.md │ │ ├── llamacpp.md │ │ ├── llamafile.md │ │ ├── llm_rails.md │ │ ├── localai.md │ │ ├── minimax.md │ │ ├── mistralai.md │ │ ├── modelscope_hub.md │ │ ├── mosaicml.md │ │ ├── nemo.md │ │ ├── nlp_cloud.md │ │ ├── nomic.md │ │ ├── nvidia_ai_endpoints.md │ │ ├── oci_generative_ai.md │ │ ├── ollama.md │ │ ├── open_clip.md │ │ ├── openai.md │ │ ├── openvino.md │ │ ├── optimum_intel.md │ │ ├── oracleai.md │ │ ├── premai.md │ │ ├── sagemaker-endpoint.md │ │ ├── sambanova.md │ │ ├── self-hosted.md │ │ ├── sentence_transformers.md │ │ ├── solar.md │ │ ├── spacy_embedding.md │ │ ├── sparkllm.md │ │ ├── tensorflowhub.md │ │ ├── text_embeddings_inference.md │ │ ├── titan_takeoff.md │ │ ├── together.md │ │ ├── upstage.md │ │ ├── volcengine.md │ │ ├── voyageai.md │ │ ├── xinference.md │ │ └── yandex.md │ ├── toolkits │ │ ├── ainetwork.md │ │ ├── airbyte_structured_qa.md │ │ ├── amadeus.md │ │ ├── azure_ai_services.md │ │ ├── azure_cognitive_services.md │ │ ├── cassandra_database.md │ │ ├── clickup.md │ │ ├── cogniswitch.md │ │ ├── connery.md │ │ ├── csv.md │ │ ├── document_comparison_toolkit.md │ │ ├── github.md │ │ ├── gitlab.md │ │ ├── gmail.md │ │ ├── jira.md │ │ ├── json.md │ │ ├── multion.md │ │ ├── nasa.md │ │ ├── office365.md │ │ ├── openapi.md │ │ ├── openapi_nla.md │ │ ├── pandas.md │ │ ├── playwright.md │ │ ├── polygon.md │ │ ├── powerbi.md │ │ ├── python.md │ │ ├── robocorp.md │ │ ├── slack.md │ │ ├── spark.md │ │ ├── spark_sql.md │ │ ├── sql_database.md │ │ ├── steam.md │ │ └── xorbits.md │ ├── tools │ │ ├── _gradio_tools_files │ │ │ └── output_7_0.png │ │ ├── alpha_vantage.md │ │ ├── apify.md │ │ ├── arxiv.md │ │ ├── asknews.md │ │ ├── awslambda.md │ │ ├── azure_dynamic_sessions.md │ │ ├── bash.md │ │ ├── bearly.md │ │ ├── bing_search.md │ │ ├── brave_search.md │ │ ├── chatgpt_plugins.md │ │ ├── connery.md │ │ ├── dalle_image_generator.md │ │ ├── dataforseo.md │ │ ├── dataherald.md │ │ ├── ddg.md │ │ ├── e2b_data_analysis.md │ │ ├── edenai_tools.md │ │ ├── eleven_labs_tts.md │ │ ├── exa_search.md │ │ ├── filesystem.md │ │ ├── golden_query.md │ │ ├── google_cloud_texttospeech.md │ │ ├── google_drive.md │ │ ├── google_finance.md │ │ ├── google_imagen.md │ │ ├── google_jobs.md │ │ ├── google_lens.md │ │ ├── google_places.md │ │ ├── google_scholar.md │ │ ├── google_search.md │ │ ├── google_serper.md │ │ ├── google_trends.md │ │ ├── gradio_tools.md │ │ ├── graphql.md │ │ ├── huggingface_tools.md │ │ ├── human_tools.md │ │ ├── ifttt.md │ │ ├── infobip.md │ │ ├── ionic_shopping.md │ │ ├── lemonai.md │ │ ├── memorize.md │ │ ├── mojeek_search.md │ │ ├── nuclia.md │ │ ├── nvidia_riva.md │ │ ├── openweathermap.md │ │ ├── oracleai.md │ │ ├── passio_nutrition_ai.md │ │ ├── polygon.md │ │ ├── pubmed.md │ │ ├── python.md │ │ ├── reddit_search.md │ │ ├── requests.md │ │ ├── sceneXplain.md │ │ ├── search_tools.md │ │ ├── searchapi.md │ │ ├── searx_search.md │ │ ├── semanticscholar.md │ │ ├── serpapi.md │ │ ├── sql_database.md │ │ ├── stackexchange.md │ │ ├── tavily_search.md │ │ ├── twilio.md │ │ ├── upstage_groundedness_check.md │ │ ├── wikidata.md │ │ ├── wikipedia.md │ │ ├── wolfram_alpha.md │ │ ├── yahoo_finance_news.md │ │ ├── you.md │ │ ├── youtube.md │ │ └── zapier.md │ └── vectorstores │ │ ├── activeloop_deeplake.md │ │ ├── aerospike.md │ │ ├── alibabacloud_opensearch.md │ │ ├── analyticdb.md │ │ ├── annoy.md │ │ ├── apache_doris.md │ │ ├── astradb.md │ │ ├── atlas.md │ │ ├── awadb.md │ │ ├── azure_cosmos_db.md │ │ ├── azuresearch.md │ │ ├── bagel.md │ │ ├── bageldb.md │ │ ├── baiducloud_vector_search.md │ │ ├── baiduvectordb.md │ │ ├── cassandra.md │ │ ├── chroma.md │ │ ├── clarifai.md │ │ ├── clickhouse.md │ │ ├── couchbase.md │ │ ├── dashvector.md │ │ ├── databricks_vector_search.md │ │ ├── dingo.md │ │ ├── docarray_hnsw.md │ │ ├── docarray_in_memory.md │ │ ├── documentdb.md │ │ ├── duckdb.md │ │ ├── ecloud_vector_search.md │ │ ├── elasticsearch.md │ │ ├── epsilla.md │ │ ├── faiss.md │ │ ├── faiss_async.md │ │ ├── google_alloydb.md │ │ ├── google_bigquery_vector_search.md │ │ ├── google_cloud_sql_mysql.md │ │ ├── google_cloud_sql_pg.md │ │ ├── google_firestore.md │ │ ├── google_memorystore_redis.md │ │ ├── google_spanner.md │ │ ├── google_vertex_ai_vector_search.md │ │ ├── hippo.md │ │ ├── hologres.md │ │ ├── infinispanvs.md │ │ ├── jaguar.md │ │ ├── kdbai.md │ │ ├── kinetica.md │ │ ├── lancedb.md │ │ ├── lantern.md │ │ ├── llm_rails.md │ │ ├── marqo.md │ │ ├── meilisearch.md │ │ ├── milvus.md │ │ ├── momento_vector_index.md │ │ ├── mongodb_atlas.md │ │ ├── myscale.md │ │ ├── neo4jvector.md │ │ ├── nucliadb.md │ │ ├── opensearch.md │ │ ├── oracle.md │ │ ├── pathway.md │ │ ├── pgembedding.md │ │ ├── pgvecto_rs.md │ │ ├── pgvector.md │ │ ├── pinecone.md │ │ ├── qdrant.md │ │ ├── redis.md │ │ ├── relyt.md │ │ ├── rockset.md │ │ ├── sap_hanavector.md │ │ ├── scann.md │ │ ├── semadb.md │ │ ├── singlestoredb.md │ │ ├── sklearn.md │ │ ├── sqlitevss.md │ │ ├── starrocks.md │ │ ├── supabase.md │ │ ├── surrealdb.md │ │ ├── tair.md │ │ ├── tencentvectordb.md │ │ ├── thirdai_neuraldb.md │ │ ├── tidb_vector.md │ │ ├── tigris.md │ │ ├── tiledb.md │ │ ├── timescalevector.md │ │ ├── typesense.md │ │ ├── upstash.md │ │ ├── usearch.md │ │ ├── vald.md │ │ ├── vdms.md │ │ ├── vearch.md │ │ ├── vectara.md │ │ ├── vespa.md │ │ ├── vikingdb.md │ │ ├── vlite.md │ │ ├── weaviate.md │ │ ├── xata.md │ │ ├── yellowbrick.md │ │ ├── zep.md │ │ └── zilliz.md ├── introduction.mdx ├── langserve.md ├── people.mdx ├── security.md ├── templates │ ├── anthropic-iterative-search.md │ ├── basic-critique-revise.md │ ├── bedrock-jcvd.md │ ├── cassandra-entomology-rag.md │ ├── cassandra-synonym-caching.md │ ├── chain-of-note-wiki.md │ ├── chat-bot-feedback.md │ ├── cohere-librarian.md │ ├── csv-agent.md │ ├── elastic-query-generator.md │ ├── extraction-anthropic-functions.md │ ├── extraction-openai-functions.md │ ├── gemini-functions-agent.md │ ├── guardrails-output-parser.md │ ├── hybrid-search-weaviate.md │ ├── hyde.md │ ├── index.md │ ├── intel-rag-xeon.md │ ├── llama2-functions.md │ ├── mongo-parent-document-retrieval.md │ ├── neo4j-advanced-rag.md │ ├── neo4j-cypher-ft.md │ ├── neo4j-cypher-memory.md │ ├── neo4j-cypher.md │ ├── neo4j-generation.md │ ├── neo4j-parent.md │ ├── neo4j-semantic-layer.md │ ├── neo4j-semantic-ollama.md │ ├── neo4j-vector-memory.md │ ├── nvidia-rag-canonical.md │ ├── openai-functions-agent-gmail.md │ ├── openai-functions-agent.md │ ├── openai-functions-tool-retrieval-agent.md │ ├── pii-protected-chatbot.md │ ├── pirate-speak-configurable.md │ ├── pirate-speak.md │ ├── plate-chain.md │ ├── propositional-retrieval.md │ ├── python-lint.md │ ├── rag-astradb.md │ ├── rag-aws-bedrock.md │ ├── rag-aws-kendra.md │ ├── rag-azure-search.md │ ├── rag-chroma-multi-modal-multi-vector.md │ ├── rag-chroma-multi-modal.md │ ├── rag-chroma-private.md │ ├── rag-chroma.md │ ├── rag-codellama-fireworks.md │ ├── rag-conversation-zep.md │ ├── rag-conversation.md │ ├── rag-elasticsearch.md │ ├── rag-fusion.md │ ├── rag-gemini-multi-modal.md │ ├── rag-google-cloud-sensitive-data-protection.md │ ├── rag-google-cloud-vertexai-search.md │ ├── rag-gpt-crawler.md │ ├── rag-jaguardb.md │ ├── rag-lancedb.md │ ├── rag-lantern.md │ ├── rag-matching-engine.md │ ├── rag-momento-vector-index.md │ ├── rag-mongo.md │ ├── rag-multi-index-fusion.md │ ├── rag-multi-index-router.md │ ├── rag-multi-modal-local.md │ ├── rag-multi-modal-mv-local.md │ ├── rag-ollama-multi-query.md │ ├── rag-opensearch.md │ ├── rag-pinecone-multi-query.md │ ├── rag-pinecone-rerank.md │ ├── rag-pinecone.md │ ├── rag-redis-multi-modal-multi-vector.md │ ├── rag-redis.md │ ├── rag-self-query.md │ ├── rag-semi-structured.md │ ├── rag-singlestoredb.md │ ├── rag-supabase.md │ ├── rag-timescale-conversation.md │ ├── rag-timescale-hybrid-search-time.md │ ├── rag-vectara-multiquery.md │ ├── rag-vectara.md │ ├── rag-weaviate.md │ ├── research-assistant.md │ ├── retrieval-agent-fireworks.md │ ├── retrieval-agent.md │ ├── rewrite-retrieve-read.md │ ├── robocorp-action-server.md │ ├── self-query-qdrant.md │ ├── self-query-supabase.md │ ├── shopping-assistant.md │ ├── skeleton-of-thought.md │ ├── solo-performance-prompting-agent.md │ ├── sql-llama2.md │ ├── sql-llamacpp.md │ ├── sql-ollama.md │ ├── sql-pgvector.md │ ├── sql-research-assistant.md │ ├── stepback-qa-prompting.md │ ├── summarize-anthropic.md │ ├── vertexai-chuck-norris.md │ └── xml-agent.md ├── tutorials │ ├── agents.md │ ├── chatbot.md │ ├── classification.md │ ├── data_generation.md │ ├── extraction.md │ ├── graph.md │ ├── index.mdx │ ├── llm_chain.md │ ├── local_rag.md │ ├── qa_chat_history.md │ ├── query_analysis.md │ ├── rag.md │ ├── retrievers.md │ ├── sql_qa.md │ └── summarization.md └── versions │ ├── overview.mdx │ ├── packages.mdx │ ├── release_policy.mdx │ └── v0_2 │ ├── deprecations.mdx │ ├── index.mdx │ └── migrating_astream_events.mdx ├── docusaurus.config.js ├── package.json ├── sidebars.js ├── src ├── css │ └── custom.css ├── pages │ └── index.js └── theme │ ├── ChatModelTabs.js │ ├── CodeBlock │ └── index.js │ ├── Columns.js │ ├── DocItem │ └── Content │ │ └── index.js │ ├── DocPaginator │ └── index.js │ ├── DocVersionBanner │ └── index.js │ ├── Feedback.js │ └── People.js ├── static ├── .nojekyll ├── fonts │ ├── Manrope-VariableFont_wght.ttf │ └── PublicSans-VariableFont_wght.ttf ├── img │ ├── ApifyActors.png │ ├── HeliconeDashboard.png │ ├── HeliconeKeys.png │ ├── MetalDash.png │ ├── OSS_LLM_overview.png │ ├── ReAct.png │ ├── RemembrallDashboard.png │ ├── SQLDatabaseToolkit.png │ ├── agent.png │ ├── agents_use_case_1.png │ ├── agents_use_case_trace_1.png │ ├── agents_use_case_trace_2.png │ ├── agents_vs_chains.png │ ├── api_chain.png │ ├── api_chain_response.png │ ├── api_function_call.png │ ├── api_use_case.png │ ├── apple-touch-icon.png │ ├── brand │ │ ├── favicon.png │ │ ├── theme-image.png │ │ ├── wordmark-dark.png │ │ └── wordmark.png │ ├── chat_use_case.png │ ├── chat_use_case_2.png │ ├── code_retrieval.png │ ├── code_understanding.png │ ├── contextual_compression.jpg │ ├── conversational_retrieval_chain.png │ ├── cpal_diagram.png │ ├── create_sql_query_chain.png │ ├── data_connection.jpg │ ├── extraction.png │ ├── extraction_trace_few_shot.png │ ├── extraction_trace_function.png │ ├── extraction_trace_parsing.png │ ├── extraction_trace_tool.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ ├── google_generative_ai_1.jpg │ ├── google_imagen_1.png │ ├── google_imagen_2.png │ ├── google_imagen_3.png │ ├── google_imagen_4.png │ ├── google_vertex_ai_palm_1.png │ ├── graph_chain.webp │ ├── graph_construction1.png │ ├── graph_construction2.png │ ├── graph_semantic.png │ ├── graph_usecase.png │ ├── jupyter_screen.png │ ├── langchain_stack.png │ ├── llama-memory-weights.png │ ├── llama_t_put.png │ ├── map_reduce.jpg │ ├── map_rerank.jpg │ ├── memory_diagram.png │ ├── model_io.jpg │ ├── multi_vector.png │ ├── npm_run_serve.png │ ├── oai_function_agent.png │ ├── ollama_example_img.jpg │ ├── open_clip_1.png │ ├── open_clip_2.png │ ├── parrot-chainlink-icon.png │ ├── parrot-icon.png │ ├── portkey-dashboard.gif │ ├── portkey-tracing.png │ ├── qa_data_load.png │ ├── qa_intro.png │ ├── qa_privacy_protection.png │ ├── qrcode.jpg │ ├── query_analysis.png │ ├── rag_indexing.png │ ├── rag_retrieval_generation.png │ ├── refine.jpg │ ├── run_details.png │ ├── screen1.png │ ├── screenshot.png │ ├── self_querying.jpg │ ├── sql_usecase.png │ ├── sqldbchain_trace.png │ ├── stuff.jpg │ ├── summarization_use_case_1.png │ ├── summarization_use_case_2.png │ ├── summarization_use_case_3.png │ ├── summary_chains.png │ ├── tagging.png │ ├── tagging_trace.png │ ├── tool_agent.svg │ ├── tool_chain.svg │ ├── vector_stores.jpg │ ├── web_research.png │ ├── web_scraping.png │ ├── wsj_page.png │ ├── yarn_install.png │ └── yarn_run_start.png ├── js │ └── google_analytics.js └── svg │ ├── langchain_stack.svg │ └── langchain_stack_dark.svg ├── vercel.json ├── vercel_build.sh ├── vercel_requirements.txt └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | */ 9 | 10 | module.exports = { 11 | presets: [require.resolve("@docusaurus/core/lib/babel/preset")], 12 | }; 13 | -------------------------------------------------------------------------------- /docs/changes/changelog/core.mdx: -------------------------------------------------------------------------------- 1 | # LangChain-Core 2 | 3 | ## 0.1.x 4 | 5 | #### 弃用 6 | 7 | - `BaseChatModel` 类的 `__call__`,`call_as_llm`,`predict`,`predict_messages` 方法。将在 0.2.0 版本中移除。请使用 `BaseChatModel.invoke` 代替。 8 | 9 | - `BaseChatModel` 类的 `apredict`,`apredict_messages` 方法。将在 0.2.0 版本中移除。请使用 `BaseChatModel.ainvoke` 代替。 10 | 11 | - `BaseLLM` 类的 `__call__`,`predict`,`predict_messages` 方法。将在 0.2.0 版本中移除。请使用 `BaseLLM.invoke` 代替。 12 | 13 | - `BaseLLM` 类的 `apredict`,`apredict_messages` 方法。将在 0.2.0 版本中移除。请使用 `BaseLLM.ainvoke` 代替。 -------------------------------------------------------------------------------- /docs/contributing/faq.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_position: 6 4 | 5 | sidebar_label: 常见问题解答 6 | 7 | --- 8 | 9 | # 常见问题解答 10 | 11 | ## 拉取请求(Pull Requests,PRs) 12 | 13 | ### 我如何允许维护者编辑我的 PR? 14 | 15 | 当您提交拉取请求时,可能需要进行额外的更改才能合并它。通常情况下,维护者在合并之前自行进行这些更改会更有效率,而不是要求您在代码审查中进行更改。 16 | 17 | 默认情况下,大多数拉取请求的右侧边栏会有一个 18 | 19 | `✅ 维护者被允许编辑此拉取请求。` 20 | 21 | 徽章。 22 | 23 | 如果您没有看到这个徽章,可能是因为您在拉取请求的来源分支上关闭了此设置。请参阅[此 Github 文档页面](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) 24 | 25 | 以获取更多信息。 26 | 27 | 值得注意的是,Github 不允许在**组织**的 fork 上启用此设置([问题](https://github.com/orgs/community/discussions/5634))。 28 | 29 | 如果您在一个组织中工作,我们建议您从个人 fork 提交您的 PR,以启用此设置。 -------------------------------------------------------------------------------- /docs/how_to/toolkits.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_position: 3 4 | 5 | --- 6 | 7 | # 如何使用工具包 8 | 9 | 工具包是一组旨在一起使用以完成特定任务的工具集合。它们具有方便的加载方法。要获取可用的现成工具包的完整列表,请访问[Integrations](/docs/integrations/toolkits/)。 10 | 11 | 所有工具包都公开了一个 `get_tools` 方法,该方法返回一个工具列表。因此,您可以这样做: 12 | 13 | ```python 14 | # 初始化工具包 15 | toolkit = ExampleTookit(...) 16 | # 获取工具列表 17 | tools = toolkit.get_tools() 18 | # 创建代理 19 | agent = create_agent_method(llm, tools, prompt) 20 | ``` 21 | -------------------------------------------------------------------------------- /docs/integrations/chat/ai21.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_label: AI21 Labs 4 | 5 | --- 6 | 7 | # ChatAI21 8 | 9 | 这份笔记涵盖了如何开始使用 AI21 聊天模型。 10 | 11 | ## 安装 12 | 13 | ```python 14 | !pip install -qU langchain-ai21 15 | ``` 16 | 17 | ## 环境设置 18 | 19 | 我们需要获取一个 [AI21 API key](https://docs.ai21.com/) 并设置 `AI21_API_KEY` 环境变量: 20 | 21 | ```python 22 | import os 23 | from getpass import getpass 24 | os.environ["AI21_API_KEY"] = getpass() 25 | ``` 26 | 27 | ## 使用 28 | 29 | ```python 30 | from langchain_ai21 import ChatAI21 31 | from langchain_core.prompts import ChatPromptTemplate 32 | chat = ChatAI21(model="jamba-instruct") 33 | prompt = ChatPromptTemplate.from_messages( 34 | [ 35 | ("system", "You are a helpful assistant that translates English to French."), 36 | ("human", "Translate this sentence from English to French. {english_text}."), 37 | ] 38 | ) 39 | chain = prompt | chat 40 | chain.invoke({"english_text": "Hello, how are you?"}) 41 | ``` 42 | 43 | ```output 44 | AIMessage(content='Bonjour, comment vas-tu?') 45 | ``` -------------------------------------------------------------------------------- /docs/integrations/chat/minimax.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_label: MiniMax 4 | 5 | --- 6 | 7 | # MiniMaxChat 8 | 9 | [Minimax](https://api.minimax.chat) 是一家中国初创公司,为企业和个人提供 LLM 服务。 10 | 11 | 这个示例演示了如何使用 LangChain 与 MiniMax 推理聊天进行交互。 12 | 13 | ```python 14 | import os 15 | os.environ["MINIMAX_GROUP_ID"] = "MINIMAX_GROUP_ID" 16 | os.environ["MINIMAX_API_KEY"] = "MINIMAX_API_KEY" 17 | ``` 18 | 19 | ```python 20 | from langchain_community.chat_models import MiniMaxChat 21 | from langchain_core.messages import HumanMessage 22 | ``` 23 | 24 | ```python 25 | chat = MiniMaxChat() 26 | ``` 27 | 28 | ```python 29 | chat( 30 | [ 31 | HumanMessage( 32 | content="Translate this sentence from English to French. I love programming." 33 | ) 34 | ] 35 | ) 36 | ``` -------------------------------------------------------------------------------- /docs/integrations/chat/moonshot.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_label: 登月计划 4 | 5 | --- 6 | 7 | # 登月聊天 8 | 9 | [Moonshot](https://platform.moonshot.cn/) 是一家中国初创公司,为企业和个人提供 LLM 服务。 10 | 11 | 本示例介绍如何使用 LangChain 与 Moonshot 聊天推理进行交互。 12 | 13 | ```python 14 | import os 15 | # 从 https://platform.moonshot.cn/console/api-keys 生成你的 API 密钥 16 | os.environ["MOONSHOT_API_KEY"] = "MOONSHOT_API_KEY" 17 | ``` 18 | 19 | ```python 20 | from langchain_community.chat_models.moonshot import MoonshotChat 21 | from langchain_core.messages import HumanMessage, SystemMessage 22 | ``` 23 | 24 | ```python 25 | chat = MoonshotChat() 26 | # 或者使用特定的模型 27 | # 可用模型:https://platform.moonshot.cn/docs 28 | # chat = MoonshotChat(model="moonshot-v1-128k") 29 | ``` 30 | 31 | ```python 32 | messages = [ 33 | SystemMessage( 34 | content="你是一个有帮助的助手,可以将英语翻译成法语。" 35 | ), 36 | HumanMessage( 37 | content="将这个句子从英语翻译成法语。我喜欢编程。" 38 | ), 39 | ] 40 | chat.invoke(messages) 41 | ``` -------------------------------------------------------------------------------- /docs/integrations/chat/solar.md: -------------------------------------------------------------------------------- 1 | ```python 2 | import os 3 | os.environ["SOLAR_API_KEY"] = "SOLAR_API_KEY" 4 | from langchain_community.chat_models.solar import SolarChat 5 | from langchain_core.messages import HumanMessage, SystemMessage 6 | chat = SolarChat(max_tokens=1024) 7 | messages = [ 8 | SystemMessage( 9 | content="你是一个有帮助的助手,可以将英文翻译成韩文。" 10 | ), 11 | HumanMessage( 12 | content="将这个句子从英文翻译成韩文。我想建立一个大型语言模型的项目。" 13 | ), 14 | ] 15 | chat.invoke(messages) 16 | ``` 17 | 18 | ```output 19 | AIMessage(content='저는 대형 언어 모델 프로젝트를 구축하고 싶습니다.') 20 | ``` 21 | -------------------------------------------------------------------------------- /docs/integrations/chat_loaders/twitter.md: -------------------------------------------------------------------------------- 1 | # Twitter (通过 Apify) 2 | 3 | 这个笔记本展示了如何从 Twitter 加载聊天消息进行微调。我们通过利用 Apify 来实现这一点。 4 | 5 | 首先,使用 Apify 导出推文。一个示例 6 | 7 | ```python 8 | import json 9 | from langchain_community.adapters.openai import convert_message_to_dict 10 | from langchain_core.messages import AIMessage 11 | ``` 12 | 13 | ```python 14 | with open("example_data/dataset_twitter-scraper_2023-08-23_22-13-19-740.json") as f: 15 | data = json.load(f) 16 | ``` 17 | 18 | ```python 19 | # 过滤引用其他推文的推文,因为这有点奇怪 20 | tweets = [d["full_text"] for d in data if "t.co" not in d["full_text"]] 21 | # 将它们创建为 AI 消息 22 | messages = [AIMessage(content=t) for t in tweets] 23 | # 在开头添加一个系统消息 24 | # TODO: 我们可以尝试从推文中提取主题,并将其放入系统消息中。 25 | system_message = {"role": "system", "content": "write a tweet"} 26 | data = [[system_message, convert_message_to_dict(m)] for m in messages] 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/acreom.md: -------------------------------------------------------------------------------- 1 | # acreom 2 | 3 | [acreom](https://acreom.com) 是一个以开发者为先的知识库,任务运行在本地的 markdown 文件上。 4 | 5 | 以下是一个示例,演示如何将本地的 acreom 保险库加载到 Langchain 中。由于 acreom 中的本地保险库是一组纯文本的 .md 文件夹,加载程序需要指定目录的路径。 6 | 7 | 保险库文件可能包含一些存储为 YAML 头部的元数据。如果 `collect_metadata` 设置为 true,这些值将被添加到文档的元数据中。 8 | 9 | ```python 10 | from langchain_community.document_loaders import AcreomLoader 11 | ``` 12 | 13 | ```python 14 | loader = AcreomLoader("", collect_metadata=False) 15 | ``` 16 | 17 | ```python 18 | docs = loader.load() 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/azure_blob_storage_file.md: -------------------------------------------------------------------------------- 1 | # Azure Blob 存储文件 2 | 3 | [**Azure Files**](https://learn.microsoft.com/en-us/azure/storage/files/storage-files-introduction) 提供了在云中可通过行业标准的 Server Message Block (`SMB`) 协议、Network File System (`NFS`) 协议和 `Azure Files REST API` 访问的完全托管文件共享。 4 | 5 | 这里介绍了如何从 Azure Files 中加载文档对象。 6 | 7 | ```python 8 | %pip install --upgrade --quiet azure-storage-blob 9 | ``` 10 | 11 | ```python 12 | from langchain_community.document_loaders import AzureBlobStorageFileLoader 13 | ``` 14 | 15 | ```python 16 | loader = AzureBlobStorageFileLoader( 17 | conn_str="", 18 | container="", 19 | blob_name="", 20 | ) 21 | ``` 22 | 23 | ```python 24 | loader.load() 25 | ``` 26 | 27 | ```output 28 | [Document(page_content='Lorem ipsum dolor sit amet.', lookup_str='', metadata={'source': '/var/folders/y6/8_bzdg295ld6s1_97_12m4lr0000gn/T/tmpxvave6wl/fake.docx'}, lookup_index=0)] 29 | ``` 30 | 31 | ![Azure Blob Storage](https://example.com/azure_blob_storage.png) -------------------------------------------------------------------------------- /docs/integrations/document_loaders/blackboard.md: -------------------------------------------------------------------------------- 1 | # 黑板 2 | 3 | [Blackboard Learn](https://en.wikipedia.org/wiki/Blackboard_Learn)(之前称为 Blackboard 学习管理系统)是由 Blackboard 公司开发的基于网络的虚拟学习环境和学习管理系统。该软件具有课程管理、可定制的开放式架构和可扩展的设计,可以与学生信息系统和认证协议集成。它可以安装在本地服务器上,由 Blackboard ASP Solutions 托管,也可以作为由 Amazon Web Services 托管的软件即服务提供。其主要目的是在传统面对面课程中添加在线元素,并开发几乎没有或没有面对面会议的完全在线课程。 4 | 5 | 这里介绍了如何从 [Blackboard Learn](https://www.anthology.com/products/teaching-and-learning/learning-effectiveness/blackboard-learn) 实例中加载数据。 6 | 7 | 此加载器不兼容所有的 `Blackboard` 课程。它只兼容使用新的 `Blackboard` 接口的课程。要使用此加载器,您必须拥有 BbRouter cookie。您可以通过登录课程,然后从浏览器的开发者工具中复制 BbRouter cookie 的值来获取此 cookie。 8 | 9 | ```python 10 | from langchain_community.document_loaders import BlackboardLoader 11 | loader = BlackboardLoader( 12 | blackboard_course_url="https://blackboard.example.com/webapps/blackboard/execute/announcement?method=search&context=course_entry&course_id=_123456_1", 13 | bbrouter="expires:12345...", 14 | load_all_recursively=True, 15 | ) 16 | documents = loader.load() 17 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/chatgpt_loader.md: -------------------------------------------------------------------------------- 1 | # ChatGPT 数据 2 | 3 | [ChatGPT](https://chat.openai.com) 是由 OpenAI 开发的人工智能(AI)聊天机器人。 4 | 5 | 本笔记涵盖了如何从您的 ChatGPT 数据导出文件夹中加载 `conversations.json`。 6 | 7 | 您可以通过电子邮件获取您的数据导出,方法是访问:https://chat.openai.com/ -> (个人资料) - 设置 -> 导出数据 -> 确认导出。 8 | 9 | ```python 10 | from langchain_community.document_loaders.chatgpt import ChatGPTLoader 11 | ``` 12 | 13 | ```python 14 | loader = ChatGPTLoader(log_file="./example_data/fake_conversations.json", num_logs=1) 15 | ``` 16 | 17 | ```python 18 | loader.load() 19 | ``` 20 | 21 | ```output 22 | [Document(page_content="AI Overlords - AI on 2065-01-24 05:20:50: Greetings, humans. I am Hal 9000. You can trust me completely.\n\nAI Overlords - human on 2065-01-24 05:21:20: Nice to meet you, Hal. I hope you won't develop a mind of your own.\n\n", metadata={'source': './example_data/fake_conversations.json'})] 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/concurrent.md: -------------------------------------------------------------------------------- 1 | # 并发加载器 2 | 3 | 对于那些选择优化工作流程的人来说,与通用加载器的工作方式相同,但具有并发加载功能。 4 | 5 | ```python 6 | from langchain_community.document_loaders import ConcurrentLoader 7 | ``` 8 | 9 | ```python 10 | loader = ConcurrentLoader.from_filesystem("example_data/", glob="**/*.txt") 11 | ``` 12 | 13 | ```python 14 | files = loader.load() 15 | ``` 16 | 17 | ```python 18 | len(files) 19 | ``` 20 | 21 | ```output 22 | 2 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/conll-u.md: -------------------------------------------------------------------------------- 1 | # CoNLL-U 2 | 3 | >[CoNLL-U](https://universaldependencies.org/format.html) 是 CoNLL-X 格式的修订版本。注释以纯文本文件的形式进行编码(UTF-8 编码,使用 LF 字符作为换行符,文件末尾包含一个 LF 字符),文件中包含三种类型的行: 4 | 5 | >- 单词行,包含由单个制表符分隔的 10 个字段的单词/标记的注释;请参见下文。 6 | 7 | >- 空行,标记句子边界。 8 | 9 | >- 以井号(#)开头的注释行。 10 | 11 | 这是一个加载 [CoNLL-U](https://universaldependencies.org/format.html) 格式文件的示例。整个文件被视为一个文档。示例数据(`conllu.conllu`)基于标准的 UD/CoNLL-U 示例之一。 12 | 13 | ```python 14 | from langchain_community.document_loaders import CoNLLULoader 15 | ``` 16 | 17 | ```python 18 | loader = CoNLLULoader("example_data/conllu.conllu") 19 | ``` 20 | 21 | ```python 22 | document = loader.load() 23 | ``` 24 | 25 | ```python 26 | document 27 | ``` 28 | 29 | ```output 30 | [Document(page_content='They buy and sell books.', metadata={'source': 'example_data/conllu.conllu'})] 31 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/copypaste.md: -------------------------------------------------------------------------------- 1 | # 复制粘贴 2 | 3 | 本文介绍如何从你想要复制粘贴的内容中加载一个文档对象。在这种情况下,你甚至不需要使用 DocumentLoader,而是可以直接构造 Document 对象。 4 | 5 | ```python 6 | from langchain_core.documents import Document 7 | ``` 8 | 9 | ```python 10 | text = ".....将你复制粘贴的文本放在这里......" 11 | ``` 12 | 13 | ```python 14 | doc = Document(page_content=text) 15 | ``` 16 | 17 | ## 元数据 18 | 19 | 如果你想添加关于这段文本的来源的元数据,你可以很容易地使用 metadata 键。 20 | 21 | ```python 22 | metadata = {"source": "internet", "date": "Friday"} 23 | ``` 24 | 25 | ```python 26 | doc = Document(page_content=text, metadata=metadata) 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/fauna.md: -------------------------------------------------------------------------------- 1 | # Fauna 2 | 3 | >[Fauna](https://fauna.com/) 是一种文档数据库。 4 | 5 | 查询 `Fauna` 文档 6 | 7 | ```python 8 | %pip install --upgrade --quiet fauna 9 | ``` 10 | 11 | ## 查询数据示例 12 | 13 | ```python 14 | from langchain_community.document_loaders.fauna import FaunaLoader 15 | secret = "<输入有效的 Fauna 密钥>" 16 | query = "Item.all()" # Fauna 查询。假设集合名称为 "Item" 17 | field = "text" # 包含页面内容的字段。假设字段名称为 "text" 18 | loader = FaunaLoader(query, field, secret) 19 | docs = loader.lazy_load() 20 | for value in docs: 21 | print(value) 22 | ``` 23 | 24 | ### 分页查询 25 | 26 | 如果有更多数据,您将获得一个 `after` 值。您可以通过在查询中传入 `after` 字符串来获取游标之后的值。 27 | 28 | 要了解更多,请访问[此链接](https://fqlx-beta--fauna-docs.netlify.app/fqlx/beta/reference/schema_entities/set/static-paginate) 29 | 30 | ```python 31 | query = """ 32 | Item.paginate("hs+DzoPOg ... aY1hOohozrV7A") 33 | Item.all() 34 | """ 35 | loader = FaunaLoader(query, field, secret) 36 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/gutenberg.md: -------------------------------------------------------------------------------- 1 | # 古腾堡计划 2 | 3 | [古腾堡计划](https://www.gutenberg.org/about/)是一个提供免费电子书的在线图书馆。 4 | 5 | 这篇笔记介绍了如何将`古腾堡计划`的电子书链接加载到我们可以在下游使用的文档格式中。 6 | 7 | ```python 8 | from langchain_community.document_loaders import GutenbergLoader 9 | ``` 10 | 11 | ```python 12 | loader = GutenbergLoader("https://www.gutenberg.org/cache/epub/69972/pg69972.txt") 13 | ``` 14 | 15 | ```python 16 | data = loader.load() 17 | ``` 18 | 19 | ```python 20 | data[0].page_content[:300] 21 | ``` 22 | 23 | ```output 24 | '《改变的新娘》,作者 Emma Dorothy\r\n\n\nEliza Nevitte Southworth 的古腾堡计划电子书\r\n\n\n\r\n\n\n本电子书可供美国境内和\r\n\n\n世界大部分其他地区的任何人免费使用,几乎没有任何限制\r\n\n\n。您可以复制、赠送或重新使用' 25 | ``` 26 | 27 | ```python 28 | data[0].metadata 29 | ``` 30 | 31 | ```output 32 | {'source': 'https://www.gutenberg.org/cache/epub/69972/pg69972.txt'} 33 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/iugu.md: -------------------------------------------------------------------------------- 1 | # Iugu 2 | 3 | [Iugu](https://www.iugu.com/) 是一家巴西服务和软件即服务(SaaS)公司。它提供用于电子商务网站和移动应用程序的支付处理软件和应用程序编程接口。 4 | 5 | 本文介绍了如何从 `Iugu REST API` 加载数据,以便将其转换为可被 LangChain 吸收的格式,并提供了向量化的示例用法。 6 | 7 | ```python 8 | from langchain.indexes import VectorstoreIndexCreator 9 | from langchain_community.document_loaders import IuguLoader 10 | ``` 11 | 12 | Iugu API 需要访问令牌,该访问令牌可以在 Iugu 仪表板中找到。 13 | 14 | 此文档加载程序还需要一个 `resource` 选项,用于定义要加载的数据。 15 | 16 | 以下资源可用: 17 | 18 | `Documentation` [Documentation](https://dev.iugu.com/reference/metadados) 19 | 20 | ```python 21 | iugu_loader = IuguLoader("charges") 22 | ``` 23 | 24 | ```python 25 | # 从加载程序创建一个 vectorstore retriever 26 | # 有关更多详细信息,请参阅 https://python.langchain.com/en/latest/modules/data_connection/getting_started.html 27 | index = VectorstoreIndexCreator().from_loaders([iugu_loader]) 28 | iugu_doc_retriever = index.vectorstore.as_retriever() 29 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/joplin.md: -------------------------------------------------------------------------------- 1 | # Joplin 2 | 3 | [Joplin](https://joplinapp.org/) 是一款开源的笔记应用。您可以记录自己的想法,并安全地从任何设备访问它们。 4 | 5 | 这本笔记本介绍了如何从 `Joplin` 数据库中加载文档。 6 | 7 | `Joplin` 提供了用于访问其本地数据库的 [REST API](https://joplinapp.org/api/references/rest_api/)。此加载程序使用 API 来检索数据库中的所有笔记及其元数据。这需要一个访问令牌,可以通过以下步骤从应用程序中获取: 8 | 9 | 1. 打开 `Joplin` 应用。在加载文档时,应用程序必须保持打开状态。 10 | 11 | 2. 转到设置/选项,然后选择 "Web Clipper"。 12 | 13 | 3. 确保 Web Clipper 服务已启用。 14 | 15 | 4. 在 "高级选项" 下,复制授权令牌。 16 | 17 | 您可以直接使用访问令牌初始化加载程序,也可以将其存储在环境变量 JOPLIN_ACCESS_TOKEN 中。 18 | 19 | 除此之外,还有一种方法是将 `Joplin` 的笔记数据库导出为 Markdown 文件(可选地,包含 Front Matter 元数据),然后使用 Markdown 加载程序(例如 ObsidianLoader)来加载它们。 20 | 21 | ```python 22 | from langchain_community.document_loaders import JoplinLoader 23 | ``` 24 | 25 | ```python 26 | loader = JoplinLoader(access_token="") 27 | ``` 28 | 29 | ```python 30 | docs = loader.load() 31 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/lakefs.md: -------------------------------------------------------------------------------- 1 | # lakeFS 2 | 3 | [lakeFS](https://docs.lakefs.io/) 提供了对数据湖的可扩展版本控制,并使用类似 Git 的语义来创建和访问这些版本。 4 | 5 | 这份笔记涵盖了如何从 `lakeFS` 路径加载文档对象(无论是对象还是前缀)。 6 | 7 | ## 初始化 lakeFS 加载器 8 | 9 | 用你自己的值替换 `ENDPOINT`、`LAKEFS_ACCESS_KEY` 和 `LAKEFS_SECRET_KEY`。 10 | 11 | ```python 12 | from langchain_community.document_loaders import LakeFSLoader 13 | ``` 14 | 15 | ```python 16 | ENDPOINT = "" 17 | LAKEFS_ACCESS_KEY = "" 18 | LAKEFS_SECRET_KEY = "" 19 | lakefs_loader = LakeFSLoader( 20 | lakefs_access_key=LAKEFS_ACCESS_KEY, 21 | lakefs_secret_key=LAKEFS_SECRET_KEY, 22 | lakefs_endpoint=ENDPOINT, 23 | ) 24 | ``` 25 | 26 | ## 指定路径 27 | 28 | 您可以指定前缀或完整对象路径来控制要加载的文件。 29 | 30 | 在相应的 `REPO`、`REF` 和 `PATH` 中指定仓库、引用(分支、提交 ID 或标签)和路径以加载文档: 31 | 32 | ```python 33 | REPO = "" 34 | REF = "" 35 | PATH = "" 36 | lakefs_loader.set_repo(REPO) 37 | lakefs_loader.set_ref(REF) 38 | lakefs_loader.set_path(PATH) 39 | docs = lakefs_loader.load() 40 | docs 41 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/merge_doc.md: -------------------------------------------------------------------------------- 1 | # 合并文档加载器 2 | 3 | 合并一组指定数据加载器返回的文档。 4 | 5 | ```python 6 | from langchain_community.document_loaders import WebBaseLoader 7 | loader_web = WebBaseLoader( 8 | "https://github.com/basecamp/handbook/blob/master/37signals-is-you.md" 9 | ) 10 | ``` 11 | 12 | ```python 13 | from langchain_community.document_loaders import PyPDFLoader 14 | loader_pdf = PyPDFLoader("../MachineLearning-Lecture01.pdf") 15 | ``` 16 | 17 | ```python 18 | from langchain_community.document_loaders.merge import MergedDataLoader 19 | loader_all = MergedDataLoader(loaders=[loader_web, loader_pdf]) 20 | ``` 21 | 22 | ```python 23 | docs_all = loader_all.load() 24 | ``` 25 | 26 | ```python 27 | len(docs_all) 28 | ``` 29 | 30 | ```output 31 | 23 32 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/notion.md: -------------------------------------------------------------------------------- 1 | # Notion 数据库 1/2 2 | 3 | >[Notion](https://www.notion.so/) 是一个协作平台,支持修改的 Markdown,并集成了看板、任务、维基和数据库功能。它是一个集合了笔记、知识和数据管理以及项目和任务管理的多合一工作空间。 4 | 5 | 本文介绍了如何从 Notion 数据库导入文档。 6 | 7 | 要获取 Notion 数据库导出文件,请按照以下步骤操作: 8 | 9 | ## 🧑 自定义数据集的导入说明 10 | 11 | 从 Notion 导出您的数据集。您可以点击右上角的三个点,然后点击“导出”来完成此操作。 12 | 13 | 在导出时,请确保选择“Markdown & CSV”格式选项。 14 | 15 | 这将在您的下载文件夹中生成一个 `.zip` 文件。将 `.zip` 文件移动到此存储库中。 16 | 17 | 运行以下命令解压缩 zip 文件(根据需要替换 `Export...` 为您自己的文件名)。 18 | 19 | ```shell 20 | unzip Export-d3adfe0f-3131-4bf3-8987-a52017fc1bae.zip -d Notion_DB 21 | ``` 22 | 23 | 运行以下命令导入数据。 24 | 25 | ```python 26 | from langchain_community.document_loaders import NotionDirectoryLoader 27 | ``` 28 | 29 | ```python 30 | loader = NotionDirectoryLoader("Notion_DB") 31 | ``` 32 | 33 | ```python 34 | docs = loader.load() 35 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/obsidian.md: -------------------------------------------------------------------------------- 1 | # Obsidian 2 | 3 | [Obsidian](https://obsidian.md/) 是一个功能强大且可扩展的知识库,它可以在本地的纯文本文件夹上运行。 4 | 5 | 本笔记本介绍了如何从 `Obsidian` 数据库加载文档。 6 | 7 | 由于 `Obsidian` 仅以 Markdown 文件夹的形式存储在磁盘上,因此加载程序只需获取到该目录的路径。 8 | 9 | `Obsidian` 文件有时还包含[元数据](https://help.obsidian.md/Editing+and+formatting/Metadata),这是文件顶部的 YAML 块。这些值将被添加到文档的元数据中。(`ObsidianLoader` 也可以传递 `collect_metadata=False` 参数来禁用此行为。) 10 | 11 | ```python 12 | from langchain_community.document_loaders import ObsidianLoader 13 | ``` 14 | 15 | ```python 16 | loader = ObsidianLoader("") 17 | ``` 18 | 19 | ```python 20 | docs = loader.load() 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/odt.md: -------------------------------------------------------------------------------- 1 | # 开放文档格式(ODT) 2 | 3 | [办公应用开放文档格式(ODF)](https://en.wikipedia.org/wiki/OpenDocument),也称为 `OpenDocument`,是一种用于文字处理文档、电子表格、演示文稿和图形的开放文件格式,使用 ZIP 压缩的 XML 文件。它的开发目的是为办公应用提供一种开放的基于 XML 的文件格式规范。 4 | 5 | 这一标准是由结构化信息标准促进组织(`OASIS`)的技术委员会开发和维护的。它基于 Sun Microsystems 为 OpenOffice.org XML 制定的规范,这是 `OpenOffice.org` 和 `LibreOffice` 的默认格式。最初是为 `StarOffice` 开发的,旨在为办公文档提供一个开放的标准。 6 | 7 | `UnstructuredODTLoader` 用于加载 `Open Office ODT` 文件。 8 | 9 | ```python 10 | from langchain_community.document_loaders import UnstructuredODTLoader 11 | ``` 12 | 13 | ```python 14 | loader = UnstructuredODTLoader("example_data/fake.odt", mode="elements") 15 | docs = loader.load() 16 | docs[0] 17 | ``` 18 | 19 | ```output 20 | Document(page_content='Lorem ipsum dolor sit amet.', metadata={'source': 'example_data/fake.odt', 'filename': 'example_data/fake.odt', 'category': 'Title'}) 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/org_mode.md: -------------------------------------------------------------------------------- 1 | # Org-mode 2 | 3 | [Org Mode](https://en.wikipedia.org/wiki/Org-mode) 是一种用于编辑、格式化和组织文档的模式,专为在自由软件文本编辑器 Emacs 中进行笔记、计划和撰写而设计。 4 | 5 | ## `UnstructuredOrgModeLoader` 6 | 7 | 您可以使用 `UnstructuredOrgModeLoader` 从 Org-mode 文件中加载数据,使用以下工作流程。 8 | 9 | ```python 10 | from langchain_community.document_loaders import UnstructuredOrgModeLoader 11 | ``` 12 | 13 | ```python 14 | loader = UnstructuredOrgModeLoader(file_path="example_data/README.org", mode="elements") 15 | docs = loader.load() 16 | ``` 17 | 18 | ```python 19 | print(docs[0]) 20 | ``` 21 | 22 | ```output 23 | page_content='Example Docs' metadata={'source': 'example_data/README.org', 'filename': 'README.org', 'file_directory': 'example_data', 'filetype': 'text/org', 'page_number': 1, 'category': 'Title'} 24 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/readthedocs_documentation.md: -------------------------------------------------------------------------------- 1 | # ReadTheDocs 文档 2 | 3 | >[Read the Docs](https://readthedocs.org/) 是一个开源的免费软件文档托管平台。它使用 `Sphinx` 文档生成器生成文档。 4 | 5 | 本文档介绍了如何加载作为 `Read-The-Docs` 构建的一部分生成的 HTML 内容。 6 | 7 | 例如,可以参考[这里](https://github.com/langchain-ai/chat-langchain)。 8 | 9 | 这假设 HTML 已经被抓取到一个文件夹中。可以通过取消注释并运行以下命令来完成此操作 10 | 11 | ```python 12 | %pip install --upgrade --quiet beautifulsoup4 13 | ``` 14 | 15 | ```python 16 | #!wget -r -A.html -P rtdocs https://python.langchain.com/en/latest/ 17 | ``` 18 | 19 | ```python 20 | from langchain_community.document_loaders import ReadTheDocsLoader 21 | ``` 22 | 23 | ```python 24 | loader = ReadTheDocsLoader("rtdocs", features="html.parser") 25 | ``` 26 | 27 | ```python 28 | docs = loader.load() 29 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/roam.md: -------------------------------------------------------------------------------- 1 | # Roam 2 | 3 | >[ROAM](https://roamresearch.com/) 是一个用于网络化思维的笔记工具,旨在创建个人知识库。 4 | 5 | 本笔记本介绍了如何从 Roam 数据库加载文档。这在很大程度上受到了这个示例存储库 [here](https://github.com/JimmyLv/roam-qa) 的启发。 6 | 7 | ## 🧑 自定义数据集加载说明 8 | 9 | 从 Roam Research 导出您的数据集。您可以通过单击右上角的三个点,然后单击 `Export` 来执行此操作。 10 | 11 | 在导出时,请确保选择 `Markdown & CSV` 格式选项。 12 | 13 | 这将在您的下载文件夹中生成一个 `.zip` 文件。将 `.zip` 文件移动到此存储库中。 14 | 15 | 运行以下命令以解压缩 zip 文件(根据需要将 `Export...` 替换为您自己的文件名)。 16 | 17 | ```shell 18 | unzip Roam-Export-1675782732639.zip -d Roam_DB 19 | ``` 20 | 21 | ```python 22 | from langchain_community.document_loaders import RoamLoader 23 | ``` 24 | 25 | ```python 26 | loader = RoamLoader("Roam_DB") 27 | ``` 28 | 29 | ```python 30 | docs = loader.load() 31 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/rst.md: -------------------------------------------------------------------------------- 1 | # RST 2 | 3 | > [reStructured Text (RST)](https://en.wikipedia.org/wiki/ReStructuredText) 文件是一种用于文本数据的文件格式,主要在 Python 编程语言社区中用于技术文档。 4 | 5 | ## `UnstructuredRSTLoader` 6 | 7 | 您可以使用 `UnstructuredRSTLoader` 从 RST 文件中加载数据,具体操作如下。 8 | 9 | ```python 10 | from langchain_community.document_loaders import UnstructuredRSTLoader 11 | ``` 12 | 13 | ```python 14 | loader = UnstructuredRSTLoader(file_path="example_data/README.rst", mode="elements") 15 | docs = loader.load() 16 | ``` 17 | 18 | ```python 19 | print(docs[0]) 20 | ``` 21 | 22 | ```output 23 | page_content='Example Docs' metadata={'source': 'example_data/README.rst', 'filename': 'README.rst', 'file_directory': 'example_data', 'filetype': 'text/x-rst', 'page_number': 1, 'category': 'Title'} 24 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/slack.md: -------------------------------------------------------------------------------- 1 | # Slack 2 | 3 | >[Slack](https://slack.com/) 是一款即时通讯程序。 4 | 5 | 本文介绍了如何从由 `Slack` 导出生成的 Zip 文件中加载文档。 6 | 7 | 要获取这个 `Slack` 导出文件,请按照以下说明操作: 8 | 9 | ## 🧑 获取自己的数据集的说明 10 | 11 | 导出你的 Slack 数据。你可以通过转到你的 Workspace 管理页面并点击导入/导出选项 ({your_slack_domain}.slack.com/services/export) 来完成这个操作。然后,选择正确的日期范围并点击 `开始导出`。Slack 会在导出准备好时给你发送电子邮件和直接消息。 12 | 13 | 下载会在你的下载文件夹中产生一个 `.zip` 文件(或者根据你的操作系统配置,可能会在其他位置)。 14 | 15 | 复制 `.zip` 文件的路径,并将其分配为下面的 `LOCAL_ZIPFILE`。 16 | 17 | ```python 18 | from langchain_community.document_loaders import SlackDirectoryLoader 19 | ``` 20 | 21 | ```python 22 | # 可选地设置你的 Slack URL。这将为你提供文档来源的正确 URL。 23 | SLACK_WORKSPACE_URL = "https://xxx.slack.com" 24 | LOCAL_ZIPFILE = "" # 在这里粘贴你的 Slack zip 文件的本地路径。 25 | loader = SlackDirectoryLoader(LOCAL_ZIPFILE, SLACK_WORKSPACE_URL) 26 | ``` 27 | 28 | ```python 29 | docs = loader.load() 30 | docs 31 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/tencent_cos_file.md: -------------------------------------------------------------------------------- 1 | # 腾讯云对象存储(COS) 2 | 3 | [腾讯云对象存储(COS)](https://www.tencentcloud.com/products/cos)是一项分布式存储服务,可以通过HTTP/HTTPS协议从任何地方存储任意数量的数据。`COS`对数据结构或格式没有限制。它还没有存储桶大小限制和分区管理,适用于几乎任何用例,如数据传输、数据处理和数据湖。`COS`提供基于Web的控制台、多语言SDK和API、命令行工具和图形工具。它与Amazon S3 API配合良好,允许您快速访问社区工具和插件。 4 | 5 | 这里介绍了如何从`腾讯COS文件`中加载文档对象。 6 | 7 | ```python 8 | %pip install --upgrade --quiet cos-python-sdk-v5 9 | ``` 10 | 11 | ```python 12 | from langchain_community.document_loaders import TencentCOSFileLoader 13 | from qcloud_cos import CosConfig 14 | ``` 15 | 16 | ```python 17 | conf = CosConfig( 18 | Region="your cos region", 19 | SecretId="your cos secret_id", 20 | SecretKey="your cos secret_key", 21 | ) 22 | loader = TencentCOSFileLoader(conf=conf, bucket="you_cos_bucket", key="fake.docx") 23 | ``` 24 | 25 | ```python 26 | loader.load() 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/weather.md: -------------------------------------------------------------------------------- 1 | # 天气 2 | 3 | >[OpenWeatherMap](https://openweathermap.org/) 是一个开源的天气服务提供商。 4 | 5 | 这个加载器从 OpenWeatherMap 的 OneCall API 获取天气数据,使用 pyowm Python 包。您必须使用您的 OpenWeatherMap API 令牌和您想要获取天气数据的城市名称来初始化加载器。 6 | 7 | ```python 8 | from langchain_community.document_loaders import WeatherDataLoader 9 | ``` 10 | 11 | ```python 12 | %pip install --upgrade --quiet pyowm 13 | ``` 14 | 15 | ```python 16 | # 通过直接传递给构造函数或设置环境变量 "OPENWEATHERMAP_API_KEY" 来设置 API 密钥。 17 | from getpass import getpass 18 | OPENWEATHERMAP_API_KEY = getpass() 19 | ``` 20 | 21 | ```python 22 | loader = WeatherDataLoader.from_params( 23 | ["chennai", "vellore"], openweathermap_api_key=OPENWEATHERMAP_API_KEY 24 | ) 25 | ``` 26 | 27 | ```python 28 | documents = loader.load() 29 | documents 30 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/whatsapp_chat.md: -------------------------------------------------------------------------------- 1 | # WhatsApp 聊天 2 | 3 | [WhatsApp](https://www.whatsapp.com/)(也称为 `WhatsApp Messenger`)是一款免费的跨平台集中式即时通讯(IM)和网络电话(VoIP)服务。它允许用户发送文本和语音消息,进行语音和视频通话,以及分享图片、文档、用户位置和其他内容。 4 | 5 | 这篇笔记介绍了如何将 `WhatsApp 聊天` 中的数据加载到可以被 LangChain 吸收的格式中。 6 | 7 | ```python 8 | from langchain_community.document_loaders import WhatsAppChatLoader 9 | ``` 10 | 11 | ```python 12 | loader = WhatsAppChatLoader("example_data/whatsapp_chat.txt") 13 | ``` 14 | 15 | ```python 16 | loader.load() 17 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/wikipedia.md: -------------------------------------------------------------------------------- 1 | # 维基百科 2 | 3 | [维基百科](https://wikipedia.org/)是一个由志愿者社区(称为维基人)撰写和维护的多语言免费在线百科全书,通过开放协作并使用名为MediaWiki的基于维基的编辑系统。`维基百科`是历史上最大且阅读量最高的参考作品。 4 | 5 | 这篇笔记展示了如何从`wikipedia.org`加载维基页面到我们下游使用的文档格式。 6 | 7 | ## 安装 8 | 9 | 首先,您需要安装`wikipedia` python包。 10 | 11 | ```python 12 | %pip install --upgrade --quiet wikipedia 13 | ``` 14 | 15 | ## 示例 16 | 17 | `WikipediaLoader`有以下参数: 18 | 19 | - `query`: 用于在维基百科中查找文档的自由文本 20 | 21 | - 可选 `lang`: 默认值为"en"。用于在特定语言部分的维基百科中进行搜索 22 | 23 | - 可选 `load_max_docs`: 默认值为100。用于限制下载文档的数量。下载所有100个文档需要时间,因此在实验中使用较小的数字。目前有一个硬性限制为300。 24 | 25 | - 可选 `load_all_available_meta`: 默认值为False。默认情况下,仅下载最重要的字段:`Published`(文档发布/最后更新日期)、`title`、`Summary`。如果为True,则还会下载其他字段。 26 | 27 | ```python 28 | from langchain_community.document_loaders import WikipediaLoader 29 | ``` 30 | 31 | ```python 32 | docs = WikipediaLoader(query="HUNTER X HUNTER", load_max_docs=2).load() 33 | len(docs) 34 | ``` 35 | 36 | ```python 37 | docs[0].metadata # 文档的元信息 38 | ``` 39 | 40 | ```python 41 | docs[0].page_content[:400] # 文档的内容 42 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/xml.md: -------------------------------------------------------------------------------- 1 | # XML 2 | 3 | `UnstructuredXMLLoader` 用于加载 `XML` 文件。该加载器适用于 `.xml` 文件。页面内容将是从 XML 标签中提取的文本。 4 | 5 | ```python 6 | from langchain_community.document_loaders import UnstructuredXMLLoader 7 | ``` 8 | 9 | ```python 10 | loader = UnstructuredXMLLoader( 11 | "example_data/factbook.xml", 12 | ) 13 | docs = loader.load() 14 | docs[0] 15 | ``` 16 | 17 | ```output 18 | Document(page_content='美国\n\n华盛顿特区\n\n乔·拜登\n\n棒球\n\n加拿大\n\n渥太华\n\n贾斯汀·特鲁多\n\n曲棍球\n\n法国\n\n巴黎\n\n埃马纽埃尔·马克龙\n\n足球\n\n特立尼达和多巴哥\n\n西班牙港\n\n基思·罗利\n\n田径', metadata={'source': 'example_data/factbook.xml'}) 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/document_loaders/yuque.md: -------------------------------------------------------------------------------- 1 | # 语雀 2 | 3 | >[语雀](https://www.yuque.com/) 是一个专业的基于云的知识库,用于团队协作文档。 4 | 5 | 本手册介绍了如何从 `语雀` 加载文档。 6 | 7 | 您可以通过点击[个人设置](https://www.yuque.com/settings/tokens)页面中的个人头像来获取个人访问令牌。 8 | 9 | ```python 10 | from langchain_community.document_loaders import YuqueLoader 11 | ``` 12 | 13 | ```python 14 | loader = YuqueLoader(access_token="") 15 | ``` 16 | 17 | ```python 18 | docs = loader.load() 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/llms/anthropic.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_label: 人类中心LLM 4 | 5 | --- 6 | 7 | # 人类中心LLM 8 | 9 | 本示例介绍如何使用LangChain与`人类中心`模型进行交互。 10 | 11 | 注意:人类中心LLM仅支持传统的Claude 2模型。要使用最新的Claude 3模型,请改用[`ChatAnthropic`](/docs/integrations/chat/anthropic)。 12 | 13 | ## 安装 14 | 15 | ```python 16 | %pip install -qU langchain-anthropic 17 | ``` 18 | 19 | ## 环境设置 20 | 21 | 我们需要获取一个[人类中心](https://console.anthropic.com/settings/keys) API密钥,并设置`ANTHROPIC_API_KEY`环境变量: 22 | 23 | ```python 24 | import os 25 | from getpass import getpass 26 | os.environ["ANTHROPIC_API_KEY"] = getpass() 27 | ``` 28 | 29 | ## 使用 30 | 31 | ```python 32 | from langchain_anthropic import AnthropicLLM 33 | from langchain_core.prompts import PromptTemplate 34 | template = """问题:{question} 35 | 答案:让我们一步一步地思考。""" 36 | prompt = PromptTemplate.from_template(template) 37 | model = AnthropicLLM(model="claude-2.1") 38 | chain = prompt | model 39 | chain.invoke({"question": "什么是LangChain?"}) 40 | ``` 41 | 42 | ```output 43 | '\nLangChain是一个利用人工智能和机器学习提供语言翻译服务的去中心化区块链网络。' 44 | ``` -------------------------------------------------------------------------------- /docs/integrations/llms/baichuan.md: -------------------------------------------------------------------------------- 1 | # 百川LLM 2 | 3 | 百川公司(https://www.baichuan-ai.com/)是一家中国初创公司,致力于解决人类的基本需求:效率、健康和幸福。 4 | 5 | ## 先决条件 6 | 7 | 访问百川LLM API 需要一个 API 密钥。请访问 https://platform.baichuan-ai.com/ 获取您的 API 密钥。 8 | 9 | ## 使用百川LLM 10 | 11 | ```python 12 | import os 13 | os.environ["BAICHUAN_API_KEY"] = "YOUR_API_KEY" 14 | ``` 15 | 16 | ```python 17 | from langchain_community.llms import BaichuanLLM 18 | # 加载模型 19 | llm = BaichuanLLM() 20 | res = llm.invoke("What's your name?") 21 | print(res) 22 | ``` 23 | 24 | ```python 25 | res = llm.generate(prompts=["你好!"]) 26 | res 27 | ``` 28 | 29 | ```python 30 | for res in llm.stream("Who won the second world war?"): 31 | print(res) 32 | ``` 33 | 34 | ```python 35 | import asyncio 36 | async def run_aio_stream(): 37 | async for res in llm.astream("Write a poem about the sun."): 38 | print(res) 39 | asyncio.run(run_aio_stream()) 40 | ``` -------------------------------------------------------------------------------- /docs/integrations/llms/koboldai.md: -------------------------------------------------------------------------------- 1 | # KoboldAI API 2 | 3 | [KoboldAI](https://github.com/KoboldAI/KoboldAI-Client) 是一个“基于浏览器的前端,用于多个本地和远程 AI 模型辅助写作的工具...”。它具有公共和本地 API,可以在 langchain 中使用。 4 | 5 | 以下示例介绍了如何在 LangChain 中使用该 API。 6 | 7 | 文档可以在浏览器中添加 /api 到您的端点末尾找到(例如 http://127.0.0.1/:5000/api)。 8 | 9 | ```python 10 | from langchain_community.llms import KoboldApiLLM 11 | ``` 12 | 13 | 将下面看到的端点替换为在启动 webui 时显示的端点,使用 --api 或 --public-api。 14 | 15 | 可选地,您可以传入参数,如温度或最大长度。 16 | 17 | ```python 18 | llm = KoboldApiLLM(endpoint="http://192.168.1.144:5000", max_length=80) 19 | ``` 20 | 21 | ```python 22 | response = llm.invoke( 23 | "### 指令:\n圣经的第一本书是什么?\n### 回复:" 24 | ) 25 | ``` -------------------------------------------------------------------------------- /docs/integrations/llms/moonshot.md: -------------------------------------------------------------------------------- 1 | # MoonshotChat 2 | 3 | [Moonshot](https://platform.moonshot.cn/) 是一家中国初创公司,为企业和个人提供 LLM 服务。 4 | 5 | 以下示例介绍如何使用 LangChain 与 Moonshot 进行交互。 6 | 7 | ```python 8 | from langchain_community.llms.moonshot import Moonshot 9 | ``` 10 | 11 | ```python 12 | import os 13 | # 从以下链接生成您的 API 密钥:https://platform.moonshot.cn/console/api-keys 14 | os.environ["MOONSHOT_API_KEY"] = "MOONSHOT_API_KEY" 15 | ``` 16 | 17 | ```python 18 | llm = Moonshot() 19 | # 或者使用特定模型 20 | # 可用模型:https://platform.moonshot.cn/docs 21 | # llm = Moonshot(model="moonshot-v1-128k") 22 | ``` 23 | 24 | ```python 25 | # 提问模型 26 | llm.invoke("熊猫和熊之间有什么区别?") 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/llms/solar.md: -------------------------------------------------------------------------------- 1 | # 太阳能 2 | 3 | *此社区集成已被弃用。您应该使用[`ChatUpstage`](../../chat/upstage)来通过聊天模型连接器访问太阳能LLM。* 4 | 5 | ```python 6 | import os 7 | from langchain_community.llms.solar import Solar 8 | os.environ["SOLAR_API_KEY"] = "SOLAR_API_KEY" 9 | llm = Solar() 10 | llm.invoke("tell me a story?") 11 | ``` 12 | 13 | ```python 14 | from langchain.chains import LLMChain 15 | from langchain_community.llms.solar import Solar 16 | from langchain_core.prompts import PromptTemplate 17 | template = """问题: {question} 18 | 回答: 让我们一步一步地思考。""" 19 | prompt = PromptTemplate.from_template(template) 20 | llm = Solar() 21 | llm_chain = LLMChain(prompt=prompt, llm=llm) 22 | question = "贾斯汀·比伯出生年份的超级碗冠军是哪支NFL球队?" 23 | llm_chain.run(question) 24 | ``` -------------------------------------------------------------------------------- /docs/integrations/llms/volcengine_maas.md: -------------------------------------------------------------------------------- 1 | # Volc Engine Maas 2 | 3 | 本文档提供了关于如何开始使用 Volc Engine 的 MaaS LLM 模型的指南。 4 | 5 | ```python 6 | # 安装包 7 | %pip install --upgrade --quiet volcengine 8 | ``` 9 | 10 | ```python 11 | from langchain_community.llms import VolcEngineMaasLLM 12 | from langchain_core.output_parsers import StrOutputParser 13 | from langchain_core.prompts import PromptTemplate 14 | ``` 15 | 16 | ```python 17 | llm = VolcEngineMaasLLM(volc_engine_maas_ak="你的 ak", volc_engine_maas_sk="你的 sk") 18 | ``` 19 | 20 | 或者你可以在环境变量中设置 access_key 和 secret_key 21 | 22 | ```bash 23 | export VOLC_ACCESSKEY=YOUR_AK 24 | export VOLC_SECRETKEY=YOUR_SK 25 | ``` 26 | 27 | ```python 28 | chain = PromptTemplate.from_template("给我讲个笑话") | llm | StrOutputParser() 29 | chain.invoke({}) 30 | ``` 31 | 32 | ```output 33 | '好的,下面是一个笑话:\n\n大学暑假我配了隐形眼镜,回家给爷爷说,我现在配了隐形眼镜。\n爷爷让我给他看看,于是,我用小镊子夹了一片给爷爷看。\n爷爷看完便准备出门,边走还边说:“真高级啊,还真是隐形眼镜!”\n等爷爷出去后我才发现,我刚没夹起来!' 34 | ``` -------------------------------------------------------------------------------- /docs/integrations/llms/writer.md: -------------------------------------------------------------------------------- 1 | # Writer 2 | 3 | [Writer](https://writer.com/) 是一个生成不同语言内容的平台。 4 | 5 | 以下示例介绍如何使用 LangChain 与 `Writer` [模型](https://dev.writer.com/docs/models) 进行交互。 6 | 7 | 你需要在[这里](https://dev.writer.com/docs)获取 WRITER_API_KEY。 8 | 9 | ```python 10 | from getpass import getpass 11 | WRITER_API_KEY = getpass() 12 | ``` 13 | 14 | ```output 15 | ········ 16 | ``` 17 | 18 | ```python 19 | import os 20 | os.environ["WRITER_API_KEY"] = WRITER_API_KEY 21 | ``` 22 | 23 | ```python 24 | from langchain.chains import LLMChain 25 | from langchain_community.llms import Writer 26 | from langchain_core.prompts import PromptTemplate 27 | ``` 28 | 29 | ```python 30 | template = """问题: {question} 31 | 答案: 让我们一步一步地思考。""" 32 | prompt = PromptTemplate.from_template(template) 33 | ``` 34 | 35 | ```python 36 | # 如果出现错误,可能需要设置 "base_url" 参数,该参数可以从错误日志中获取。 37 | llm = Writer() 38 | ``` 39 | 40 | ```python 41 | llm_chain = LLMChain(prompt=prompt, llm=llm) 42 | ``` 43 | 44 | ```python 45 | question = "贾斯汀·比伯出生年份的超级碗冠军是哪支 NFL 球队?" 46 | llm_chain.run(question) 47 | ``` -------------------------------------------------------------------------------- /docs/integrations/memory/neo4j_chat_message_history.md: -------------------------------------------------------------------------------- 1 | # Neo4j 2 | 3 | [Neo4j](https://zh.wikipedia.org/wiki/Neo4j) 是一个开源的图数据库管理系统,以其高效管理高度连接数据而闻名。与传统的以表格形式存储数据的数据库不同,Neo4j 使用节点、边和属性的图结构来表示和存储数据。这种设计允许对复杂数据关系进行高性能查询。 4 | 5 | 本文介绍如何使用 `Neo4j` 存储聊天消息历史记录。 6 | 7 | ```python 8 | from langchain_community.chat_message_histories import Neo4jChatMessageHistory 9 | history = Neo4jChatMessageHistory( 10 | url="bolt://localhost:7687", 11 | username="neo4j", 12 | password="password", 13 | session_id="session_id_1", 14 | ) 15 | history.add_user_message("hi!") 16 | history.add_ai_message("whats up?") 17 | ``` 18 | 19 | ```python 20 | history.messages 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/memory/postgres_chat_message_history.md: -------------------------------------------------------------------------------- 1 | # Postgres 2 | 3 | [PostgreSQL](https://en.wikipedia.org/wiki/PostgreSQL)(也被称为 `Postgres`)是一个强调可扩展性和SQL兼容性的免费开源关系数据库管理系统(RDBMS)。 4 | 5 | 本文介绍如何使用Postgres存储聊天消息记录。 6 | 7 | ```python 8 | from langchain_community.chat_message_histories import ( 9 | PostgresChatMessageHistory, 10 | ) 11 | history = PostgresChatMessageHistory( 12 | connection_string="postgresql://postgres:mypassword@localhost/chat_history", 13 | session_id="foo", 14 | ) 15 | history.add_user_message("hi!") 16 | history.add_ai_message("whats up?") 17 | ``` 18 | 19 | ```python 20 | history.messages 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/memory/singlestoredb_chat_message_history.md: -------------------------------------------------------------------------------- 1 | # SingleStoreDB 2 | 3 | 本文介绍了如何使用 SingleStoreDB 存储聊天消息历史记录。 4 | 5 | ```python 6 | from langchain_community.chat_message_histories import ( 7 | SingleStoreDBChatMessageHistory, 8 | ) 9 | history = SingleStoreDBChatMessageHistory( 10 | session_id="foo", host="root:pass@localhost:3306/db" 11 | ) 12 | history.add_user_message("hi!") 13 | history.add_ai_message("whats up?") 14 | ``` 15 | 16 | ```python 17 | history.messages 18 | ``` -------------------------------------------------------------------------------- /docs/integrations/memory/upstash_redis_chat_message_history.md: -------------------------------------------------------------------------------- 1 | # Upstash Redis 2 | 3 | [Upstash](https://upstash.com/docs/introduction) 是一个提供无服务器 `Redis`、`Kafka` 和 `QStash` API 的服务商。 4 | 5 | 这篇笔记介绍了如何使用 `Upstash Redis` 存储聊天消息历史记录。 6 | 7 | ```python 8 | from langchain_community.chat_message_histories import ( 9 | UpstashRedisChatMessageHistory, 10 | ) 11 | URL = "" 12 | TOKEN = "" 13 | history = UpstashRedisChatMessageHistory( 14 | url=URL, token=TOKEN, ttl=10, session_id="my-test-session" 15 | ) 16 | history.add_user_message("hello llm!") 17 | history.add_ai_message("hello user!") 18 | ``` 19 | 20 | ```python 21 | history.messages 22 | ``` -------------------------------------------------------------------------------- /docs/integrations/platforms/anthropic.mdx: -------------------------------------------------------------------------------- 1 | # Anthropic 2 | 3 | [Anthropic](https://www.anthropic.com/)是一家人工智能安全和研究公司,也是`Claude`的创建者。本页面涵盖了`Anthropic`模型与`LangChain`之间的所有集成。 4 | 5 | ## 安装和设置 6 | 7 | 要使用`Anthropic`模型,您需要安装一个Python包: 8 | 9 | ```bash 10 | pip install -U langchain-anthropic 11 | ``` 12 | 13 | 您需要设置`ANTHROPIC_API_KEY`环境变量。您可以在[这里](https://console.anthropic.com/settings/keys)获取Anthropic的API密钥。 14 | 15 | ## 语言模型 16 | 17 | ### [Legacy] 人类中心语言模型 18 | 19 | **注意**:`Anthropic语言模型`仅支持旧版`Claude 2`模型。要使用最新的`Claude 3`模型,请改用`ChatAnthropic`。 20 | 21 | 查看[使用示例](/docs/integrations/llms/anthropic)。 22 | 23 | ```python 24 | from langchain_anthropic import AnthropicLLM 25 | model = AnthropicLLM(model='claude-2.1') 26 | ``` 27 | 28 | ## 聊天模型 29 | 30 | ### ChatAnthropic 31 | 32 | 查看[使用示例](/docs/integrations/chat/anthropic)。 33 | 34 | ```python 35 | from langchain_anthropic import ChatAnthropic 36 | model = ChatAnthropic(model='claude-3-opus-20240229') 37 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/acreom.mdx: -------------------------------------------------------------------------------- 1 | # Acreom 2 | 3 | [acreom](https://acreom.com) 是一个以开发者为先的知识库,其任务在本地的 `markdown` 文件上运行。 4 | 5 | ## 安装和设置 6 | 7 | 无需安装。 8 | 9 | ## 文档加载器 10 | 11 | 查看 [使用示例](/docs/integrations/document_loaders/acreom)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import AcreomLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/ainetwork.mdx: -------------------------------------------------------------------------------- 1 | # AINetwork 2 | 3 | [AI Network](https://www.ainetwork.ai/build-on-ain) 是一个设计用于容纳大规模人工智能模型的一级区块链,利用由 [$AIN token](https://www.ainetwork.ai/token) 驱动的分散式 GPU 网络,丰富了基于人工智能的 `NFTs` (`AINFTs`)。 4 | 5 | ## 安装和设置 6 | 7 | 您需要安装 `ain-py` Python 包。 8 | 9 | ```bash 10 | pip install ain-py 11 | ``` 12 | 13 | 您需要将 `AIN_BLOCKCHAIN_ACCOUNT_PRIVATE_KEY` 环境变量设置为您的 AIN 区块链账户私钥。 14 | 15 | ## 工具包 16 | 17 | 查看 [使用示例](/docs/integrations/toolkits/ainetwork)。 18 | 19 | ```python 20 | from langchain_community.agent_toolkits.ainetwork.toolkit import AINetworkToolkit 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/airbyte.mdx: -------------------------------------------------------------------------------- 1 | # Airbyte 2 | 3 | [Airbyte](https://github.com/airbytehq/airbyte) 是一个用于从 API、数据库和文件到数据仓库和数据湖的 ELT 管道的数据集成平台。它拥有最大的 ELT 连接器目录,可连接到数据仓库和数据库。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install -U langchain-airbyte 9 | ``` 10 | 11 | :::note 12 | 13 | 目前,`langchain-airbyte` 库不支持 Pydantic v2。 14 | 15 | 请降级到 Pydantic v1 以使用此软件包。 16 | 17 | 此软件包目前还需要 Python 3.10+。 18 | 19 | ::: 20 | 21 | 集成包不需要设置任何全局环境变量,但某些集成(例如 `source-github`)可能需要传递凭据。 22 | 23 | ## 文档加载器 24 | 25 | ### AirbyteLoader 26 | 27 | 查看[使用示例](/docs/integrations/document_loaders/airbyte)。 28 | 29 | ```python 30 | from langchain_airbyte import AirbyteLoader 31 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/airtable.md: -------------------------------------------------------------------------------- 1 | # Airtable 2 | 3 | [Airtable](https://en.wikipedia.org/wiki/Airtable) 是一项云协作服务。`Airtable` 是一种电子表格数据库混合体,具有数据库的特性,但应用于电子表格。Airtable 表中的字段类似于电子表格中的单元格,但具有诸如“复选框”、“电话号码”和“下拉列表”之类的类型,并且可以引用文件附件,如图像。 4 | 5 | 用户可以创建数据库,设置列类型,添加记录,将表格相互链接,进行协作,对记录进行排序,并将视图发布到外部网站。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install pyairtable 11 | ``` 12 | 13 | * 获取您的 [API 密钥](https://support.airtable.com/docs/creating-and-using-api-keys-and-access-tokens)。 14 | 15 | * 获取您的[基地 ID](https://airtable.com/developers/web/api/introduction)。 16 | 17 | * 从表格网址中获取 [表格 ID](https://www.highviewapps.com/kb/where-can-i-find-the-airtable-base-id-and-table-id/#:~:text=Both%20the%20Airtable%20Base%20ID,URL%20that%20begins%20with%20tbl)。 18 | 19 | ## 文档加载器 20 | 21 | ```python 22 | from langchain_community.document_loaders import AirtableLoader 23 | ``` 24 | 25 | 查看一个[示例](/docs/integrations/document_loaders/airtable)。 -------------------------------------------------------------------------------- /docs/integrations/providers/alchemy.mdx: -------------------------------------------------------------------------------- 1 | # 炼金术 2 | 3 | [Alchemy](https://www.alchemy.com) 是构建区块链应用程序的平台。 4 | 5 | ## 安装和设置 6 | 7 | 查看[安装指南](/docs/integrations/document_loaders/blockchain)。 8 | 9 | ## 文档加载器 10 | 11 | ### Alchemy 平台上的 BlockchainLoader 12 | 13 | 查看[使用示例](/docs/integrations/document_loaders/blockchain)。 14 | 15 | ```python 16 | from langchain_community.document_loaders.blockchain import ( 17 | BlockchainDocumentLoader, 18 | BlockchainType, 19 | ) 20 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/aleph_alpha.mdx: -------------------------------------------------------------------------------- 1 | # 阿莱夫·阿尔法 2 | 3 | [阿莱夫·阿尔法](https://docs.aleph-alpha.com/)成立于2019年,旨在研究和构建强人工智能时代的基础技术。这个国际科学家、工程师和创新者团队致力于研究、开发和部署像大型语言和多模态模型这样的变革性人工智能,并运行着欧洲最快的商业人工智能集群。 4 | 5 | [Luminous 系列](https://docs.aleph-alpha.com/docs/introduction/luminous/)是一系列大型语言模型。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install aleph-alpha-client 11 | ``` 12 | 13 | 您需要创建一个新的令牌。请参阅[说明](https://docs.aleph-alpha.com/docs/account/#create-a-new-token)。 14 | 15 | ```python 16 | from getpass import getpass 17 | ALEPH_ALPHA_API_KEY = getpass() 18 | ``` 19 | 20 | ## LLM 21 | 22 | 查看[使用示例](/docs/integrations/llms/aleph_alpha)。 23 | 24 | ```python 25 | from langchain_community.llms import AlephAlpha 26 | ``` 27 | 28 | ## 文本嵌入模型 29 | 30 | 查看[使用示例](/docs/integrations/text_embedding/aleph_alpha)。 31 | 32 | ```python 33 | from langchain_community.embeddings import AlephAlphaSymmetricSemanticEmbedding, AlephAlphaAsymmetricSemanticEmbedding 34 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/analyticdb.mdx: -------------------------------------------------------------------------------- 1 | # AnalyticDB 2 | 3 | [AnalyticDB for PostgreSQL](https://www.alibabacloud.com/help/en/analyticdb-for-postgresql/latest/product-introduction-overview) 是来自[阿里云](https://www.alibabacloud.com/)的大规模并行处理(MPP)数据仓储服务,旨在在线分析大容量数据。 4 | 5 | `AnalyticDB for PostgreSQL` 是基于开源项目 `Greenplum Database` 开发的,并由 `阿里云` 进行了深度扩展。AnalyticDB for PostgreSQL 兼容 ANSI SQL 2003 语法以及 PostgreSQL 和 Oracle 数据库生态系统。AnalyticDB for PostgreSQL 还支持行存储和列存储。AnalyticDB for PostgreSQL 在离线处理 PB 级数据时表现出色,并支持高并发。 6 | 7 | 本页面介绍了如何在 LangChain 中使用 AnalyticDB 生态系统。 8 | 9 | ## 安装和设置 10 | 11 | 您需要安装 `sqlalchemy` Python 包。 12 | 13 | ```bash 14 | pip install sqlalchemy 15 | ``` 16 | 17 | ## VectorStore 18 | 19 | 查看[使用示例](/docs/integrations/vectorstores/analyticdb)。 20 | 21 | ```python 22 | from langchain_community.vectorstores import AnalyticDB 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/annoy.mdx: -------------------------------------------------------------------------------- 1 | # Annoy 2 | 3 | > [Annoy](https://github.com/spotify/annoy)(近似最近邻居,Oh Yeah) 4 | 5 | > 是一个 C++ 库,带有 Python 绑定,用于搜索空间中距离给定查询点接近的点。它还创建大型的只读基于文件的数据结构,将其映射到内存中,以便许多进程可以共享相同的数据。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install annoy 11 | ``` 12 | 13 | ## Vectorstore 14 | 15 | 查看[使用示例](/docs/integrations/vectorstores/annoy)。 16 | 17 | ```python 18 | from langchain_community.vectorstores import Annoy 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/apache_doris.mdx: -------------------------------------------------------------------------------- 1 | # Apache Doris 2 | 3 | [Apache Doris](https://doris.apache.org/) 是一款用于实时分析的现代化数据仓库。它能够在大规模实时数据上实现快速的分析。 4 | 5 | 通常情况下,`Apache Doris` 被归类为 OLAP,它在 [ClickBench — a Benchmark For Analytical DBMS](https://benchmark.clickhouse.com/) 中表现出色。由于它拥有超快的矢量化执行引擎,因此也可以被用作快速的矢量数据库。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install pymysql 11 | ``` 12 | 13 | ## 矢量存储 14 | 15 | 查看 [使用示例](/docs/integrations/vectorstores/apache_doris)。 16 | 17 | ```python 18 | from langchain_community.vectorstores import ApacheDoris 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/apify.mdx: -------------------------------------------------------------------------------- 1 | # Apify 2 | 3 | [Apify](https://apify.com) 是一个用于网页抓取和数据提取的云平台,提供了一个包含一千多个名为 *Actors* 的现成应用程序的 [生态系统](https://apify.com/store),用于各种抓取、爬取和提取用例。 4 | 5 | [![Apify Actors](/img/ApifyActors.png)](https://apify.com/store) 6 | 7 | 该集成使您能够在 `Apify` 平台上运行 Actors,并将它们的结果加载到 LangChain 中,以从网页中获取文档和数据,例如从文档、博客或知识库生成答案。 8 | 9 | ## 安装和设置 10 | 11 | - 使用 `pip install apify-client` 安装 Python 的 Apify API 客户端。 12 | 13 | - 获取您的 [Apify API 令牌](https://console.apify.com/account/integrations),并将其设置为环境变量 (`APIFY_API_TOKEN`),或者在构造函数中将其作为 `apify_api_token` 传递给 `ApifyWrapper`。 14 | 15 | ## 实用工具 16 | 17 | 您可以使用 `ApifyWrapper` 在 Apify 平台上运行 Actors。 18 | 19 | ```python 20 | from langchain_community.utilities import ApifyWrapper 21 | ``` 22 | 23 | 要了解有关此包装器的更详细说明,请参阅[此笔记本](/docs/integrations/tools/apify)。 24 | 25 | ## 文档加载器 26 | 27 | 您还可以使用我们的 `ApifyDatasetLoader` 从 Apify 数据集中获取数据。 28 | 29 | ```python 30 | from langchain_community.document_loaders import ApifyDatasetLoader 31 | ``` 32 | 33 | 要了解有关此加载器的更详细说明,请参阅[此笔记本](/docs/integrations/document_loaders/apify_dataset)。 -------------------------------------------------------------------------------- /docs/integrations/providers/arangodb.mdx: -------------------------------------------------------------------------------- 1 | # ArangoDB 2 | 3 | [ArangoDB](https://github.com/arangodb/arangodb) 是一个可扩展的图形数据库系统,旨在更快地从连接数据中获取价值。通过一种查询语言,支持原生图形、集成搜索引擎和 JSON。ArangoDB 可以在本地、云端或任何地方运行。 4 | 5 | ## 安装与设置 6 | 7 | 使用以下命令安装 [ArangoDB Python Driver](https://github.com/ArangoDB-Community/python-arango) 包: 8 | 9 | ```bash 10 | pip install python-arango 11 | ``` 12 | 13 | ## 图形问答链 14 | 15 | 将您的 `ArangoDB` 数据库与聊天模型连接,以获取有关数据的见解。 16 | 17 | 查看笔记本示例[这里](/docs/integrations/graphs/arangodb)。 18 | 19 | ```python 20 | from arango import ArangoClient 21 | from langchain_community.graphs import ArangoGraph 22 | from langchain.chains import ArangoGraphQAChain 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/arcee.mdx: -------------------------------------------------------------------------------- 1 | # Arcee 2 | 3 | [Arcee](https://www.arcee.ai/about/about-us) 使得我们所谓的SLM(小型、专业化、安全、可扩展的语言模型)的开发和进步成为可能。通过提供SLM适应系统和无缝、安全的集成,Arcee赋予企业充分利用领域自适应语言模型的潜力,推动运营中的变革性创新。 4 | 5 | ## 安装和设置 6 | 7 | 获取你的`Arcee API`密钥。 8 | 9 | ## LLMs 10 | 11 | 查看[使用示例](/docs/integrations/llms/arcee)。 12 | 13 | ```python 14 | from langchain_community.llms import Arcee 15 | ``` 16 | 17 | ## 检索器 18 | 19 | 查看[使用示例](/docs/integrations/retrievers/arcee)。 20 | 21 | ```python 22 | from langchain_community.retrievers import ArceeRetriever 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/arcgis.mdx: -------------------------------------------------------------------------------- 1 | # ArcGIS 2 | 3 | [ArcGIS](https://www.esri.com/en-us/arcgis/about-arcgis/overview) 是由[Esri](https://www.esri.com/)开发和维护的一系列客户端、服务器和在线地理信息系统软件。 4 | 5 | `ArcGISLoader` 使用 `arcgis` 软件包。`arcgis` 是用于矢量和栅格分析、地理编码、制图、路径规划和导航的 Python 库。它管理、组织和管理 GIS 中的用户、群组和信息项。它可以访问来自 `Esri` 和其他权威来源的即用地图和精心策划的地理数据,并且也可以处理您自己的数据。 6 | 7 | ## 安装和设置 8 | 9 | 我们需要安装 `arcgis` 软件包。 10 | 11 | ```bash 12 | pip install -U arcgis 13 | ``` 14 | 15 | ## 文档加载器 16 | 17 | 查看[使用示例](/docs/integrations/document_loaders/arcgis)。 18 | 19 | ```python 20 | from langchain_community.document_loaders import ArcGISLoader 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/argilla.mdx: -------------------------------------------------------------------------------- 1 | # Argilla 2 | 3 | [Argilla](https://argilla.io/) 是一个面向LLM的开源数据整理平台。 4 | 5 | 使用 `Argilla`,每个人都可以通过更快的数据整理,结合人工和机器反馈,构建健壮的语言模型。 6 | 7 | `Argilla` 在MLOps周期的每个步骤都提供支持,从数据标注到模型监控。 8 | 9 | ## 安装和设置 10 | 11 | 获取你的 [API key](https://platform.openai.com/account/api-keys)。 12 | 13 | 安装 Python 包: 14 | 15 | ```bash 16 | pip install argilla 17 | ``` 18 | 19 | ## 回调 20 | 21 | ```python 22 | from langchain.callbacks import ArgillaCallbackHandler 23 | ``` 24 | 25 | 查看一个[示例](/docs/integrations/callbacks/argilla)。 -------------------------------------------------------------------------------- /docs/integrations/providers/arxiv.mdx: -------------------------------------------------------------------------------- 1 | # Arxiv 2 | 3 | [arXiv](https://arxiv.org/) 是一个开放获取的文献档案,收录了来自物理学、数学、计算机科学、数量生物学、数量金融、统计学、电气工程与系统科学以及经济学等领域的 200 万篇学术文章。 4 | 5 | ## 安装与设置 6 | 7 | 首先,您需要安装 `arxiv` Python 包。 8 | 9 | ```bash 10 | pip install arxiv 11 | ``` 12 | 13 | 其次,您需要安装 `PyMuPDF` Python 包,该包可以将从 `arxiv.org` 网站下载的 PDF 文件转换为文本格式。 14 | 15 | ```bash 16 | pip install pymupdf 17 | ``` 18 | 19 | ## 文档加载器 20 | 21 | 查看 [使用示例](/docs/integrations/document_loaders/arxiv)。 22 | 23 | ```python 24 | from langchain_community.document_loaders import ArxivLoader 25 | ``` 26 | 27 | ## 检索器 28 | 29 | 查看 [使用示例](/docs/integrations/retrievers/arxiv)。 30 | 31 | ```python 32 | from langchain.retrievers import ArxivRetriever 33 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/assemblyai.mdx: -------------------------------------------------------------------------------- 1 | # AssemblyAI 2 | 3 | [AssemblyAI](https://www.assemblyai.com/) 是一家致力于构建语音人工智能模型的公司,用于语音转文本、说话人分离、语音摘要等任务。 4 | 5 | `AssemblyAI` 的语音人工智能模型包括准确的语音转文本,适用于语音数据(如电话通话、虚拟会议和播客)、说话人检测、情感分析、章节检测、个人身份信息遮蔽等功能。 6 | 7 | ## 安装和设置 8 | 9 | 获取你的 [API 密钥](https://www.assemblyai.com/dashboard/signup)。 10 | 11 | 安装 `assemblyai` 包。 12 | 13 | ```bash 14 | pip install -U assemblyai 15 | ``` 16 | 17 | ## 文档加载器 18 | 19 | ### AssemblyAI 音频转录 20 | 21 | `AssemblyAIAudioTranscriptLoader` 使用 `AssemblyAI API` 转录音频文件,并将转录的文本加载到文档中。 22 | 23 | 查看 [使用示例](/docs/integrations/document_loaders/assemblyai)。 24 | 25 | ```python 26 | from langchain_community.document_loaders import AssemblyAIAudioTranscriptLoader 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/atlas.mdx: -------------------------------------------------------------------------------- 1 | # Atlas 2 | 3 | [Nomic Atlas](https://docs.nomic.ai/index.html) 是一个用于与小型和互联网规模的非结构化数据集进行交互的平台。 4 | 5 | ## 安装和设置 6 | 7 | - 使用 `pip install nomic` 安装 Python 包 8 | 9 | - `Nomic` 也包含在 langchains poetry extras 中,可以使用 `poetry install -E all` 安装 10 | 11 | ## VectorStore 12 | 13 | 查看 [使用示例](/docs/integrations/vectorstores/atlas)。 14 | 15 | ```python 16 | from langchain_community.vectorstores import AtlasDB 17 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/awadb.md: -------------------------------------------------------------------------------- 1 | # AwaDB 2 | 3 | [AwaDB](https://github.com/awa-ai/awadb) 是一种用于搜索和存储由LLM应用程序使用的嵌入向量的AI原生数据库。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install awadb 9 | ``` 10 | 11 | ## 向量存储 12 | 13 | ```python 14 | from langchain_community.vectorstores import AwaDB 15 | ``` 16 | 17 | 查看[使用示例](/docs/integrations/vectorstores/awadb)。 18 | 19 | ## 嵌入模型 20 | 21 | ```python 22 | from langchain_community.embeddings import AwaEmbeddings 23 | ``` 24 | 25 | 查看[使用示例](/docs/integrations/text_embedding/awadb)。 -------------------------------------------------------------------------------- /docs/integrations/providers/azlyrics.mdx: -------------------------------------------------------------------------------- 1 | # AZ歌词 2 | 3 | [AZ歌词](https://www.azlyrics.com/)是一个庞大、合法且每天在不断增长的歌词收集库。 4 | 5 | ## 安装与设置 6 | 7 | 对于它并没有特殊的设置要求。 8 | 9 | ## 文档加载器 10 | 11 | 查看一个[使用示例](/docs/integrations/document_loaders/azlyrics)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import AZLyricsLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/bagel.mdx: -------------------------------------------------------------------------------- 1 | # 贝格尔 2 | 3 | > [贝格尔](https://www.bagel.net/)(`面向人工智能的开放向量数据库`),就像是面向人工智能数据的 GitHub。 4 | 5 | 这是一个协作平台,用户可以在其中创建、分享和管理向量数据集。它可以支持独立开发者的私人项目、企业内部的协作,以及数据 DAOs 的公共贡献。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install bagelML 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | 查看[使用示例](/docs/integrations/vectorstores/bagel)。 16 | 17 | ```python 18 | from langchain_community.vectorstores import Bagel 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/bageldb.mdx: -------------------------------------------------------------------------------- 1 | # BagelDB 2 | 3 | > [BagelDB](https://www.bageldb.ai/)(`用于人工智能的开放向量数据库`),类似于 AI 数据的 GitHub。 4 | 5 | 这是一个协作平台,用户可以在其中创建、共享和管理向量数据集。它可以支持独立开发者的私人项目、企业内部的协作,以及数据 DAOs 的公共贡献。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install betabageldb 11 | ``` 12 | 13 | ## VectorStore 14 | 15 | 查看[使用示例](/docs/integrations/vectorstores/bageldb)。 16 | 17 | ```python 18 | from langchain_community.vectorstores import Bagel 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/baichuan.mdx: -------------------------------------------------------------------------------- 1 | # 百川 2 | 3 | [百川公司](https://www.baichuan-ai.com/)是一个中国初创公司,致力于在通用人工智能时代解决人类的基本需求:效率、健康和幸福。 4 | 5 | ## 安装和设置 6 | 7 | 在[这里](https://platform.baichuan-ai.com/)注册并获取 API 密钥。 8 | 9 | ## 语言模型 10 | 11 | 查看[使用示例](/docs/integrations/llms/baichuan)。 12 | 13 | ```python 14 | from langchain_community.llms import BaichuanLLM 15 | ``` 16 | 17 | ## 聊天模型 18 | 19 | 查看[使用示例](/docs/integrations/chat/baichuan)。 20 | 21 | ```python 22 | from langchain_community.chat_models import ChatBaichuan 23 | ``` 24 | 25 | ## 嵌入模型 26 | 27 | 查看[使用示例](/docs/integrations/text_embedding/baichuan)。 28 | 29 | ```python 30 | from langchain_community.embeddings import BaichuanTextEmbeddings 31 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/beam.mdx: -------------------------------------------------------------------------------- 1 | # Beam 2 | 3 | [Beam](https://www.beam.cloud/) 是一个云计算平台,允许您在带有 GPU 的远程服务器上运行您的代码。 4 | 5 | ## 安装和设置 6 | 7 | - [创建一个账户](https://www.beam.cloud/) 8 | 9 | - 使用以下命令安装 Beam CLI:`curl https://raw.githubusercontent.com/slai-labs/get-beam/main/get-beam.sh -sSfL | sh` 10 | 11 | - 使用 `beam configure` 注册 API 密钥 12 | 13 | - 设置环境变量 (`BEAM_CLIENT_ID`) 和 (`BEAM_CLIENT_SECRET`) 14 | 15 | - 安装 Beam SDK: 16 | 17 | ```bash 18 | pip install beam-sdk 19 | ``` 20 | 21 | ## LLMs 22 | 23 | 查看[使用示例](/docs/integrations/llms/beam)。 24 | 25 | 在[Beam文档](https://docs.beam.cloud/examples/langchain)中查看另一个示例。 26 | 27 | ```python 28 | from langchain_community.llms.beam import Beam 29 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/beautiful_soup.mdx: -------------------------------------------------------------------------------- 1 | # 美味汤 2 | 3 | [美味汤(Beautiful Soup)](https://www.crummy.com/software/BeautifulSoup/)是一个用于解析HTML和XML文档的Python软件包(包括处理格式不正确的标记,即未闭合标签,因此得名于标记汤)。它为解析页面创建了一个解析树,可用于从HTML中提取数据,这对于网络抓取很有用。[3] 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install beautifulsoup4 9 | ``` 10 | 11 | ## 文档转换器 12 | 13 | 查看[使用示例](/docs/integrations/document_transformers/beautiful_soup)。 14 | 15 | ```python 16 | from langchain_community.document_loaders import BeautifulSoupTransformer 17 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/bibtex.mdx: -------------------------------------------------------------------------------- 1 | # BibTeX 2 | 3 | [BibTeX](https://www.ctan.org/pkg/bibtex) 是一种文件格式和参考文献管理系统,通常与 `LaTeX` 排版一起使用。它用于组织和存储学术和研究文档的文献信息。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要安装 `bibtexparser` 和 `pymupdf` 包。 8 | 9 | ```bash 10 | pip install bibtexparser pymupdf 11 | ``` 12 | 13 | ## 文档加载器 14 | 15 | 查看 [使用示例](/docs/integrations/document_loaders/bibtex)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import BibtexLoader 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/bilibili.mdx: -------------------------------------------------------------------------------- 1 | # 哔哩哔哩 2 | 3 | >[哔哩哔哩](https://www.bilibili.tv/) 是中国最受喜爱的长视频网站之一。 4 | 5 | ## 安装与设置 6 | 7 | ```bash 8 | pip install bilibili-api-python 9 | ``` 10 | 11 | ## 文档加载器 12 | 13 | 查看一个[使用示例](/docs/integrations/document_loaders/bilibili)。 14 | 15 | ```python 16 | from langchain_community.document_loaders import BiliBiliLoader 17 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/bittensor.mdx: -------------------------------------------------------------------------------- 1 | # Bittensor 2 | 3 | >[神经互联网 Bittensor](https://neuralinternet.ai/) 网络是一个开源协议,用于支持去中心化、基于区块链的机器学习网络。 4 | 5 | ## 安装和设置 6 | 7 | 从[神经互联网](https://neuralinternet.ai/)获取您的 API_KEY。 8 | 9 | ## LLMs 10 | 11 | 查看一个[使用示例](/docs/integrations/llms/bittensor)。 12 | 13 | ```python 14 | from langchain_community.llms import NIBittensorLLM 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/blackboard.mdx: -------------------------------------------------------------------------------- 1 | # 黑板 2 | 3 | >[Blackboard Learn](https://en.wikipedia.org/wiki/Blackboard_Learn)(之前称为 `Blackboard Learning Management System`)是由 Blackboard 公司开发的基于网络的虚拟学习环境和学习管理系统。该软件具有课程管理、可定制的开放架构和可扩展的设计,可以与学生信息系统和认证协议集成。它可以安装在本地服务器上,由 `Blackboard ASP Solutions` 托管,或作为由 Amazon Web Services 托管的软件即服务提供。其主要目的是在传统面对面课程中添加在线元素,并开发几乎没有或没有面对面会议的完全在线课程。 4 | 5 | ## 安装和设置 6 | 7 | 对此并没有特别的设置。 8 | 9 | ## 文档加载器 10 | 11 | 查看[使用示例](/docs/integrations/document_loaders/blackboard)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import BlackboardLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/brave_search.mdx: -------------------------------------------------------------------------------- 1 | # Brave Search 2 | 3 | [Brave Search](https://en.wikipedia.org/wiki/Brave_Search) 是由 Brave Software 开发的搜索引擎。 4 | 5 | - `Brave Search` 使用自己的网络索引。截至 2022 年 5 月,它覆盖了超过 100 亿个页面,并且在 92% 的搜索结果中不依赖任何第三方,其余的结果是从必应 API 服务器端检索或(根据用户选择)从 Google 客户端检索。根据 Brave 公司的说法,索引被故意保持“比 Google 或必应小”,以帮助避免垃圾信息和其他低质量内容,但缺点是“Brave Search 在恢复长尾查询方面还不如 Google”。 6 | 7 | - `Brave Search Premium`:截至 2023 年 4 月,Brave Search 是一个无广告的网站,但最终将转向一个新模式,其中将包括广告,而高级用户将享有无广告体验。用户数据,包括 IP 地址,不会默认收集。高级账户将需要用户选择加入数据收集。 8 | 9 | ## 安装和设置 10 | 11 | 要访问 Brave Search API,您需要[创建一个账户并获取 API 密钥](https://api.search.brave.com/app/dashboard)。 12 | 13 | ## 文档加载器 14 | 15 | 查看[使用示例](/docs/integrations/document_loaders/brave_search)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import BraveSearchLoader 19 | ``` 20 | 21 | ## 工具 22 | 23 | 查看[使用示例](/docs/integrations/tools/brave_search)。 24 | 25 | ```python 26 | from langchain.tools import BraveSearch 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/breebs.md: -------------------------------------------------------------------------------- 1 | # Breebs(开放知识) 2 | 3 | [Breebs](https://www.breebs.com/) 是一个开放的协作知识平台。 4 | 5 | 任何人都可以创建一个“Breeb”,这是一个基于存储在 Google 云端硬盘文件夹中的 PDF 文档的知识胶囊。 6 | 7 | 任何 LLM/聊天机器人都可以使用“Breeb”来提升自己的专业知识,减少幻觉,并获取信息来源。 8 | 9 | 在幕后,Breebs 实现了几个“检索增强生成(RAG)”模型,以在每次迭代中无缝地提供有用的上下文。 10 | 11 | ## 检索器 12 | 13 | ```python 14 | from langchain.retrievers import BreebsRetriever 15 | ``` 16 | 17 | [查看使用示例(检索和对话检索链)](/docs/integrations/retrievers/breebs) -------------------------------------------------------------------------------- /docs/integrations/providers/browserless.mdx: -------------------------------------------------------------------------------- 1 | # Browserless 2 | 3 | [Browserless](https://www.browserless.io/docs/start) 是一个可以在云端运行无头 Chrome 实例的服务。它是一种在大规模运行基于浏览器的自动化时的绝佳选择,而无需担心管理自己的基础设施。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要在[这里](https://www.browserless.io/pricing/)获取 API 密钥。 8 | 9 | ## 文档加载器 10 | 11 | 请参阅[使用示例](/docs/integrations/document_loaders/browserless)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import BrowserlessLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/byte_dance.mdx: -------------------------------------------------------------------------------- 1 | # 字节跳动 2 | 3 | [字节跳动](https://bytedance.com/)是一家中国互联网科技公司。 4 | 5 | ## 安装和设置 6 | 7 | 获取访问令牌。 8 | 9 | 你可以在[这里](https://open.larksuite.com/document)找到访问说明。 10 | 11 | ## 文档加载器 12 | 13 | ### 飞书套件 14 | 15 | [飞书套件](https://www.larksuite.com/)是一款由字节跳动开发的企业协作平台。 16 | 17 | 查看一个[使用示例](/docs/integrations/document_loaders/larksuite)。 18 | 19 | ```python 20 | from langchain_community.document_loaders.larksuite import LarkSuiteDocLoader 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/cerebriumai.mdx: -------------------------------------------------------------------------------- 1 | # CerebriumAI 2 | 3 | [Cerebrium](https://docs.cerebrium.ai/cerebrium/getting-started/introduction) 是一个无服务器的 GPU 基础设施提供商。它提供了对多个 LLM 模型的 API 访问。 4 | 5 | 请参阅 [CerebriumAI 文档](https://docs.cerebrium.ai/examples/langchain) 中的示例。 6 | 7 | ## 安装和设置 8 | 9 | - 安装 Python 包: 10 | 11 | ```bash 12 | pip install cerebrium 13 | ``` 14 | 15 | - [获取 CerebriumAI API 密钥](https://docs.cerebrium.ai/cerebrium/getting-started/installation) 并将其设置为环境变量 (`CEREBRIUMAI_API_KEY`) 16 | 17 | ## LLMs 18 | 19 | 请参阅 [用法示例](/docs/integrations/llms/cerebriumai)。 20 | 21 | ```python 22 | from langchain_community.llms import CerebriumAI 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/chaindesk.mdx: -------------------------------------------------------------------------------- 1 | # Chaindesk 2 | 3 | [Chaindesk](https://chaindesk.ai) 是一个开源文档检索平台,可以帮助将个人数据与大型语言模型连接起来,访问其[GitHub](https://github.com/gmpetrov/databerry)。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要注册 Chaindesk,创建数据存储,添加一些数据,并获取数据存储的 API 端点 URL。我们需要[API 密钥](https://docs.chaindesk.ai/api-reference/authentication)。 8 | 9 | ## 检索器 10 | 11 | 查看[使用示例](/docs/integrations/retrievers/chaindesk)。 12 | 13 | ```python 14 | from langchain.retrievers import ChaindeskRetriever 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/chroma.mdx: -------------------------------------------------------------------------------- 1 | # Chroma 2 | 3 | [Chroma](https://docs.trychroma.com/getting-started) 是一个用于构建嵌入式人工智能应用的数据库。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install langchain-chroma 9 | ``` 10 | 11 | ## VectorStore 12 | 13 | 存在一个围绕 Chroma 向量数据库的包装器,允许您将其用作向量存储库,无论是用于语义搜索还是示例选择。 14 | 15 | ```python 16 | from langchain_chroma import Chroma 17 | ``` 18 | 19 | 有关 Chroma 包装器的更详细的演示,请参阅[此笔记本](/docs/integrations/vectorstores/chroma)。 20 | 21 | ## Retriever 22 | 23 | 查看[使用示例](/docs/integrations/retrievers/self_query/chroma_self_query)。 24 | 25 | ```python 26 | from langchain.retrievers import SelfQueryRetriever 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/clickhouse.mdx: -------------------------------------------------------------------------------- 1 | # ClickHouse 2 | 3 | > [ClickHouse](https://clickhouse.com/) 是一款快速且资源高效的开源数据库,适用于实时应用程序和分析,具有完整的 SQL 支持和广泛的功能,可帮助用户编写分析查询。它具有数据结构和距离搜索功能(如 `L2Distance`),以及[近似最近邻搜索索引](https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/annindexes),使 ClickHouse 能够作为高性能和可扩展的向量数据库,用于存储和搜索带有 SQL 的向量。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要安装 `clickhouse-connect` Python 包。 8 | 9 | ```bash 10 | pip install clickhouse-connect 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | 查看[使用示例](/docs/integrations/vectorstores/clickhouse)。 16 | 17 | ```python 18 | from langchain_community.vectorstores import Clickhouse, ClickhouseSettings 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/cloudflare.mdx: -------------------------------------------------------------------------------- 1 | # Cloudflare 2 | 3 | >[Cloudflare, Inc.(维基百科)](https://en.wikipedia.org/wiki/Cloudflare) 是一家提供内容传递网络服务、云安全服务、DDoS 缓解以及 ICANN 认证域名注册服务的美国公司。 4 | 5 | >[Cloudflare Workers AI](https://developers.cloudflare.com/workers-ai/) 允许您通过 REST API 从您的代码在 `Cloudflare` 网络上运行机器学习模型。 6 | 7 | ## 嵌入模型 8 | 9 | 请参阅[安装说明和使用示例](/docs/integrations/text_embedding/cloudflare_workersai)。 10 | 11 | ```python 12 | from langchain_community.embeddings.cloudflare_workersai import CloudflareWorkersAIEmbeddings 13 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/college_confidential.mdx: -------------------------------------------------------------------------------- 1 | # 大学机密 2 | 3 | [大学机密](https://www.collegeconfidential.com/) 提供了3800多所大学和大学的信息。 4 | 5 | ## 安装和设置 6 | 7 | 它没有任何特殊的设置。 8 | 9 | ## 文档加载器 10 | 11 | 查看[使用示例](/docs/integrations/document_loaders/college_confidential)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import CollegeConfidentialLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/confident.mdx: -------------------------------------------------------------------------------- 1 | # 自信的人工智能 2 | 3 | [自信的人工智能](https://confident-ai.com) 是 `DeepEval` 的创建者。 4 | 5 | [DeepEval](https://github.com/confident-ai/deepeval) 是一个用于对LLMs进行单元测试的软件包。使用 `DeepEval`,每个人都可以通过更快的迭代过程构建稳健的语言模型,同时结合单元测试和集成测试。`DeepEval` 在迭代过程中的每个步骤都提供支持,从合成数据的创建到测试。 6 | 7 | ## 安装和设置 8 | 9 | 您需要获取 [DeepEval API 凭据](https://app.confident-ai.com)。 10 | 11 | 您需要安装 `DeepEval` Python 软件包: 12 | 13 | ```bash 14 | pip install deepeval 15 | ``` 16 | 17 | ## 回调 18 | 19 | 查看一个 [示例](/docs/integrations/callbacks/confident)。 20 | 21 | ```python 22 | from langchain.callbacks.confident_callback import DeepEvalCallbackHandler 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/confluence.mdx: -------------------------------------------------------------------------------- 1 | # Confluence 2 | 3 | [Confluence](https://www.atlassian.com/software/confluence) 是一个维基协作平台,用于保存和组织与项目相关的所有材料。`Confluence` 是一个主要处理内容管理活动的知识库。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install atlassian-python-api 9 | ``` 10 | 11 | 我们需要设置 `username/api_key` 或 `Oauth2 login`。请参阅[说明](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/)。 12 | 13 | ## 文档加载器 14 | 15 | 请参阅[使用示例](/docs/integrations/document_loaders/confluence)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import ConfluenceLoader 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/context.mdx: -------------------------------------------------------------------------------- 1 | # 背景 2 | 3 | [Context](https://context.ai/) 为基于LLM的产品和功能提供用户分析。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要安装 `context-python` Python 包: 8 | 9 | ```bash 10 | pip install context-python 11 | ``` 12 | 13 | ## 回调函数 14 | 15 | 查看[使用示例](/docs/integrations/callbacks/context)。 16 | 17 | ```python 18 | from langchain.callbacks import ContextCallbackHandler 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/couchbase.mdx: -------------------------------------------------------------------------------- 1 | # Couchbase 2 | 3 | [Couchbase](http://couchbase.com/) 是一款备受赞誉的分布式 NoSQL 云数据库,为您的云端、移动、人工智能和边缘计算应用提供了无与伦比的多功能性、性能、可扩展性和经济价值。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要安装 `couchbase` 包。 8 | 9 | ```bash 10 | pip install couchbase 11 | ``` 12 | 13 | ## 文档加载器 14 | 15 | 查看 [使用示例](/docs/integrations/document_loaders/couchbase)。 16 | 17 | ```python 18 | from langchain_community.document_loaders.couchbase import CouchbaseLoader 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/ctranslate2.mdx: -------------------------------------------------------------------------------- 1 | # CTranslate2 2 | 3 | >[CTranslate2](https://opennmt.net/CTranslate2/quickstart.html) 是一个用于使用Transformer模型进行高效推理的C++和Python库。 4 | 5 | > 6 | 7 | >该项目实现了一个自定义运行时,应用了许多性能优化技术,如权重量化、层融合、批次重排序等,以加速和减少CPU和GPU上Transformer模型的内存使用。 8 | 9 | > 10 | 11 | >在[项目的存储库](https://opennmt.net/CTranslate2/guides/transformers.html)中包含了功能和支持的模型的完整列表。要开始使用,请查看官方的[快速入门指南](https://opennmt.net/CTranslate2/quickstart.html)。 12 | 13 | ## 安装和设置 14 | 15 | 安装Python包: 16 | 17 | ```bash 18 | pip install ctranslate2 19 | ``` 20 | 21 | ## LLMs 22 | 23 | 请参阅[使用示例](/docs/integrations/llms/ctranslate2)。 24 | 25 | ```python 26 | from langchain_community.llms import CTranslate2 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/cube.mdx: -------------------------------------------------------------------------------- 1 | # Cube 2 | 3 | >[Cube](https://cube.dev/) 是用于构建数据应用程序的语义层。它帮助数据工程师和应用程序开发人员从现代数据存储中访问数据,将其组织成一致的定义,并将其传递给每个应用程序。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要获取 Cube 实例的 API 密钥和 URL。请参阅[这些说明](https://cube.dev/docs/product/apis-integrations/rest-api#configuration-base-path)。 8 | 9 | ## 文档加载器 10 | 11 | ### Cube 语义层 12 | 13 | 请参阅[使用示例](/docs/integrations/document_loaders/cube_semantic)。 14 | 15 | ```python 16 | from langchain_community.document_loaders import CubeSemanticLoader 17 | ``` 18 | -------------------------------------------------------------------------------- /docs/integrations/providers/dashvector.mdx: -------------------------------------------------------------------------------- 1 | # DashVector 2 | 3 | > [DashVector](https://help.aliyun.com/document_detail/2510225.html) 是一项完全托管的 vectorDB 服务,支持高维稠密和稀疏向量、实时插入和过滤搜索。它被设计为能够自动扩展,并能够适应不同的应用需求。 4 | 5 | 本文演示了如何在 LangChain 生态系统中利用 DashVector。特别是,它展示了如何安装 DashVector,以及如何在 LangChain 中将其用作 VectorStore 插件。 6 | 7 | 文档分为两部分:安装和设置,以及对特定 DashVector 包装器的引用。 8 | 9 | ## 安装和设置 10 | 11 | 安装 Python SDK: 12 | 13 | ```bash 14 | pip install dashvector 15 | ``` 16 | 17 | ## VectorStore 18 | 19 | DashVector 集合被包装为熟悉的 VectorStore,以便在 LangChain 中进行本机使用,这使其可以轻松用于各种场景,如语义搜索或示例选择。 20 | 21 | 您可以通过以下方式导入 vectorstore: 22 | 23 | ```python 24 | from langchain_community.vectorstores import DashVector 25 | ``` 26 | 27 | 有关 DashVector 包装器的详细演示,请参阅[此笔记本](/docs/integrations/vectorstores/dashvector) -------------------------------------------------------------------------------- /docs/integrations/providers/datadog_logs.mdx: -------------------------------------------------------------------------------- 1 | # Datadog 日志 2 | 3 | >[Datadog](https://www.datadoghq.com/) 是一个针对云规模应用的监控和分析平台。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install datadog_api_client 9 | ``` 10 | 11 | 我们必须使用 Datadog API 密钥和应用密钥初始化加载器,并设置查询以提取所需的日志。 12 | 13 | ## 文档加载器 14 | 15 | 查看[使用示例](/docs/integrations/document_loaders/datadog_logs)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import DatadogLogsLoader 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/diffbot.mdx: -------------------------------------------------------------------------------- 1 | # Diffbot 2 | 3 | > [Diffbot](https://docs.diffbot.com/docs) 是一套基于机器学习的产品,可以轻松地对网络数据进行结构化和集成。 4 | 5 | ## 安装和设置 6 | 7 | [获取免费的 Diffbot API 令牌](https://app.diffbot.com/get-started/),并按照[这些说明](https://docs.diffbot.com/reference/authentication)进行身份验证。 8 | 9 | ## 文档加载器 10 | 11 | Diffbot 的 [Extract API](https://docs.diffbot.com/reference/extract-introduction) 是一个可以从网页中结构化和规范化数据的服务。 12 | 13 | 与传统的网络抓取工具不同,`Diffbot Extract` 不需要任何规则来读取页面上的内容。它使用计算机视觉模型将页面分类为 20 种可能的类型之一,然后将原始的 HTML 标记转换为 JSON。生成的结构化 JSON 遵循一致的[基于类型的本体论](https://docs.diffbot.com/docs/ontology),这使得可以轻松地从具有相同模式的多个不同网络来源提取数据。 14 | 15 | 查看[使用示例](/docs/integrations/document_loaders/diffbot)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import DiffbotLoader 19 | ``` 20 | 21 | ## 图表 22 | 23 | Diffbot 的 [自然语言处理 API](https://www.diffbot.com/products/natural-language/) 允许从非结构化文本数据中提取实体、关系和语义含义。 24 | 25 | 查看[使用示例](/docs/integrations/graphs/diffbot)。 26 | 27 | ```python 28 | from langchain_experimental.graph_transformers.diffbot import DiffbotGraphTransformer 29 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/dingo.mdx: -------------------------------------------------------------------------------- 1 | # DingoDB 2 | 3 | 本页面介绍了如何在 LangChain 中使用 DingoDB 生态系统。 4 | 5 | 内容分为两部分:安装和设置,以及特定 DingoDB 包装器的参考。 6 | 7 | ## 安装和设置 8 | 9 | - 使用 `pip install dingodb` 安装 Python SDK 10 | 11 | ## VectorStore 12 | 13 | 存在一个围绕 DingoDB 索引的包装器,允许您将其用作向量存储,用于语义搜索或示例选择。 14 | 15 | 要导入此 vectorstore: 16 | 17 | ```python 18 | from langchain_community.vectorstores import Dingo 19 | ``` 20 | 21 | 要了解有关 DingoDB 包装器的更详细步骤,请参阅[此笔记本](/docs/integrations/vectorstores/dingo) -------------------------------------------------------------------------------- /docs/integrations/providers/discord.mdx: -------------------------------------------------------------------------------- 1 | # Discord 2 | 3 | [Discord](https://discord.com/) 是一款支持语音通话和即时消息的社交平台。用户可以通过语音通话、视频通话、文字消息、媒体和文件在私聊或所谓的“服务器”中进行交流。服务器是一组持久的聊天室和语音频道,可以通过邀请链接进行访问。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install pandas 9 | ``` 10 | 11 | 按照以下步骤下载你的 `Discord` 数据: 12 | 13 | 1. 进入**用户设置** 14 | 15 | 2. 然后进入**隐私与安全** 16 | 17 | 3. 转到**请求我的所有数据**,并点击**请求数据**按钮 18 | 19 | 你可能需要等待30天才能收到你的数据。你将会收到一封发送到 Discord 注册邮箱的电子邮件。邮件中会有一个下载按钮,通过它你可以下载你的个人 Discord 数据。 20 | 21 | ## 文档加载器 22 | 23 | 查看[使用示例](/docs/integrations/document_loaders/discord)。 24 | 25 | **注意:** `DiscordChatLoader` 不是 `ChatLoader`,而是 `DocumentLoader`。它用于从 `Discord` 数据转储中加载数据。有关 `ChatLoader`,请参见下面的聊天加载器部分。 26 | 27 | ```python 28 | from langchain_community.document_loaders import DiscordChatLoader 29 | ``` 30 | 31 | ## 聊天加载器 32 | 33 | 查看[使用示例](/docs/integrations/chat_loaders/discord)。 -------------------------------------------------------------------------------- /docs/integrations/providers/docarray.mdx: -------------------------------------------------------------------------------- 1 | # DocArray 2 | 3 | [DocArray](https://docarray.jina.ai/) 是一个用于传输嵌套、非结构化、多模态数据的库,包括文本、图像、音频、视频、3D 网格等。它允许深度学习工程师使用 Python API 高效处理、嵌入、搜索、推荐、存储和传输多模态数据。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要安装 `docarray` Python 包。 8 | 9 | ```bash 10 | pip install docarray 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | LangChain 提供了对 `DocArray` 库中的 `In-memory` 和 `HNSW` 向量存储的访问。 16 | 17 | 查看[使用示例](/docs/integrations/vectorstores/docarray_hnsw)。 18 | 19 | ```python 20 | from langchain_community.vectorstores DocArrayHnswSearch 21 | ``` 22 | 23 | 查看[使用示例](/docs/integrations/vectorstores/docarray_in_memory)。 24 | 25 | ```python 26 | from langchain_community.vectorstores DocArrayInMemorySearch 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/doctran.mdx: -------------------------------------------------------------------------------- 1 | # Doctran 2 | 3 | >[Doctran](https://github.com/psychic-api/doctran) 是一个 Python 包。它利用 LLMs 和开源 NLP 库,将原始文本转换为干净、结构化、信息密集的文档,这些文档经过优化,适用于向量空间检索。您可以将 `Doctran` 看作一个黑匣子,将混乱的字符串输入,输出整洁、清晰、带标签的字符串。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install doctran 9 | ``` 10 | 11 | ## 文档转换器 12 | 13 | ### 文档询问器 14 | 15 | 查看 [DoctranQATransformer 的用法示例](/docs/integrations/document_transformers/doctran_interrogate_document)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import DoctranQATransformer 19 | ``` 20 | 21 | ### 属性提取器 22 | 23 | 查看 [DoctranPropertyExtractor 的用法示例](/docs/integrations/document_transformers/doctran_extract_properties)。 24 | 25 | ```python 26 | from langchain_community.document_loaders import DoctranPropertyExtractor 27 | ``` 28 | 29 | ### 文档翻译器 30 | 31 | 查看 [DoctranTextTranslator 的用法示例](/docs/integrations/document_transformers/doctran_translate_document)。 32 | 33 | ```python 34 | from langchain_community.document_loaders import DoctranTextTranslator 35 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/docugami.mdx: -------------------------------------------------------------------------------- 1 | # Docugami 2 | 3 | [Docugami](https://docugami.com) 将商业文件转换为文档 XML 知识图,生成代表整个文档的 XML 语义树的森林。这是一种丰富的表示,包括文档中各个块的语义和结构特征,以 XML 树的形式呈现。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install dgml-utils 9 | pip install docugami-langchain 10 | ``` 11 | 12 | ## 文档加载器 13 | 14 | 查看 [使用示例](/docs/integrations/document_loaders/docugami)。 15 | 16 | ```python 17 | from docugami_langchain.document_loaders import DocugamiLoader 18 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/docusaurus.mdx: -------------------------------------------------------------------------------- 1 | # Docusaurus 2 | 3 | [Docusaurus](https://docusaurus.io/) 是一个静态网站生成器,提供开箱即用的文档功能。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install -U beautifulsoup4 lxml 9 | ``` 10 | 11 | ## 文档加载器 12 | 13 | 查看一个[使用示例](/docs/integrations/document_loaders/docusaurus)。 14 | 15 | ```python 16 | from langchain_community.document_loaders import DocusaurusLoader 17 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/dropbox.mdx: -------------------------------------------------------------------------------- 1 | # Dropbox 2 | 3 | [Dropbox](https://en.wikipedia.org/wiki/Dropbox) 是一个文件托管服务,将传统文件、云内容和网页快捷方式集合在一个地方。 4 | 5 | ## 安装和设置 6 | 7 | 查看详细的[安装指南](/docs/integrations/document_loaders/dropbox#prerequisites)。 8 | 9 | ```bash 10 | pip install -U dropbox 11 | ``` 12 | 13 | ## 文档加载器 14 | 15 | 查看[使用示例](/docs/integrations/document_loaders/dropbox)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import DropboxLoader 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/duckdb.mdx: -------------------------------------------------------------------------------- 1 | # DuckDB 2 | 3 | >[DuckDB](https://duckdb.org/) 是一种嵌入式 SQL OLAP 数据库管理系统。 4 | 5 | ## 安装和设置 6 | 7 | 首先,您需要安装 `duckdb` Python 包。 8 | 9 | ```bash 10 | pip install duckdb 11 | ``` 12 | 13 | ## 文档加载器 14 | 15 | 请参阅 [使用示例](/docs/integrations/document_loaders/duckdb)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import DuckDBLoader 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/elevenlabs.mdx: -------------------------------------------------------------------------------- 1 | # ElevenLabs 2 | 3 | >[ElevenLabs](https://elevenlabs.io/about) 是一家语音人工智能研究与部署公司,旨在使内容以任何语言和声音普遍可访问。 4 | 5 | > 6 | 7 | >`ElevenLabs` 创建了最逼真、多功能和上下文感知的人工智能音频,能够以29种语言中的数百种新旧声音生成语音。 8 | 9 | ## 安装和设置 10 | 11 | 首先,您需要设置一个 ElevenLabs 账户。您可以按照 12 | 13 | [这里的说明](https://docs.elevenlabs.io/welcome/introduction)进行操作。 14 | 15 | 安装 Python 包: 16 | 17 | ```bash 18 | pip install elevenlabs 19 | ``` 20 | 21 | ## 工具 22 | 23 | 查看一个[使用示例](/docs/integrations/tools/eleven_labs_tts)。 24 | 25 | ```python 26 | from langchain_community.tools import ElevenLabsText2SpeechTool 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/epsilla.mdx: -------------------------------------------------------------------------------- 1 | # Epsilla 2 | 3 | 本页面介绍如何在 LangChain 中使用 [Epsilla](https://github.com/epsilla-cloud/vectordb)。内容分为两部分:安装和设置,以及对特定 Epsilla 包装器的引用。 4 | 5 | ## 安装和设置 6 | 7 | - 使用以下命令安装 Python SDK:`pip/pip3 install pyepsilla` 8 | 9 | ## 包装器 10 | 11 | ### VectorStore 12 | 13 | 存在一个围绕 Epsilla 向量数据库的包装器,允许您将其用作向量存储,无论是用于语义搜索还是示例选择。 14 | 15 | 要导入此向量存储: 16 | 17 | ```python 18 | from langchain_community.vectorstores import Epsilla 19 | ``` 20 | 21 | 有关 Epsilla 包装器的更详细说明,请参阅[此笔记本](/docs/integrations/vectorstores/epsilla) -------------------------------------------------------------------------------- /docs/integrations/providers/etherscan.mdx: -------------------------------------------------------------------------------- 1 | # 以太坊区块链浏览器 Etherscan 2 | 3 | [Etherscan](https://docs.etherscan.io/) 是领先的区块链浏览器、搜索、API 和分析平台,专为去中心化智能合约平台 `Ethereum` 设计。 4 | 5 | ## 安装和设置 6 | 7 | 请参阅详细的[安装指南](/docs/integrations/document_loaders/etherscan)。 8 | 9 | ## 文档加载器 10 | 11 | 请查看[使用示例](/docs/integrations/document_loaders/etherscan)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import EtherscanLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/evernote.mdx: -------------------------------------------------------------------------------- 1 | # EverNote 2 | 3 | [EverNote](https://evernote.com/) 旨在存档和创建笔记,其中可以嵌入照片、音频和保存的网页内容。笔记存储在虚拟的 "笔记本" 中,可以进行标记、注释、编辑、搜索和导出。 4 | 5 | ## 安装和设置 6 | 7 | 首先,您需要安装 `lxml` 和 `html2text` Python 包。 8 | 9 | ```bash 10 | pip install lxml 11 | pip install html2text 12 | ``` 13 | 14 | ## 文档加载器 15 | 16 | 查看 [使用示例](/docs/integrations/document_loaders/evernote)。 17 | 18 | ```python 19 | from langchain_community.document_loaders import EverNoteLoader 20 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/exa_search.md: -------------------------------------------------------------------------------- 1 | # Exa 搜索 2 | 3 | Exa 的搜索集成存在于其独立的[合作伙伴包](https://pypi.org/project/langchain-exa/)中。您可以使用以下命令进行安装: 4 | 5 | ```python 6 | %pip install -qU langchain-exa 7 | ``` 8 | 9 | 为了使用该包,您还需要将 `EXA_API_KEY` 环境变量设置为您的 Exa API 密钥。 10 | 11 | ## 检索器 12 | 13 | 您可以在标准检索流程中使用 [`ExaSearchRetriever`](/docs/integrations/tools/exa_search#using-exasearchretriever)。您可以按以下方式导入它: 14 | 15 | ```python 16 | from langchain_exa import ExaSearchRetriever 17 | ``` 18 | 19 | ## 工具 20 | 21 | 您可以像在[Exa工具调用文档](/docs/integrations/tools/exa_search#using-the-exa-sdk-as-langchain-agent-tools)中描述的那样,将 Exa 作为代理工具使用。 -------------------------------------------------------------------------------- /docs/integrations/providers/fauna.mdx: -------------------------------------------------------------------------------- 1 | # Fauna 2 | 3 | [Fauna](https://fauna.com/) 是一种分布式文档关系数据库,它将文档的灵活性与关系型数据库的强大功能相结合,具有跨区域、跨云端或全球扩展的能力。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要获取秘钥。 8 | 9 | 请查看详细的[指南](https://docs.fauna.com/fauna/current/learn/security_model/)。 10 | 11 | 我们需要安装 `fauna` 包。 12 | 13 | ```bash 14 | pip install -U fauna 15 | ``` 16 | 17 | ## 文档加载器 18 | 19 | 查看一个[使用示例](/docs/integrations/document_loaders/fauna)。 20 | 21 | ```python 22 | from langchain_community.document_loaders.fauna import FaunaLoader 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/fiddler.md: -------------------------------------------------------------------------------- 1 | # Fiddler 2 | 3 | [Fiddler](https://www.fiddler.ai/) 提供了一个统一的平台,可以在企业规模下监控、解释、分析和改进机器学习部署。 4 | 5 | ## 安装和设置 6 | 7 | 使用 Fiddler 设置您的模型[链接](https://demo.fiddler.ai): 8 | 9 | * 用于连接到 Fiddler 的 URL 10 | 11 | * 您的组织 ID 12 | 13 | * 您的授权令牌 14 | 15 | 安装 Python 包: 16 | 17 | ```bash 18 | pip install fiddler-client 19 | ``` 20 | 21 | ## 回调 22 | 23 | ```python 24 | from langchain_community.callbacks.fiddler_callback import FiddlerCallbackHandler 25 | ``` 26 | 27 | 查看一个[示例](/docs/integrations/callbacks/fiddler)。 -------------------------------------------------------------------------------- /docs/integrations/providers/figma.mdx: -------------------------------------------------------------------------------- 1 | # Figma 2 | 3 | [Figma](https://www.figma.com/) 是一个用于界面设计的协作 Web 应用程序。 4 | 5 | ## 安装和设置 6 | 7 | Figma API 需要 `access token`、`node_ids` 和 `file key`。 8 | 9 | `file key` 可以从 URL 中获取。https://www.figma.com/file/{filekey}/sampleFilename 10 | 11 | `Node IDs` 也可以在 URL 中找到。单击任何内容,查找 '?node-id={node_id}' 参数。 12 | 13 | `Access token` 的 [使用说明](https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens)。 14 | 15 | ## 文档加载器 16 | 17 | 查看 [使用示例](/docs/integrations/document_loaders/figma)。 18 | 19 | ```python 20 | from langchain_community.document_loaders import FigmaFileLoader 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/forefrontai.mdx: -------------------------------------------------------------------------------- 1 | # 前沿人工智能 2 | 3 | 本页面介绍如何在 LangChain 中使用前沿人工智能生态系统。 4 | 5 | 内容分为两部分:安装和设置,以及特定前沿人工智能封装的参考。 6 | 7 | ## 安装和设置 8 | 9 | - 获取前沿人工智能的 API 密钥,并将其设置为环境变量 (`FOREFRONTAI_API_KEY`) 10 | 11 | ## 封装 12 | 13 | ### LLM 14 | 15 | 存在一个前沿人工智能 LLM 封装,您可以通过以下方式访问 16 | 17 | ```python 18 | from langchain_community.llms import ForefrontAI 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/geopandas.mdx: -------------------------------------------------------------------------------- 1 | # Geopandas 2 | 3 | [GeoPandas](https://geopandas.org/) 是一个开源项目,旨在使在 Python 中处理地理空间数据变得更加容易。`GeoPandas` 扩展了 `pandas` 使用的数据类型,以允许对几何类型进行空间操作。几何操作是由 `shapely` 执行的。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要安装几个 Python 包。 8 | 9 | ```bash 10 | pip install -U sodapy pandas geopandas 11 | ``` 12 | 13 | ## 文档加载器 14 | 15 | 查看 [使用示例](/docs/integrations/document_loaders/geopandas)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import OpenCityDataLoader 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/git.mdx: -------------------------------------------------------------------------------- 1 | # Git 2 | 3 | [Git](https://en.wikipedia.org/wiki/Git) 是一种分布式版本控制系统,用于跟踪任何一组计算机文件的更改,通常用于协调程序员在软件开发过程中共同开发源代码的工作。 4 | 5 | ## 安装和设置 6 | 7 | 首先,您需要安装 `GitPython` Python 包。 8 | 9 | ```bash 10 | pip install GitPython 11 | ``` 12 | 13 | ## 文档加载器 14 | 15 | 查看 [使用示例](/docs/integrations/document_loaders/git)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import GitLoader 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/gitbook.mdx: -------------------------------------------------------------------------------- 1 | # GitBook 2 | 3 | >[GitBook](https://docs.gitbook.com/) 是一个现代化的文档平台,团队可以在上面记录从产品到内部知识库和API的所有内容。 4 | 5 | ## 安装和设置 6 | 7 | 对于GitBook,没有任何特殊的设置。 8 | 9 | ## 文档加载器 10 | 11 | 请参阅[使用示例](/docs/integrations/document_loaders/gitbook)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import GitbookLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/github.mdx: -------------------------------------------------------------------------------- 1 | # GitHub 2 | 3 | >[GitHub](https://github.com/) 是一个开发者平台,允许开发者创建、存储、管理和分享他们的代码。它使用 `Git` 软件,提供了Git的分布式版本控制以及访问控制、bug跟踪、软件功能请求、任务管理、持续集成以及每个项目的维基。 4 | 5 | ## 安装和设置 6 | 7 | 要访问GitHub API,您需要一个[个人访问令牌](https://github.com/settings/tokens)。 8 | 9 | ## 文档加载器 10 | 11 | GitHub有两种文档加载器可用。 12 | 13 | 查看一个[使用示例](/docs/integrations/document_loaders/github)。 14 | 15 | ```python 16 | from langchain_community.document_loaders import GitHubIssuesLoader 17 | from langchain.document_loaders import GithubFileLoader 18 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/gooseai.mdx: -------------------------------------------------------------------------------- 1 | # GooseAI 2 | 3 | 本页面介绍如何在 LangChain 中使用 GooseAI 生态系统。 4 | 5 | 内容分为两部分:安装和设置,以及特定 GooseAI 封装的参考资料。 6 | 7 | ## 安装和设置 8 | 9 | - 使用 `pip install openai` 安装 Python SDK。 10 | 11 | - 从[这里](https://goose.ai/)获取你的 GooseAI API 密钥。 12 | 13 | - 设置环境变量 (`GOOSEAI_API_KEY`)。 14 | 15 | ```python 16 | import os 17 | os.environ["GOOSEAI_API_KEY"] = "YOUR_API_KEY" 18 | ``` 19 | 20 | ## 封装 21 | 22 | ### LLM 23 | 24 | 存在一个 GooseAI LLM 封装,你可以通过以下方式访问: 25 | 26 | ```python 27 | from langchain_community.llms import GooseAI 28 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/gradient.mdx: -------------------------------------------------------------------------------- 1 | # 渐变 2 | 3 | [Gradient](https://gradient.ai/) 允许使用简单的网络 API 对 LLM 进行微调并完成。 4 | 5 | ## 安装和设置 6 | 7 | - 安装 Python SDK: 8 | 9 | ```bash 10 | pip install gradientai 11 | ``` 12 | 13 | 获取 [Gradient 访问令牌和工作区](https://gradient.ai/),并将其设置为环境变量 (`Gradient_ACCESS_TOKEN`) 和 (`GRADIENT_WORKSPACE_ID`) 14 | 15 | ## LLM 16 | 17 | 存在一个 Gradient LLM 包装器,您可以通过以下方式访问 18 | 19 | 查看[使用示例](/docs/integrations/llms/gradient)。 20 | 21 | ```python 22 | from langchain_community.llms import GradientLLM 23 | ``` 24 | 25 | ## 文本嵌入模型 26 | 27 | 存在一个 Gradient 嵌入模型,您可以通过以下方式访问 28 | 29 | ```python 30 | from langchain_community.embeddings import GradientEmbeddings 31 | ``` 32 | 33 | 有关更详细的步骤,请参阅[此笔记本](/docs/integrations/text_embedding/gradient) -------------------------------------------------------------------------------- /docs/integrations/providers/groq.mdx: -------------------------------------------------------------------------------- 1 | # Groq 2 | 3 | 欢迎来到 Groq!🚀 在 Groq,我们开发了世界上第一款语言处理单元™,或者 LPU。Groq LPU 具有确定性、单核流式架构,为 GenAI 推理速度设定了标准,并且针对任何给定的工作负载具有可预测和可重复的性能。 4 | 5 | 除了架构之外,我们的软件旨在为像您这样的开发人员提供所需的工具,以创建创新的、强大的人工智能应用。有了 Groq 作为您的引擎,您可以: 6 | 7 | * 实现实时人工智能和高性能计算推理的无损延迟和性能🔥 8 | 9 | * 了解任何给定工作负载的确切性能和计算时间🔮 10 | 11 | * 利用我们的尖端技术,保持领先地位💪 12 | 13 | 想要了解更多关于 Groq 吗?请访问我们的[网站](https://groq.com)获取更多资源,并加入我们的[Discord 社区](https://discord.gg/JvNsBDKeCG)与我们的开发人员联系! 14 | 15 | ## 安装和设置 16 | 17 | 安装集成包: 18 | 19 | ```bash 20 | pip install langchain-groq 21 | ``` 22 | 23 | 请求[API 密钥](https://wow.groq.com)并将其设置为环境变量: 24 | 25 | ```bash 26 | export GROQ_API_KEY=gsk_... 27 | ``` 28 | 29 | ## 聊天模型 30 | 31 | 查看[使用示例](/docs/integrations/chat/groq)。 -------------------------------------------------------------------------------- /docs/integrations/providers/gutenberg.mdx: -------------------------------------------------------------------------------- 1 | # 古腾堡计划 2 | 3 | [古腾堡计划](https://www.gutenberg.org/about/)是一个免费电子书的在线图书馆。 4 | 5 | ## 安装和设置 6 | 7 | 对于古腾堡计划,没有任何特殊的设置要求。 8 | 9 | ## 文档加载器 10 | 11 | 查看[使用示例](/docs/integrations/document_loaders/gutenberg)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import GutenbergLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/hacker_news.mdx: -------------------------------------------------------------------------------- 1 | # 黑客新闻 2 | 3 | >[黑客新闻](https://en.wikipedia.org/wiki/Hacker_News)(有时缩写为 `HN`)是一个专注于计算机科学和创业精神的社交新闻网站。它由投资基金和初创企业孵化器 `Y Combinator` 运营。一般来说,可以提交的内容被定义为“满足人们的求知欲的任何内容”。 4 | 5 | ## 安装和设置 6 | 7 | 对于它并没有特别的设置要求。 8 | 9 | ## 文档加载器 10 | 11 | 查看[使用示例](/docs/integrations/document_loaders/hacker_news)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import HNLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/hazy_research.mdx: -------------------------------------------------------------------------------- 1 | # Hazy Research 2 | 3 | 本页面介绍了如何在LangChain中使用Hazy Research生态系统。 4 | 5 | 它分为两个部分:安装和设置,以及对特定Hazy Research包装器的引用。 6 | 7 | ## 安装和设置 8 | 9 | - 要使用`manifest`,请使用`pip install manifest-ml`进行安装 10 | 11 | ## 包装器 12 | 13 | ### LLM 14 | 15 | 存在一个LLM包装器,用于Hazy Research的`manifest`库。 16 | 17 | `manifest`是一个Python库,它本身是许多模型提供者的包装器,并添加了缓存、历史记录等功能。 18 | 19 | 要使用此包装器: 20 | 21 | ```python 22 | from langchain_community.llms.manifest import ManifestWrapper 23 | ``` 24 | -------------------------------------------------------------------------------- /docs/integrations/providers/hologres.mdx: -------------------------------------------------------------------------------- 1 | # Hologres 2 | 3 | [Hologres](https://www.alibabacloud.com/help/en/hologres/latest/introduction) 是由阿里云开发的统一实时数据仓库服务。您可以使用 Hologres 实时编写、更新、处理和分析大量数据。 4 | 5 | `Hologres` 支持标准 `SQL` 语法,兼容 `PostgreSQL`,并支持大多数 PostgreSQL 函数。Hologres 支持高达 PB 级别的数据的在线分析处理(OLAP)和即席分析,并提供高并发和低延迟的在线数据服务。 6 | 7 | `Hologres` 通过采用 [Proxima](https://www.alibabacloud.com/help/en/hologres/latest/vector-processing) 提供了**向量数据库**功能。 8 | 9 | `Proxima` 是由 `阿里巴巴达摩院` 开发的高性能软件库。它允许您搜索向量的最近邻居。Proxima 提供比 Faiss 等类似开源软件更高的稳定性和性能。Proxima 允许您以高吞吐量和低延迟搜索相似的文本或图像嵌入。Hologres 与 Proxima 深度集成,以提供高性能的向量搜索服务。 10 | 11 | ## 安装和设置 12 | 13 | 点击[此处](https://www.alibabacloud.com/zh/product/hologres)快速部署 Hologres 云实例。 14 | 15 | ```bash 16 | pip install hologres-vector 17 | ``` 18 | 19 | ## 向量存储 20 | 21 | 查看[使用示例](/docs/integrations/vectorstores/hologres)。 22 | 23 | ```python 24 | from langchain_community.vectorstores import Hologres 25 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/html2text.mdx: -------------------------------------------------------------------------------- 1 | # HTML转文本 2 | 3 | [html2text](https://github.com/Alir3z4/html2text/) 是一个将`HTML`页面转换为清晰易读的纯`ASCII文本`的Python软件包。 4 | 5 | 这个ASCII文本也恰好是有效的`Markdown`(一种文本到HTML的格式)。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install html2text 11 | ``` 12 | 13 | ## 文档转换器 14 | 15 | 查看一个[使用示例](/docs/integrations/document_transformers/html2text)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import Html2TextTransformer 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/huawei.mdx: -------------------------------------------------------------------------------- 1 | # 华为 2 | 3 | [华为技术有限公司](https://www.huawei.com/)是一家中国跨国数字通信技术公司。 4 | 5 | [华为云](https://www.huaweicloud.com/intl/en-us/product/)提供全面的全球云计算服务套件。 6 | 7 | ## 安装和设置 8 | 9 | 要访问`华为云`,您需要一个访问令牌。 10 | 11 | 您还需要安装一个Python库: 12 | 13 | ```bash 14 | pip install -U esdk-obs-python 15 | ``` 16 | 17 | ## 文档加载器 18 | 19 | ### 华为OBS目录 20 | 21 | 查看[使用示例](/docs/integrations/document_loaders/huawei_obs_directory)。 22 | 23 | ```python 24 | from langchain_community.document_loaders import OBSDirectoryLoader 25 | ``` 26 | 27 | ### 华为OBS文件 28 | 29 | 查看[使用示例](/docs/integrations/document_loaders/huawei_obs_file)。 30 | 31 | ```python 32 | from langchain_community.document_loaders.obs_file import OBSFileLoader 33 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/ifixit.mdx: -------------------------------------------------------------------------------- 1 | # iFixit 2 | 3 | [iFixit](https://www.ifixit.com) 是网络上最大的开放式维修社区。该网站包含近10万份维修手册,42,000种设备的20万个问题和答案,所有数据均在`CC-BY-NC-SA 3.0`许可下发布。 4 | 5 | ## 安装和设置 6 | 7 | 它没有任何特殊的设置。 8 | 9 | ## 文档加载器 10 | 11 | 查看[使用示例](/docs/integrations/document_loaders/ifixit)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import IFixitLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/imsdb.mdx: -------------------------------------------------------------------------------- 1 | # IMSDb 2 | 3 | >[IMSDb](https://imsdb.com/) 是 `Internet Movie Script Database`(互联网电影剧本数据库)。 4 | 5 | ## 安装和设置 6 | 7 | 它不需要任何特殊的设置。 8 | 9 | ## 文档加载器 10 | 11 | 查看一个[使用示例](/docs/integrations/document_loaders/imsdb)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import IMSDbLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/infinispanvs.mdx: -------------------------------------------------------------------------------- 1 | # Infinispan VS 2 | 3 | [Infinispan](https://infinispan.org) 是一个开源的内存数据网格,提供了一个能够存储各种类型数据的键/值数据存储,从 Java 对象到纯文本都可以。自版本 15 起,Infinispan 支持在缓存上进行向量搜索。 4 | 5 | ## 安装和设置 6 | 7 | 请参阅 [入门指南](https://infinispan.org/get-started/) 以运行 Infinispan 服务器,您可能需要禁用身份验证(目前不支持)。 8 | 9 | ## 向量存储 10 | 11 | 查看 [使用示例](/docs/integrations/vectorstores/infinispanvs)。 12 | 13 | ```python 14 | from langchain_community.vectorstores import InfinispanVS 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/infinity.mdx: -------------------------------------------------------------------------------- 1 | # 无限大 2 | 3 | >[无限大](https://github.com/michaelfeil/infinity) 允许创建文本嵌入。 4 | 5 | ## 文本嵌入模型 6 | 7 | 存在一个名为无限大嵌入模型,您可以通过以下方式访问: 8 | 9 | ```python 10 | from langchain_community.embeddings import InfinityEmbeddings 11 | ``` 12 | 13 | 有关更详细的操作步骤,请参阅[此笔记本](/docs/integrations/text_embedding/infinity)。 -------------------------------------------------------------------------------- /docs/integrations/providers/infino.mdx: -------------------------------------------------------------------------------- 1 | # Infino 2 | 3 | [Infino](https://github.com/infinohq/infino) 是一个开源的可观测性平台,可以同时存储指标和应用程序日志。 4 | 5 | `Infino` 的主要特性包括: 6 | 7 | - **指标跟踪**:捕获语言模型处理请求所需的时间、错误、令牌数量以及特定语言模型的成本指示。 8 | 9 | - **数据跟踪**:记录并存储每个 LangChain 交互的提示、请求和响应数据。 10 | 11 | - **图形可视化**:生成随时间变化的基本图表,描述请求持续时间、错误发生次数、令牌数量和成本等指标。 12 | 13 | ## 安装和设置 14 | 15 | 首先,您需要按照以下步骤安装 `infinopy` Python 包: 16 | 17 | ```bash 18 | pip install infinopy 19 | ``` 20 | 21 | 如果您已经运行了 `Infino 服务器`,那么您可以开始使用了;但如果您没有,可以按照以下步骤启动它: 22 | 23 | - 确保已安装 Docker 24 | 25 | - 在您的终端中运行以下命令: 26 | 27 | ``` 28 | docker run --rm --detach --name infino-example -p 3000:3000 infinohq/infino:latest 29 | ``` 30 | 31 | ## 使用 Infino 32 | 33 | 查看 [InfinoCallbackHandler 的使用示例](/docs/integrations/callbacks/infino)。 34 | 35 | ```python 36 | from langchain.callbacks import InfinoCallbackHandler 37 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/iugu.mdx: -------------------------------------------------------------------------------- 1 | # Iugu 2 | 3 | [Iugu](https://www.iugu.com/) 是一家巴西服务和软件即服务(SaaS)公司。该公司提供用于电子商务网站和移动应用程序的支付处理软件和应用程序编程接口。 4 | 5 | ## 安装和设置 6 | 7 | `Iugu API` 需要访问令牌,可以在 `Iugu` 仪表板中找到。 8 | 9 | ## 文档加载器 10 | 11 | 查看 [使用示例](/docs/integrations/document_loaders/iugu)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import IuguLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/jina.mdx: -------------------------------------------------------------------------------- 1 | # Jina 2 | 3 | 本页面介绍了如何在 LangChain 中使用 Jina 嵌入。内容分为两部分:安装和设置,以及特定 Jina 封装的参考资料。 4 | 5 | ## 安装和设置 6 | 7 | - 从[这里](https://jina.ai/embeddings/)获取 Jina AI API 令牌,并将其设置为环境变量 (`JINA_API_TOKEN`) 8 | 9 | 存在一个 Jina 嵌入封装,您可以通过以下方式访问: 10 | 11 | ```python 12 | from langchain_community.embeddings import JinaEmbeddings 13 | # 如果未传递 jina_api_key,则会从 `JINA_API_TOKEN` 环境变量中获取 14 | embeddings = JinaEmbeddings(jina_api_key='jina_**', model_name='jina-embeddings-v2-base-en') 15 | ``` 16 | 17 | 您可以从[这里](https://jina.ai/embeddings/)检查可用模型的列表。 18 | 19 | 有关更详细的操作说明,请参阅[此笔记本](/docs/integrations/text_embedding/jina)。 -------------------------------------------------------------------------------- /docs/integrations/providers/joplin.mdx: -------------------------------------------------------------------------------- 1 | # Joplin 2 | 3 | [Joplin](https://joplinapp.org/) 是一款开源的笔记应用。它可以记录你的想法,并且可以在任何设备上安全地访问这些记录。 4 | 5 | ## 安装和设置 6 | 7 | `Joplin API` 需要一个访问令牌。你可以在[这里](https://joplinapp.org/api/references/rest_api/)找到安装说明。 8 | 9 | ## 文档加载器 10 | 11 | 查看一个[使用示例](/docs/integrations/document_loaders/joplin)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import JoplinLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/kdbai.mdx: -------------------------------------------------------------------------------- 1 | # KDB.AI 2 | 3 | [KDB.AI](https://kdb.ai) 是一款强大的基于知识的向量数据库和搜索引擎,可以让您利用实时数据构建可扩展、可靠的人工智能应用程序,提供高级搜索、推荐和个性化功能。 4 | 5 | ## 安装和设置 6 | 7 | 安装 Python SDK: 8 | 9 | ```bash 10 | pip install kdbai-client 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | 存在一个围绕 KDB.AI 索引的包装器,允许您将其用作向量存储,无论是用于语义搜索还是示例选择。 16 | 17 | ```python 18 | from langchain_community.vectorstores import KDBAI 19 | ``` 20 | 21 | 有关 KDB.AI 向量存储的更详细介绍,请参阅[此笔记本](/docs/integrations/vectorstores/kdbai)。 -------------------------------------------------------------------------------- /docs/integrations/providers/labelstudio.mdx: -------------------------------------------------------------------------------- 1 | # 标签工作室 2 | 3 | [标签工作室](https://labelstud.io/guide/get_started) 是一个开源的数据标注平台,为 LangChain 提供了灵活性,用于为大型语言模型(LLMs)标记数据。它还可以帮助准备自定义训练数据,并通过人类反馈收集和评估响应。 4 | 5 | ## 安装和设置 6 | 7 | 请查看 [标签工作室安装指南](https://labelstud.io/guide/install) 以获取安装选项。 8 | 9 | 我们需要安装 `label-studio` 和 `label-studio-sdk-python` Python 包: 10 | 11 | ```bash 12 | pip install label-studio label-studio-sdk 13 | ``` 14 | 15 | ## 回调 16 | 17 | 查看一个[使用示例](/docs/integrations/callbacks/labelstudio)。 18 | 19 | ```python 20 | from langchain.callbacks import LabelStudioCallbackHandler 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/lakefs.mdx: -------------------------------------------------------------------------------- 1 | # lakeFS 2 | 3 | [lakeFS](https://docs.lakefs.io/) 提供了对数据湖的可伸缩版本控制,并使用类似 Git 的语义来创建和访问这些版本。 4 | 5 | ## 安装和设置 6 | 7 | 获取 `ENDPOINT`、`LAKEFS_ACCESS_KEY` 和 `LAKEFS_SECRET_KEY`。 8 | 9 | 您可以在[这里](https://docs.lakefs.io/quickstart/launch.html)找到安装说明。 10 | 11 | ## 文档加载器 12 | 13 | 查看[使用示例](/docs/integrations/document_loaders/lakefs)。 14 | 15 | ```python 16 | from langchain_community.document_loaders import LakeFSLoader 17 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/lancedb.mdx: -------------------------------------------------------------------------------- 1 | # LanceDB 2 | 3 | 本页面介绍如何在 LangChain 中使用 [LanceDB](https://github.com/lancedb/lancedb)。内容分为两部分:安装和设置,以及特定 LanceDB 包装器的参考。 4 | 5 | ## 安装和设置 6 | 7 | - 使用 `pip install lancedb` 安装 Python SDK 8 | 9 | ## 包装器 10 | 11 | ### VectorStore 12 | 13 | 存在一个围绕 LanceDB 数据库的包装器,允许您将其用作矢量存储,无论是用于语义搜索还是示例选择。 14 | 15 | 要导入此矢量存储: 16 | 17 | ```python 18 | from langchain_community.vectorstores import LanceDB 19 | ``` 20 | 21 | 有关 LanceDB 包装器的更详细演示,请参阅[此笔记本](/docs/integrations/vectorstores/lancedb) -------------------------------------------------------------------------------- /docs/integrations/providers/lantern.mdx: -------------------------------------------------------------------------------- 1 | # 兰特灯 2 | 3 | 本页介绍如何在 LangChain 中使用 [兰特灯](https://github.com/lanterndata/lantern)。内容分为两部分:设置和特定兰特灯包装器的引用。 4 | 5 | ## 设置 6 | 7 | 1. 第一步是创建一个安装了 `lantern` 扩展的数据库。 8 | 9 | 请按照 [兰特灯安装指南](https://github.com/lanterndata/lantern#-quick-install) 中的步骤来安装数据库和扩展。使用 Docker 镜像是最简单的入门方式。 10 | 11 | ## 包装器 12 | 13 | ### 向量存储 14 | 15 | 存在一个围绕着 Postgres 向量数据库的包装器,允许您将其用作向量存储,无论是用于语义搜索还是示例选择。 16 | 17 | 要导入此向量存储: 18 | 19 | ```python 20 | from langchain_community.vectorstores import Lantern 21 | ``` 22 | 23 | ### 用法 24 | 25 | 要了解更详细的兰特灯包装器操作步骤,请参阅[此笔记本](/docs/integrations/vectorstores/lantern)。 -------------------------------------------------------------------------------- /docs/integrations/providers/llamacpp.mdx: -------------------------------------------------------------------------------- 1 | # Llama.cpp 2 | 3 | 本页面介绍了如何在LangChain中使用[llama.cpp](https://github.com/ggerganov/llama.cpp)。它分为两个部分:安装和设置,以及对特定的Llama-cpp包装器的引用。 4 | 5 | ## 安装和设置 6 | 7 | - 使用`pip install llama-cpp-python`安装Python包。 8 | 9 | - 根据[说明](https://github.com/ggerganov/llama.cpp)下载并将其中一个支持的模型转换为llama.cpp格式。 10 | 11 | ## 包装器 12 | 13 | ### LLM 14 | 15 | 存在一个LlamaCpp LLM包装器,您可以使用以下代码访问: 16 | 17 | ```python 18 | from langchain_community.llms import LlamaCpp 19 | ``` 20 | 21 | 有关更详细的步骤,请参见[此笔记本](/docs/integrations/llms/llamacpp)。 22 | 23 | ### 嵌入 24 | 25 | 存在一个LlamaCpp嵌入包装器,您可以使用以下代码访问: 26 | 27 | ```python 28 | from langchain_community.embeddings import LlamaCppEmbeddings 29 | ``` 30 | 31 | 有关更详细的步骤,请参见[此笔记本](/docs/integrations/text_embedding/llamacpp)。 -------------------------------------------------------------------------------- /docs/integrations/providers/llmonitor.mdx: -------------------------------------------------------------------------------- 1 | # LLMonitor 2 | 3 | [LLMonitor](https://llmonitor.com?utm_source=langchain&utm_medium=py&utm_campaign=docs) 是一个开源的可观测性平台,提供成本和使用情况分析、用户跟踪、追踪和评估工具。 4 | 5 | ## 安装和设置 6 | 7 | 在 [llmonitor.com](https://llmonitor.com?utm_source=langchain&utm_medium=py&utm_campaign=docs) 上创建一个账户,然后复制你的新应用的 `tracking id`。 8 | 9 | 一旦你获得了它,通过以下命令将其设置为环境变量: 10 | 11 | ```bash 12 | export LLMONITOR_APP_ID="..." 13 | ``` 14 | 15 | ## 回调 16 | 17 | 查看一个[使用示例](/docs/integrations/callbacks/llmonitor)。 18 | 19 | ```python 20 | from langchain.callbacks import LLMonitorCallbackHandler 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/mediawikidump.mdx: -------------------------------------------------------------------------------- 1 | # MediaWikiDump 2 | 3 | [MediaWiki XML Dumps](https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps) 包含了维基的内容(包括所有修订版本的维基页面),但不包含与网站相关的数据。XML dump 并不能完全备份维基数据库,它不包含用户账户、图片、编辑日志等。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要安装几个 Python 包。 8 | 9 | `mediawiki-utilities` 支持未合并分支中的 XML schema 0.11。 10 | 11 | ```bash 12 | pip install -qU git+https://github.com/mediawiki-utilities/python-mwtypes@updates_schema_0.11 13 | ``` 14 | 15 | `mediawiki-utilities mwxml` 存在一个 bug,修复 PR 正在等待中。 16 | 17 | ```bash 18 | pip install -qU git+https://github.com/gdedrouas/python-mwxml@xml_format_0.11 19 | pip install -qU mwparserfromhell 20 | ``` 21 | 22 | ## 文档加载器 23 | 24 | 请参考[使用示例](/docs/integrations/document_loaders/mediawikidump)。 25 | 26 | ```python 27 | from langchain_community.document_loaders import MWDumpLoader 28 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/meilisearch.mdx: -------------------------------------------------------------------------------- 1 | # Meilisearch 2 | 3 | > [Meilisearch](https://meilisearch.com) 是一款开源、速度极快且超相关的搜索引擎。 4 | 5 | > 它具有出色的默认设置,可帮助开发人员构建迅捷的搜索体验。 6 | 7 | 您可以选择 [自行托管 Meilisearch](https://www.meilisearch.com/docs/learn/getting_started/installation#local-installation) 或在 [Meilisearch 云服务](https://www.meilisearch.com/pricing) 上运行。 8 | 9 | `Meilisearch v1.3` 支持向量搜索。 10 | 11 | ## 安装与设置 12 | 13 | 查看[使用示例](/docs/integrations/vectorstores/meilisearch)以获取详细的配置说明。 14 | 15 | 我们需要安装 `meilisearch` Python 包。 16 | 17 | ```bash 18 | pip install meilisearch 19 | ``` 20 | 21 | ## 向量存储 22 | 23 | 查看[使用示例](/docs/integrations/vectorstores/meilisearch)。 24 | 25 | ```python 26 | from langchain_community.vectorstores import Meilisearch 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/metal.mdx: -------------------------------------------------------------------------------- 1 | # 金属 2 | 3 | 本页面介绍如何在 LangChain 中使用 [Metal](https://getmetal.io)。 4 | 5 | ## 什么是 Metal? 6 | 7 | Metal 是一个专为生产环境打造的管理检索和内存平台。您可以轻松地将数据索引到 `Metal` 中,并对其进行语义搜索和检索。 8 | 9 | ![Metal 仪表板的屏幕截图,显示了带有示例数据的浏览索引功能。](/img/MetalDash.png "Metal 仪表板界面") 10 | 11 | ## 快速开始 12 | 13 | 首先,[创建一个 Metal 账户](https://app.getmetal.io/signup)。 14 | 15 | 然后,您可以轻松地利用 `MetalRetriever` 类开始检索数据,进行语义搜索,提示上下文等操作。该类接受一个 `Metal` 实例和一个要传递给 Metal API 的参数字典。 16 | 17 | ```python 18 | from langchain.retrievers import MetalRetriever 19 | from metal_sdk.metal import Metal 20 | metal = Metal("API_KEY", "CLIENT_ID", "INDEX_ID"); 21 | retriever = MetalRetriever(metal, params={"limit": 2}) 22 | docs = retriever.invoke("search term") 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/milvus.mdx: -------------------------------------------------------------------------------- 1 | # Milvus 2 | 3 | >[Milvus](https://milvus.io/docs/overview.md) 是一个存储、索引和管理由深度神经网络和其他机器学习(ML)模型生成的大规模嵌入向量的数据库。 4 | 5 | ## 安装和设置 6 | 7 | 安装 Python SDK: 8 | 9 | ```bash 10 | pip install pymilvus 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | 存在一个围绕 `Milvus` 索引的包装器,允许您将其用作向量存储,无论是用于语义搜索还是示例选择。 16 | 17 | 要导入此向量存储: 18 | 19 | ```python 20 | from langchain_community.vectorstores import Milvus 21 | ``` 22 | 23 | 有关 `Milvus` 包装器的更详细说明,请参见[此笔记本](/docs/integrations/vectorstores/milvus)。 -------------------------------------------------------------------------------- /docs/integrations/providers/mindsdb.mdx: -------------------------------------------------------------------------------- 1 | # MindsDB 2 | 3 | MindsDB 是一款用于定制企业数据人工智能的平台。借助 MindsDB 及其近 200 种与[数据源](https://docs.mindsdb.com/integrations/data-overview)和[AI/ML 框架](https://docs.mindsdb.com/integrations/ai-overview)的集成,任何开发人员都可以利用其企业数据快速、安全地定制人工智能。 4 | 5 | 使用 MindsDB,您可以将任何数据源连接到任何 AI/ML 模型,以实现并自动化 AI 动力应用。部署、提供服务并实时微调模型,利用来自数据库、向量存储或应用程序的数据。所有这些都可以使用开发人员已经熟悉的通用工具来完成。 6 | 7 | MindsDB 与 LangChain 集成,使用户能够: 8 | 9 | - 在 MindsDB 中部署通过 LangChain 可用的模型,使其可以访问众多数据源。 10 | 11 | - 使用实时和动态数据在 MindsDB 中微调通过 LangChain 可用的模型。 12 | 13 | - 使用 LangChain 和 MindsDB 自动化 AI 工作流程。 14 | 15 | 请参阅[我们的文档](https://docs.mindsdb.com/integrations/ai-engines/langchain),了解 MindsDB 与 LangChain 的集成,并查看示例。 -------------------------------------------------------------------------------- /docs/integrations/providers/minimax.mdx: -------------------------------------------------------------------------------- 1 | # 极小化极大算法 2 | 3 | [极小化极大算法](https://api.minimax.chat) 是一家中国初创公司,为企业和个人提供自然语言处理模型。 4 | 5 | ## 安装和设置 6 | 7 | 获取一个[极小化极大 API 密钥](https://api.minimax.chat/user-center/basic-information/interface-key),并将其设置为环境变量 (`MINIMAX_API_KEY`)。 8 | 9 | 获取一个[极小化极大群组 ID](https://api.minimax.chat/user-center/basic-information),并将其设置为环境变量 (`MINIMAX_GROUP_ID`)。 10 | 11 | ## LLM 12 | 13 | 存在一个极小化极大 LLM 包装器,您可以通过以下方式访问 14 | 15 | 查看[使用示例](/docs/integrations/llms/minimax)。 16 | 17 | ```python 18 | from langchain_community.llms import Minimax 19 | ``` 20 | 21 | ## 聊天模型 22 | 23 | 查看[使用示例](/docs/integrations/chat/minimax)。 24 | 25 | ```python 26 | from langchain_community.chat_models import MiniMaxChat 27 | ``` 28 | 29 | ## 文本嵌入模型 30 | 31 | 存在一个极小化极大嵌入模型,您可以通过以下方式访问 32 | 33 | ```python 34 | from langchain_community.embeddings import MiniMaxEmbeddings 35 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/mistralai.mdx: -------------------------------------------------------------------------------- 1 | # MistralAI 2 | 3 | [Mistral AI](https://docs.mistral.ai/api/) 是一个提供强大开源模型托管服务的平台。 4 | 5 | ## 安装和设置 6 | 7 | 需要一个有效的 [API 密钥](https://console.mistral.ai/users/api-keys/) 来与 API 进行通信。 8 | 9 | 你还需要安装 `langchain-mistralai` 包: 10 | 11 | ```bash 12 | pip install langchain-mistralai 13 | ``` 14 | 15 | ## 聊天模型 16 | 17 | ### ChatMistralAI 18 | 19 | 查看 [使用示例](/docs/integrations/chat/mistralai)。 20 | 21 | ```python 22 | from langchain_mistralai.chat_models import ChatMistralAI 23 | ``` 24 | 25 | ## 嵌入模型 26 | 27 | ### MistralAIEmbeddings 28 | 29 | 查看 [使用示例](/docs/integrations/text_embedding/mistralai)。 30 | 31 | ```python 32 | from langchain_mistralai import MistralAIEmbeddings 33 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/modelscope.mdx: -------------------------------------------------------------------------------- 1 | # ModelScope 2 | 3 | >[ModelScope](https://www.modelscope.cn/home) 是一个包含模型和数据集的大型仓库。 4 | 5 | 本页面介绍如何在LangChain中使用ModelScope生态系统。它分为两个部分:安装和设置,以及对特定ModelScope包装器的引用。 6 | 7 | ## 安装和设置 8 | 9 | 安装`modelscope`包。 10 | 11 | ```bash 12 | pip install modelscope 13 | ``` 14 | 15 | ## 文本嵌入模型 16 | 17 | ```python 18 | from langchain_community.embeddings import ModelScopeEmbeddings 19 | ``` 20 | 21 | 有关更详细的步骤,请参阅[此笔记本](/docs/integrations/text_embedding/modelscope_hub)。 -------------------------------------------------------------------------------- /docs/integrations/providers/modern_treasury.mdx: -------------------------------------------------------------------------------- 1 | # 现代财务 2 | 3 | [现代财务](https://www.moderntreasury.com/)简化复杂的支付操作。它是一个统一的平台,用于支持移动资金的产品和流程。 4 | 5 | - 连接银行和支付系统 6 | 7 | - 实时跟踪交易和余额 8 | 9 | - 为规模化自动化支付操作 10 | 11 | ## 安装和设置 12 | 13 | 对此没有特殊的设置要求。 14 | 15 | ## 文档加载器 16 | 17 | 查看一个[使用示例](/docs/integrations/document_loaders/modern_treasury)。 18 | 19 | ```python 20 | from langchain_community.document_loaders import ModernTreasuryLoader 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/motorhead.mdx: -------------------------------------------------------------------------------- 1 | # Motörhead 2 | 3 | [Motörhead](https://github.com/getmetal/motorhead) 是一个用 Rust 实现的内存服务器。它可以自动在后台处理增量摘要,并允许无状态应用程序。 4 | 5 | ## 安装和设置 6 | 7 | 请参阅[Motörhead](https://github.com/getmetal/motorhead)上的说明,以在本地运行服务器。 8 | 9 | ## 内存 10 | 11 | 查看[使用示例](/docs/integrations/memory/motorhead_memory)。 12 | 13 | ```python 14 | from langchain.memory import MotorheadMemory 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/nlpcloud.mdx: -------------------------------------------------------------------------------- 1 | # NLPCloud 2 | 3 | [NLP Cloud](https://docs.nlpcloud.com/#introduction) 是一个人工智能平台,允许您使用最先进的AI引擎,甚至可以使用自己的数据训练自己的引擎。 4 | 5 | ## 安装和设置 6 | 7 | - 安装 `nlpcloud` 包。 8 | 9 | ```bash 10 | pip install nlpcloud 11 | ``` 12 | 13 | - 获取一个 NLPCloud API 密钥,并将其设置为环境变量 (`NLPCLOUD_API_KEY`) 14 | 15 | ## LLM 16 | 17 | 查看[使用示例](/docs/integrations/llms/nlpcloud)。 18 | 19 | ```python 20 | from langchain_community.llms import NLPCloud 21 | ``` 22 | 23 | ## 文本嵌入模型 24 | 25 | 查看[使用示例](/docs/integrations/text_embedding/nlp_cloud)。 26 | 27 | ```python 28 | from langchain_community.embeddings import NLPCloudEmbeddings 29 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/nomic.md: -------------------------------------------------------------------------------- 1 | # Nomic 2 | 3 | Nomic目前提供两种产品: 4 | 5 | - Atlas:他们的可视化数据引擎 6 | 7 | - GPT4All:他们的开源边缘语言模型生态系统 8 | 9 | Nomic集成存在于他们自己的[合作伙伴包](https://pypi.org/project/langchain-nomic/)中。您可以使用以下命令安装它: 10 | 11 | ```python 12 | %pip install -qU langchain-nomic 13 | ``` 14 | 15 | 目前,您可以按以下方式导入他们托管的[嵌入模型](/docs/integrations/text_embedding/nomic): 16 | 17 | ```python 18 | from langchain_nomic import NomicEmbeddings 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/notion.mdx: -------------------------------------------------------------------------------- 1 | # Notion 数据库 2 | 3 | [Notion](https://www.notion.so/) 是一个协作平台,支持修改过的 Markdown,并集成了看板、任务、维基和数据库。它是一个集合了笔记、知识和数据管理,以及项目和任务管理功能的多合一工作空间。 4 | 5 | ## 安装与设置 6 | 7 | 所有指令如下示例所示。 8 | 9 | ## 文档加载器 10 | 11 | 我们有两种不同的加载器:`NotionDirectoryLoader` 和 `NotionDBLoader`。 12 | 13 | 查看 [NotionDirectoryLoader 的使用示例](/docs/integrations/document_loaders/notion)。 14 | 15 | ```python 16 | from langchain_community.document_loaders import NotionDirectoryLoader 17 | ``` 18 | 19 | 查看 [NotionDBLoader 的使用示例](/docs/integrations/document_loaders/notiondb)。 20 | 21 | ```python 22 | from langchain_community.document_loaders import NotionDBLoader 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/obsidian.mdx: -------------------------------------------------------------------------------- 1 | # 墨菲石 2 | 3 | [墨菲石](https://obsidian.md/)是一个强大且可扩展的知识库,可在您的本地纯文本文件夹上运行。 4 | 5 | ## 安装与设置 6 | 7 | 所有的指令都在下面的示例中。 8 | 9 | ## 文档加载器 10 | 11 | 查看[使用示例](/docs/integrations/document_loaders/obsidian)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import ObsidianLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/ontotext_graphdb.mdx: -------------------------------------------------------------------------------- 1 | # Ontotext GraphDB 2 | 3 | [Ontotext GraphDB](https://graphdb.ontotext.com/) 是一个符合 RDF 和 SPARQL 标准的图数据库和知识发现工具。 4 | 5 | ## 依赖关系 6 | 7 | 使用以下命令安装 [rdflib](https://github.com/RDFLib/rdflib) 包: 8 | 9 | ```bash 10 | pip install rdflib==7.0.0 11 | ``` 12 | 13 | ## 图问答链 14 | 15 | 将您的 GraphDB 数据库与聊天模型连接,以获取有关您的数据的见解。 16 | 17 | 查看笔记本示例[此处](/docs/integrations/graphs/ontotext)。 18 | 19 | ```python 20 | from langchain_community.graphs import OntotextGraphDBGraph 21 | from langchain.chains import OntotextGraphDBQAChain 22 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/opensearch.mdx: -------------------------------------------------------------------------------- 1 | # OpenSearch 2 | 3 | 本页面介绍如何在 LangChain 中使用 OpenSearch 生态系统。 4 | 5 | 内容分为两部分:安装和设置,以及特定 OpenSearch 包装器的参考。 6 | 7 | ## 安装和设置 8 | 9 | - 使用 `pip install opensearch-py` 安装 Python 包。 10 | 11 | ## 包装器 12 | 13 | ### VectorStore 14 | 15 | 存在一个围绕 OpenSearch 向量数据库的包装器,允许您将其用作向量存储库,用于使用由 lucene、nmslib 和 faiss 引擎提供支持的近似向量搜索,或者使用 painless 脚本和脚本评分函数进行暴力向量搜索。 16 | 17 | 要导入此向量存储库: 18 | 19 | ```python 20 | from langchain_community.vectorstores import OpenSearchVectorSearch 21 | ``` 22 | 23 | 有关 OpenSearch 包装器的更详细说明,请参阅[此笔记本](/docs/integrations/vectorstores/opensearch)。 -------------------------------------------------------------------------------- /docs/integrations/providers/outline.mdx: -------------------------------------------------------------------------------- 1 | # 大纲 2 | 3 | > [大纲](https://www.getoutline.com/) 是一个开源的协作知识库平台,旨在为团队信息共享提供支持。 4 | 5 | ## 设置 6 | 7 | 首先,您需要为您的大纲实例[创建一个 API 密钥](https://www.getoutline.com/developers#section/Authentication)。然后,您需要设置以下环境变量: 8 | 9 | ```python 10 | import os 11 | os.environ["OUTLINE_API_KEY"] = "xxx" 12 | os.environ["OUTLINE_INSTANCE_URL"] = "https://app.getoutline.com" 13 | ``` 14 | 15 | ## 检索器 16 | 17 | 查看[使用示例](/docs/integrations/retrievers/outline)。 18 | 19 | ```python 20 | from langchain.retrievers import OutlineRetriever 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/petals.mdx: -------------------------------------------------------------------------------- 1 | # Petals 2 | 3 | 本页面介绍了如何在LangChain中使用Petals生态系统。 4 | 5 | 它分为两个部分:安装和设置,以及对特定Petals包装器的引用。 6 | 7 | ## 安装和设置 8 | 9 | - 使用`pip install petals`进行安装 10 | 11 | - 获取一个Hugging Face api密钥,并将其设置为环境变量(`HUGGINGFACE_API_KEY`) 12 | 13 | ## 包装器 14 | 15 | ### LLM 16 | 17 | 存在一个Petals LLM包装器,您可以使用以下代码访问: 18 | 19 | ```python 20 | from langchain_community.llms import Petals 21 | ``` 22 | 23 | [20] -------------------------------------------------------------------------------- /docs/integrations/providers/pg_embedding.mdx: -------------------------------------------------------------------------------- 1 | # Postgres 嵌入 2 | 3 | > [pg_embedding](https://github.com/neondatabase/pg_embedding) 是一个开源软件包,用于使用 `Postgres` 和 `Hierarchical Navigable Small Worlds` 算法进行近似最近邻搜索。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要安装几个 Python 软件包。 8 | 9 | ```bash 10 | pip install psycopg2-binary 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | 查看[使用示例](/docs/integrations/vectorstores/pgembedding)。 16 | 17 | ```python 18 | from langchain_community.vectorstores import PGEmbedding 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/pgvector.mdx: -------------------------------------------------------------------------------- 1 | # PGVector 2 | 3 | 本页面介绍如何在 LangChain 中使用 Postgres 的 [PGVector](https://github.com/pgvector/pgvector) 生态系统。 4 | 5 | 内容分为两部分:安装和设置,以及特定 PGVector 包装器的参考。 6 | 7 | ## 安装 8 | 9 | - 使用 `pip install pgvector` 安装 Python 包 10 | 11 | ## 设置 12 | 13 | 1. 第一步是创建一个带有安装了 `pgvector` 扩展的数据库。 14 | 15 | 按照 [PGVector 安装步骤](https://github.com/pgvector/pgvector#installation) 中的步骤来安装数据库和扩展。使用 Docker 镜像是最简单的入门方式。 16 | 17 | ## 包装器 18 | 19 | ### VectorStore 20 | 21 | 存在一个围绕 Postgres 向量数据库的包装器,允许您将其用作向量存储,无论是用于语义搜索还是示例选择。 22 | 23 | 要导入此向量存储: 24 | 25 | ```python 26 | from langchain_community.vectorstores.pgvector import PGVector 27 | ``` 28 | 29 | ### 用法 30 | 31 | 要获取有关 PGVector 包装器的更详细演示,请参阅[此笔记本](/docs/integrations/vectorstores/pgvector)。 -------------------------------------------------------------------------------- /docs/integrations/providers/pinecone.mdx: -------------------------------------------------------------------------------- 1 | # Pinecone 2 | 3 | [Pinecone](https://docs.pinecone.io/docs/overview) 是一个功能广泛的向量数据库。 4 | 5 | ## 安装和设置 6 | 7 | 安装 Python SDK: 8 | 9 | ```bash 10 | pip install langchain-pinecone 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | 存在一个围绕 Pinecone 索引的包装器,允许您将其用作向量存储,无论是用于语义搜索还是示例选择。 16 | 17 | ```python 18 | from langchain_pinecone import PineconeVectorStore 19 | ``` 20 | 21 | 有关 Pinecone 向量存储的更详细说明,请参见[此笔记本](/docs/integrations/vectorstores/pinecone)。 22 | 23 | ## 检索器 24 | 25 | ### Pinecone 混合搜索 26 | 27 | ```bash 28 | pip install pinecone-client pinecone-text 29 | ``` 30 | 31 | ```python 32 | from langchain_community.retrievers import ( 33 | PineconeHybridSearchRetriever, 34 | ) 35 | ``` 36 | 37 | 有关更详细的信息,请参见[此笔记本](/docs/integrations/retrievers/pinecone_hybrid_search)。 38 | 39 | ### 自查询检索器 40 | 41 | Pinecone 向量存储可以用作自查询的检索器。 42 | 43 | 有关更详细的信息,请参见[此笔记本](/docs/integrations/retrievers/self_query/pinecone)。 -------------------------------------------------------------------------------- /docs/integrations/providers/pipelineai.mdx: -------------------------------------------------------------------------------- 1 | # PipelineAI 2 | 3 | 本页面介绍如何在 LangChain 中使用 PipelineAI 生态系统。 4 | 5 | 分为两个部分:安装和设置,以及特定 PipelineAI 包装器的参考。 6 | 7 | ## 安装和设置 8 | 9 | - 使用 `pip install pipeline-ai` 进行安装 10 | 11 | - 获取 Pipeline Cloud 的 API 密钥,并将其设置为环境变量 (`PIPELINE_API_KEY`) 12 | 13 | ## 包装器 14 | 15 | ### LLM 16 | 17 | 存在一个 PipelineAI LLM 包装器,您可以通过以下方式访问: 18 | 19 | ```python 20 | from langchain_community.llms import PipelineAI 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/psychic.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_class_name: hidden 4 | 5 | --- 6 | 7 | # 心灵 8 | 9 | :::warning 10 | 11 | 该服务商已不再维护,并可能无法正常工作。请谨慎使用。 12 | 13 | ::: 14 | 15 | >[心灵](https://www.psychic.dev/)是一个用于与`Notion`、`Zendesk`、`Confluence`和`Google Drive`等`SaaS`工具集成的平台,通过OAuth将这些应用程序的文档同步到您的SQL或向量数据库。您可以将其视为非结构化数据的Plaid。 16 | 17 | ## 安装和设置 18 | 19 | ```bash 20 | pip install psychicapi 21 | ``` 22 | 23 | 心灵易于设置 - 您导入`react`库并使用从[心灵仪表板](https://dashboard.psychic.dev/)获取的`Sidekick API`密钥进行配置。连接应用程序后,您可以从仪表板查看这些连接,并使用服务器端库检索数据。 24 | 25 | 1. 在[仪表板](https://dashboard.psychic.dev/)中创建一个帐户。 26 | 27 | 2. 使用[react库](https://docs.psychic.dev/sidekick-link)将心灵链接模态框添加到您的前端react应用程序。您将使用此功能连接`SaaS`应用程序。 28 | 29 | 3. 创建连接后,您可以通过查看[示例笔记本](/docs/integrations/document_loaders/psychic)来使用`PsychicLoader`。 30 | 31 | ## 与其他文档加载器的优势 32 | 33 | 1. **通用API:** 您无需为每个`SaaS`应用构建OAuth流程或学习其API,只需集成一次心灵,并利用我们的通用API来检索数据。 34 | 35 | 2. **数据同步:** 您客户的`SaaS`应用中的数据可能会变得过时。使用心灵,您可以配置Webhook以使您的文档每天或实时保持最新。 36 | 37 | 3. **简化的OAuth:** 心灵端到端处理OAuth,因此您无需花时间为每个集成创建OAuth客户端、保持访问令牌的新鲜度和处理OAuth重定向逻辑。 -------------------------------------------------------------------------------- /docs/integrations/providers/pubmed.md: -------------------------------------------------------------------------------- 1 | # PubMed 2 | 3 | >[PubMed®](https://pubmed.ncbi.nlm.nih.gov/)由`国家生物技术信息中心,国家医学图书馆`提供,包括来自`MEDLINE`、生命科学期刊和在线图书的超过3500万条生物医学文献引用。引用可能包括指向`PubMed Central`和出版商网站的全文内容的链接。 4 | 5 | ## 设置 6 | 7 | 您需要安装一个Python包。 8 | 9 | ```bash 10 | pip install xmltodict 11 | ``` 12 | 13 | ### 检索器 14 | 15 | 查看[使用示例](/docs/integrations/retrievers/pubmed)。 16 | 17 | ```python 18 | from langchain.retrievers import PubMedRetriever 19 | ``` 20 | 21 | ### 文档加载器 22 | 23 | 查看[使用示例](/docs/integrations/document_loaders/pubmed)。 24 | 25 | ```python 26 | from langchain_community.document_loaders import PubMedLoader 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/pygmalionai.mdx: -------------------------------------------------------------------------------- 1 | # PygmalionAI 2 | 3 | [PygmalionAI](https://pygmalion.chat/) 是一家支持开源模型的公司,通过为[Aphrodite Engine](https://github.com/PygmalionAI/aphrodite-engine)提供推理端点来支持开源模型。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install aphrodite-engine 9 | ``` 10 | 11 | ## LLMs 12 | 13 | 查看[使用示例](/docs/integrations/llms/aphrodite)。 14 | 15 | ```python 16 | from langchain_community.llms import Aphrodite 17 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/qdrant.mdx: -------------------------------------------------------------------------------- 1 | # Qdrant 2 | 3 | >[Qdrant](https://qdrant.tech/documentation/)(读作:quadrant)是一个向量相似性搜索引擎。 4 | 5 | > 它提供了一个可用于存储、搜索和管理点(带有附加有效载荷的向量)的生产就绪服务和方便的 API。`Qdrant`专为扩展过滤支持而设计。 6 | 7 | ## 安装和设置 8 | 9 | 安装 Python 合作伙伴包: 10 | 11 | ```bash 12 | pip install langchain-qdrant 13 | ``` 14 | 15 | ## 向量存储 16 | 17 | 存在一个围绕`Qdrant`索引的包装器,允许您将其用作向量存储,无论是用于语义搜索还是示例选择。 18 | 19 | 要导入此向量存储: 20 | 21 | ```python 22 | from langchain_qdrant import Qdrant 23 | ``` 24 | 25 | 有关 Qdrant 包装器的更详细说明,请参见[此笔记本](/docs/integrations/vectorstores/qdrant)。 -------------------------------------------------------------------------------- /docs/integrations/providers/reddit.mdx: -------------------------------------------------------------------------------- 1 | # Reddit 2 | 3 | [Reddit](https://www.reddit.com) 是一家美国社交新闻聚合、内容评级和讨论网站。 4 | 5 | ## 安装和设置 6 | 7 | 首先,您需要安装一个 Python 包。 8 | 9 | ```bash 10 | pip install praw 11 | ``` 12 | 13 | 创建一个[Reddit应用](https://www.reddit.com/prefs/apps/),并使用您的Reddit API凭据初始化加载器。 14 | 15 | ## 文档加载器 16 | 17 | 查看一个[使用示例](/docs/integrations/document_loaders/reddit)。 18 | 19 | ```python 20 | from langchain_community.document_loaders import RedditPostsLoader 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/remembrall.mdx: -------------------------------------------------------------------------------- 1 | # 记忆水晶 2 | 3 | [记忆水晶](https://remembrall.dev/) 是一个平台,为语言模型提供长期记忆、检索增强生成和完全可观察性。 4 | 5 | ## 安装和设置 6 | 7 | 要开始使用,可以在[记忆水晶平台](https://remembrall.dev/login)上使用 Github 帐号登录,并从[设置页面](https://remembrall.dev/dashboard/settings)复制你的 API 密钥。 8 | 9 | ## 记忆 10 | 11 | 查看一个[使用示例](/docs/integrations/memory/remembrall)。 -------------------------------------------------------------------------------- /docs/integrations/providers/roam.mdx: -------------------------------------------------------------------------------- 1 | # Roam 2 | 3 | >[ROAM](https://roamresearch.com/) 是一个用于网络思维的笔记工具,旨在创建个人知识库。 4 | 5 | ## 安装和设置 6 | 7 | 对于它并没有特别的设置要求。 8 | 9 | ## 文档加载器 10 | 11 | 查看一个[使用示例](/docs/integrations/document_loaders/roam)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import RoamLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/robocorp.mdx: -------------------------------------------------------------------------------- 1 | # Robocorp 2 | 3 | [Robocorp](https://robocorp.com/) 是一个帮助构建和运行 Python 工作程序的平台,可以在任何规模的环境中无缝运行。 4 | 5 | ## 安装和设置 6 | 7 | 你需要安装 `langchain-robocorp` Python 包: 8 | 9 | ```bash 10 | pip install langchain-robocorp 11 | ``` 12 | 13 | 你需要运行一个 Action 服务器实例,以便从你的代理应用程序进行通信。请参阅 [Robocorp Quickstart](https://github.com/robocorp/robocorp#quickstart) 了解如何设置 Action 服务器并创建你的 Actions。 14 | 15 | 你可以使用 Action 服务器的 `new` 命令来启动一个新项目。 16 | 17 | ```bash 18 | action-server new 19 | cd ./your-project-name 20 | action-server start 21 | ``` 22 | 23 | ## 工具包 24 | 25 | 查看 [使用示例](/docs/integrations/toolkits/robocorp)。 26 | 27 | ```python 28 | from langchain_robocorp import ActionServerToolkit 29 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/rockset.mdx: -------------------------------------------------------------------------------- 1 | # Rockset 2 | 3 | [Rockset](https://rockset.com/product/) 是一个实时分析数据库服务,用于提供低延迟、高并发的大规模分析查询。它在结构化和半结构化数据上构建了一个 Converged Index™,并配备了一个高效的存储向量嵌入。它支持在无模式数据上运行 SQL,使其成为运行带有元数据过滤的向量搜索的理想选择。 4 | 5 | ## 安装和设置 6 | 7 | 确保您拥有 Rockset 账户,并转到 Web 控制台获取 API 密钥。详细信息可以在[网站](https://rockset.com/docs/rest-api/)上找到。 8 | 9 | ```bash 10 | pip install rockset 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | 查看[使用示例](/docs/integrations/vectorstores/rockset)。 16 | 17 | ```python 18 | from langchain_community.vectorstores import Rockset 19 | ``` 20 | 21 | ## 文档加载器 22 | 23 | 查看[使用示例](/docs/integrations/document_loaders/rockset)。 24 | 25 | ```python 26 | from langchain_community.document_loaders import RocksetLoader 27 | ``` 28 | 29 | ## 聊天消息历史 30 | 31 | 查看[使用示例](/docs/integrations/memory/rockset_chat_message_history)。 32 | 33 | ```python 34 | from langchain_community.chat_message_histories import RocksetChatMessageHistory 35 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/runhouse.mdx: -------------------------------------------------------------------------------- 1 | # Runhouse 2 | 3 | 本页面介绍如何在 LangChain 中使用 [Runhouse](https://github.com/run-house/runhouse) 生态系统。 4 | 5 | 内容分为三个部分:安装和设置、LLMs 和嵌入。 6 | 7 | ## 安装和设置 8 | 9 | - 使用 `pip install runhouse` 安装 Python SDK 10 | 11 | - 如果您想使用按需集群,请使用 `sky check` 检查您的云凭据 12 | 13 | ## 自托管的LLMs 14 | 15 | 对于基本的自托管LLM,您可以使用 `SelfHostedHuggingFaceLLM` 类。对于更自定义的LLMs,您可以使用 `SelfHostedPipeline` 父类。 16 | 17 | ```python 18 | from langchain_community.llms import SelfHostedPipeline, SelfHostedHuggingFaceLLM 19 | ``` 20 | 21 | 有关自托管LLMs的更详细的操作说明,请参见[此笔记本](/docs/integrations/llms/runhouse) 22 | 23 | ## 自托管的嵌入 24 | 25 | 有几种方法可以通过 Runhouse 在 LangChain 中使用自托管的嵌入。 26 | 27 | 对于来自 Hugging Face Transformers 模型的基本自托管嵌入,您可以使用 `SelfHostedEmbedding` 类。 28 | 29 | ```python 30 | from langchain_community.llms import SelfHostedPipeline, SelfHostedHuggingFaceLLM 31 | ``` 32 | 33 | 有关自托管嵌入的更详细的操作说明,请参见[此笔记本](/docs/integrations/text_embedding/self-hosted) -------------------------------------------------------------------------------- /docs/integrations/providers/salute_devices.mdx: -------------------------------------------------------------------------------- 1 | # Salute Devices 2 | 3 | Salute Devices 提供 GigaChat LLM 的模型。 4 | 5 | 要了解如何访问 GigaChat 的更多信息,请点击[这里](https://developers.sber.ru/docs/ru/gigachat/api/integration)。 6 | 7 | ## 安装和设置 8 | 9 | 可以通过 PyPI 中的 pip 安装 GigaChat 包: 10 | 11 | ```bash 12 | pip install gigachat 13 | ``` 14 | 15 | ## LLMs 16 | 17 | 查看[使用示例](/docs/integrations/llms/gigachat)。 18 | 19 | ```python 20 | from langchain_community.llms import GigaChat 21 | ``` 22 | 23 | ## 聊天模型 24 | 25 | 查看[使用示例](/docs/integrations/chat/gigachat)。 26 | 27 | ```python 28 | from langchain_community.chat_models import GigaChat 29 | ``` 30 | 31 | ## 嵌入 32 | 33 | 查看[使用示例](/docs/integrations/text_embedding/gigachat)。 34 | 35 | ```python 36 | from langchain_community.embeddings import GigaChatEmbeddings 37 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/semadb.mdx: -------------------------------------------------------------------------------- 1 | # SemaDB 2 | 3 | [SemaDB](https://semafind.com/) 是一个简单易用的向量相似度搜索引擎。它提供了低成本的云托管版本,帮助您轻松构建人工智能应用程序。 4 | 5 | 通过 SemaDB 云端版本,无需进行 pod 大小计算,无需模式定义,无需分区设置,无需参数调整,无需搜索算法调整,无需复杂的安装,无需复杂的 API。它集成了 [RapidAPI](https://rapidapi.com/semafind-semadb/api/semadb),提供透明的计费、自动分片和交互式 API 沙盒。 6 | 7 | ## 安装 8 | 9 | 无需安装,直接在 [RapidAPI](https://rapidapi.com/semafind-semadb/api/semadb) 上开始使用 SemaDB 云端版本。 10 | 11 | ## 向量存储 12 | 13 | 有一个围绕 `SemaDB` 集合的基本包装器,允许您将其用作向量存储。 14 | 15 | ```python 16 | from langchain_community.vectorstores import SemaDB 17 | ``` 18 | 19 | 您可以在 [这个笔记本](/docs/integrations/vectorstores/semadb) 中找到如何使用这个包装器的教程。 -------------------------------------------------------------------------------- /docs/integrations/providers/serpapi.mdx: -------------------------------------------------------------------------------- 1 | # SerpAPI 2 | 3 | 本页面介绍如何在 LangChain 中使用 SerpAPI 搜索 API。内容分为两部分:安装和设置,以及特定 SerpAPI 包装器的参考信息。 4 | 5 | ## 安装和设置 6 | 7 | - 使用 `pip install google-search-results` 安装所需的依赖项 8 | 9 | - 获取 SerpAPI API 密钥,并将其设置为环境变量 (`SERPAPI_API_KEY`) 10 | 11 | ## 包装器 12 | 13 | ### 实用工具 14 | 15 | 存在一个包装了该 API 的 SerpAPI 实用工具。要导入此实用工具: 16 | 17 | ```python 18 | from langchain_community.utilities import SerpAPIWrapper 19 | ``` 20 | 21 | 有关此包装器的更详细的步骤,请参阅[此笔记本](/docs/integrations/tools/serpapi)。 22 | 23 | ### 工具 24 | 25 | 您还可以将此包装器轻松加载为工具(用于与代理一起使用)。您可以这样做: 26 | 27 | ```python 28 | from langchain.agents import load_tools 29 | tools = load_tools(["serpapi"]) 30 | ``` 31 | 32 | 有关此内容的更多信息,请参阅[此页面](/docs/how_to/tools_builtin)。 -------------------------------------------------------------------------------- /docs/integrations/providers/sklearn.mdx: -------------------------------------------------------------------------------- 1 | # scikit-learn 2 | 3 | [scikit-learn](https://scikit-learn.org/stable/) 是一个开源的机器学习算法集合,其中包括一些 [k 最近邻](https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.NearestNeighbors.html) 的实现。`SKLearnVectorStore` 封装了这个实现,并添加了将向量存储为 json、bson(二进制 json)或 Apache Parquet 格式的功能。 4 | 5 | ## 安装和设置 6 | 7 | - 使用 `pip install scikit-learn` 安装 Python 包 8 | 9 | ## 向量存储 10 | 11 | `SKLearnVectorStore` 提供了一个简单的包装器,围绕 scikit-learn 包中的最近邻实现,使您可以将其用作向量存储。 12 | 13 | 要导入这个向量存储: 14 | 15 | ```python 16 | from langchain_community.vectorstores import SKLearnVectorStore 17 | ``` 18 | 19 | 要了解有关 SKLearnVectorStore 包装器的更详细步骤,请参阅[此笔记本](/docs/integrations/vectorstores/sklearn)。 -------------------------------------------------------------------------------- /docs/integrations/providers/slack.mdx: -------------------------------------------------------------------------------- 1 | # Slack 2 | 3 | [Slack](https://slack.com/) 是一款即时通讯程序。 4 | 5 | ## 安装和设置 6 | 7 | 对于它并没有特别的设置要求。 8 | 9 | ## 文档加载器 10 | 11 | 查看一个[使用示例](/docs/integrations/document_loaders/slack)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import SlackDirectoryLoader 15 | ``` 16 | 17 | ## 聊天加载器 18 | 19 | 查看一个[使用示例](/docs/integrations/chat_loaders/slack)。 20 | 21 | ```python 22 | from langchain_community.chat_loaders.slack import SlackChatLoader 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/snowflake.mdx: -------------------------------------------------------------------------------- 1 | # Snowflake 2 | 3 | > [Snowflake](https://www.snowflake.com/) 是一个基于云的数据仓库平台,允许您存储和查询大量数据。 4 | 5 | 本页面介绍如何在 `LangChain` 中使用 `Snowflake` 生态系统。 6 | 7 | ## 嵌入模型 8 | 9 | Snowflake 提供了他们的开放权重 `arctic` 系列嵌入模型,可在 [Hugging Face](https://huggingface.co/Snowflake/snowflake-arctic-embed-l) 上免费使用。您可以通过 [HuggingFaceEmbeddings](/docs/integrations/text_embedding/huggingfacehub) 连接器使用这些模型: 10 | 11 | ```shell 12 | pip install langchain-community sentence-transformers 13 | ``` 14 | 15 | ```python 16 | from langchain_huggingface import HuggingFaceEmbeddings 17 | model = HuggingFaceEmbeddings(model_name="snowflake/arctic-embed-l") 18 | ``` 19 | 20 | ## 文档加载器 21 | 22 | 您可以使用 [`SnowflakeLoader`](/docs/integrations/document_loaders/snowflake) 从 Snowflake 加载数据: 23 | 24 | ```python 25 | from langchain_community.document_loaders import SnowflakeLoader 26 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/spacy.mdx: -------------------------------------------------------------------------------- 1 | # spaCy 2 | 3 | [spaCy](https://spacy.io/) 是一个用于高级自然语言处理的开源软件库,使用 Python 和 Cython 编程语言编写。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install spacy 9 | ``` 10 | 11 | ## 文本分割器 12 | 13 | 查看[使用示例](/docs/how_to/split_by_token/#spacy)。 14 | 15 | ```python 16 | from langchain_text_splitters import SpacyTextSplitter 17 | ``` 18 | 19 | ## 文本嵌入模型 20 | 21 | 查看[使用示例](/docs/integrations/text_embedding/spacy_embedding)。 22 | 23 | ```python 24 | from langchain_community.embeddings.spacy_embeddings import SpacyEmbeddings 25 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/sparkllm.mdx: -------------------------------------------------------------------------------- 1 | # SparkLLM 2 | 3 | [SparkLLM](https://xinghuo.xfyun.cn/spark) 是讯飞自主开发的大规模认知模型。它通过学习大量的文本、代码和图片,具备跨领域知识和语言理解能力,能够基于自然对话理解并执行任务。 4 | 5 | ## SparkLLM LLM 模型 6 | 7 | 可在 [示例](/docs/integrations/llms/sparkllm) 中找到示例。 8 | 9 | ## SparkLLM 对话模型 10 | 11 | 可在 [示例](/docs/integrations/chat/sparkllm) 中找到示例。 12 | 13 | ## SparkLLM 文本嵌入模型 14 | 15 | 可在 [示例](/docs/integrations/text_embedding/sparkllm) 中找到示例。 -------------------------------------------------------------------------------- /docs/integrations/providers/spreedly.mdx: -------------------------------------------------------------------------------- 1 | # Spreedly 2 | 3 | [Spreedly](https://docs.spreedly.com/) 是一项服务,允许您安全地存储信用卡并将其用于与任意数量的支付网关和第三方 API 进行交易。它通过同时提供卡片令牌化/保险库服务以及网关和接收器集成服务来实现此功能。由 Spreedly 令牌化的支付方式存储在 `Spreedly` 上,允许您独立存储一张卡,并根据业务需求将该卡传递给不同的终端。 4 | 5 | ## 安装和设置 6 | 7 | 请参阅[设置说明](/docs/integrations/document_loaders/spreedly)。 8 | 9 | ## 文档加载器 10 | 11 | 请参阅[使用示例](/docs/integrations/document_loaders/spreedly)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import SpreedlyLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/sqlite.mdx: -------------------------------------------------------------------------------- 1 | # SQLite 2 | 3 | [SQLite](https://en.wikipedia.org/wiki/SQLite) 是用 C 语言编写的数据库引擎。它不是一个独立的应用程序,而是一个软件开发人员嵌入其应用程序中的库。因此,它属于嵌入式数据库家族。作为最广泛部署的数据库引擎,它被多个顶级网络浏览器、操作系统、手机和其他嵌入式系统使用。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要安装 `SQLAlchemy` Python 包。 8 | 9 | ```bash 10 | pip install SQLAlchemy 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | 查看[使用示例](/docs/integrations/vectorstores/sqlitevss)。 16 | 17 | ```python 18 | from langchain_community.vectorstores import SQLiteVSS 19 | ``` 20 | 21 | ## 内存 22 | 23 | 查看[使用示例](/docs/integrations/memory/sqlite)。 24 | 25 | ```python 26 | from langchain_community.chat_message_histories import SQLChatMessageHistory 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/stackexchange.mdx: -------------------------------------------------------------------------------- 1 | # Stack Exchange 2 | 3 | >[Stack Exchange](https://en.wikipedia.org/wiki/Stack_Exchange) 是一个涵盖多个领域话题的问答网站网络,每个网站涵盖一个特定主题,用户可以在这里进行提问、回答问题,并且会根据声誉奖励机制进行评定。 4 | 5 | 本页面介绍如何在 LangChain 中使用 `Stack Exchange API`。 6 | 7 | ## 安装和设置 8 | 9 | - 使用以下命令安装所需的库: 10 | 11 | ```bash 12 | pip install stackapi 13 | ``` 14 | 15 | ## 封装器 16 | 17 | ### 实用工具 18 | 19 | 存在一个名为 StackExchangeAPIWrapper 的实用工具,用于封装该 API。要导入此实用工具: 20 | 21 | ```python 22 | from langchain_community.utilities import StackExchangeAPIWrapper 23 | ``` 24 | 25 | 有关此封装器的更详细说明,请参阅[此笔记本](/docs/integrations/tools/stackexchange)。 26 | 27 | ### 工具 28 | 29 | 您还可以将此封装器轻松加载为工具(用于与代理一起使用)。 30 | 31 | 您可以使用以下代码实现: 32 | 33 | ```python 34 | from langchain.agents import load_tools 35 | tools = load_tools(["stackexchange"]) 36 | ``` 37 | 38 | 有关工具的更多信息,请参阅[此页面](/docs/how_to/tools_builtin)。 -------------------------------------------------------------------------------- /docs/integrations/providers/starrocks.mdx: -------------------------------------------------------------------------------- 1 | # StarRocks 2 | 3 | [StarRocks](https://www.starrocks.io/) 是一款高性能的分析型数据库。 4 | 5 | `StarRocks` 是一款下一代的亚秒级 MPP 数据库,适用于全面的分析场景,包括多维分析、实时分析和即席查询。 6 | 7 | 通常情况下,`StarRocks` 被归类为 OLAP,它在 [ClickBench — 用于分析型数据库管理系统的基准测试](https://benchmark.clickhouse.com/) 中展现出了出色的性能。由于它拥有超快的矢量化执行引擎,它也可以被用作快速的矢量数据库。 8 | 9 | ## 安装和设置 10 | 11 | ```bash 12 | pip install pymysql 13 | ``` 14 | 15 | ## 矢量存储 16 | 17 | 查看 [使用示例](/docs/integrations/vectorstores/starrocks)。 18 | 19 | ```python 20 | from langchain_community.vectorstores import StarRocks 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/stochasticai.mdx: -------------------------------------------------------------------------------- 1 | # 随机AI 2 | 3 | 本页面介绍如何在 LangChain 中使用随机AI生态系统。 4 | 5 | 分为两部分:安装和设置,以及特定随机AI包装器的参考。 6 | 7 | ## 安装和设置 8 | 9 | - 使用 `pip install stochasticx` 进行安装 10 | 11 | - 获取一个随机AI API密钥,并将其设置为环境变量 (`STOCHASTICAI_API_KEY`) 12 | 13 | ## 包装器 14 | 15 | ### LLM 16 | 17 | 存在一个随机AI LLM包装器,您可以使用以下代码访问: 18 | 19 | ```python 20 | from langchain_community.llms import StochasticAI 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/streamlit.mdx: -------------------------------------------------------------------------------- 1 | # Streamlit 2 | 3 | [Streamlit](https://streamlit.io/) 是一种更快速的构建和分享数据应用程序的方式。 4 | 5 | `Streamlit` 可以在几分钟内将数据脚本转换为可共享的 Web 应用程序。而且全部使用纯 Python 编写,无需前端经验。 6 | 7 | 在 [streamlit.io/generative-ai](https://streamlit.io/generative-ai) 上可以查看更多示例。 8 | 9 | ## 安装和设置 10 | 11 | 我们需要安装 `streamlit` Python 包: 12 | 13 | ```bash 14 | pip install streamlit 15 | ``` 16 | 17 | ## 内存 18 | 19 | 查看 [使用示例](/docs/integrations/memory/streamlit_chat_message_history)。 20 | 21 | ```python 22 | from langchain_community.chat_message_histories import StreamlitChatMessageHistory 23 | ``` 24 | 25 | ## 回调 26 | 27 | 查看 [使用示例](/docs/integrations/callbacks/streamlit)。 28 | 29 | ```python 30 | from langchain_community.callbacks import StreamlitCallbackHandler 31 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/stripe.mdx: -------------------------------------------------------------------------------- 1 | # Stripe 2 | 3 | [Stripe](https://stripe.com/en-ca) 是一家爱尔兰-美国的金融服务和软件即服务(SaaS)公司。它提供支付处理软件和应用程序编程接口,用于电子商务网站和移动应用程序。 4 | 5 | ## 安装和设置 6 | 7 | 请参阅[设置说明](/docs/integrations/document_loaders/stripe)。 8 | 9 | ## 文档加载器 10 | 11 | 请参阅[使用示例](/docs/integrations/document_loaders/stripe)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import StripeLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/supabase.mdx: -------------------------------------------------------------------------------- 1 | # Supabase(Postgres) 2 | 3 | >[Supabase](https://supabase.com/docs) 是一个开源的 `Firebase` 替代品。 4 | 5 | > `Supabase` 是建立在 `PostgreSQL` 之上的,它提供了强大的 `SQL` 查询功能,并能与已有的工具和框架简单地进行交互。 6 | 7 | >[PostgreSQL](https://en.wikipedia.org/wiki/PostgreSQL) 也被称为 `Postgres`, 8 | 9 | > 是一个强调可扩展性和 `SQL` 兼容性的免费开源关系数据库管理系统(RDBMS)。 10 | 11 | ## 安装和设置 12 | 13 | 我们需要安装 `supabase` Python 包。 14 | 15 | ```bash 16 | pip install supabase 17 | ``` 18 | 19 | ## 向量存储 20 | 21 | 请参阅[使用示例](/docs/integrations/vectorstores/supabase)。 22 | 23 | ```python 24 | from langchain_community.vectorstores import SupabaseVectorStore 25 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/symblai_nebula.mdx: -------------------------------------------------------------------------------- 1 | # 星云 2 | 3 | 本页面介绍了如何在 LangChain 中使用 [星云](https://symbl.ai/nebula),即 [Symbl.ai](https://symbl.ai/) 的LLM生态系统。 4 | 5 | 内容分为两个部分:安装和设置,以及特定星云包装器的引用。 6 | 7 | ## 安装和设置 8 | 9 | - 获取一个 [星云 API 密钥](https://info.symbl.ai/Nebula_Private_Beta.html),并将其设置为环境变量 `NEBULA_API_KEY` 10 | 11 | - 请查看 [星云文档](https://docs.symbl.ai/docs/nebula-llm) 以获取更多详细信息。 12 | 13 | ### LLM 14 | 15 | 存在一个星云LLM包装器,您可以通过以下方式访问: 16 | 17 | ```python 18 | from langchain_community.llms import Nebula 19 | llm = Nebula() 20 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/tair.mdx: -------------------------------------------------------------------------------- 1 | # Tair 2 | 3 | [阿里云 Tair](https://www.alibabacloud.com/help/en/tair/latest/what-is-tair) 是由阿里云开发的云原生内存数据库服务。它提供丰富的数据模型和企业级能力,以支持您的实时在线场景,同时完全兼容开源的 `Redis`。`Tair` 还引入了基于新型非易失性内存(NVM)存储介质的持久内存优化实例。 4 | 5 | ## 安装和设置 6 | 7 | 安装 Tair Python SDK: 8 | 9 | ```bash 10 | pip install tair 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | ```python 16 | from langchain_community.vectorstores import Tair 17 | ``` 18 | 19 | 查看[使用示例](/docs/integrations/vectorstores/tair)。 -------------------------------------------------------------------------------- /docs/integrations/providers/telegram.mdx: -------------------------------------------------------------------------------- 1 | # 电报 2 | 3 | [Telegram Messenger](https://web.telegram.org/a/) 是一款全球可访问的免费即时通讯服务,支持跨平台、加密、基于云的集中式架构。该应用还提供可选的端到端加密聊天和视频通话、VoIP、文件共享以及其他几项功能。 4 | 5 | ## 安装和设置 6 | 7 | 请参阅[设置说明](/docs/integrations/document_loaders/telegram)。 8 | 9 | ## 文档加载器 10 | 11 | 请查看[使用示例](/docs/integrations/document_loaders/telegram)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import TelegramChatFileLoader 15 | from langchain_community.document_loaders import TelegramChatApiLoader 16 | ``` 17 | 18 | ## 聊天加载器 19 | 20 | 请查看[使用示例](/docs/integrations/chat_loaders/telegram)。 21 | 22 | ```python 23 | from langchain_community.chat_loaders.telegram import TelegramChatLoader 24 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/tensorflow_datasets.mdx: -------------------------------------------------------------------------------- 1 | # TensorFlow 数据集 2 | 3 | [TensorFlow 数据集](https://www.tensorflow.org/datasets) 是一组准备好供 TensorFlow 或其他 Python 机器学习框架(如 Jax)使用的数据集。所有数据集都以 [tf.data.Datasets](https://www.tensorflow.org/api_docs/python/tf/data/Dataset) 的形式公开,从而实现了易于使用和高性能的输入流水线。要开始使用,请参阅 [指南](https://www.tensorflow.org/datasets/overview) 和 [数据集列表](https://www.tensorflow.org/datasets/catalog/overview#all_datasets)。 4 | 5 | ## 安装和设置 6 | 7 | 您需要安装 `tensorflow` 和 `tensorflow-datasets` Python 包。 8 | 9 | ```bash 10 | pip install tensorflow 11 | ``` 12 | 13 | ```bash 14 | pip install tensorflow-dataset 15 | ``` 16 | 17 | ## 文档加载器 18 | 19 | 请参阅[使用示例](/docs/integrations/document_loaders/tensorflow_datasets)。 20 | 21 | ```python 22 | from langchain_community.document_loaders import TensorflowDatasetLoader 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/tidb.mdx: -------------------------------------------------------------------------------- 1 | # TiDB 2 | 3 | > [TiDB Cloud](https://tidbcloud.com/) 是一款全面的数据库即服务(DBaaS)解决方案,提供了专用和无服务器选项。`TiDB Serverless` 现在正在将内置的向量搜索集成到 MySQL 环境中。通过这一增强功能,您可以无缝开发使用 `TiDB Serverless` 的人工智能应用程序,无需新建数据库或额外的技术堆栈。成为第一批体验者,加入[私人测试版的等待列表](https://tidb.cloud/ai)。 4 | 5 | ## 安装与设置 6 | 7 | 您需要获取 TiDB 数据库的连接详细信息。请访问[TiDB Cloud](https://tidbcloud.com/)获取连接详细信息。 8 | 9 | ```bash 10 | ## 文档加载器 11 | ```python 12 | from langchain_community.document_loaders import TiDBLoader 13 | ``` 14 | 请参阅详细信息[这里](/docs/integrations/document_loaders/tidb)。 15 | ## 向量存储 16 | ```python 17 | from langchain_community.vectorstores import TiDBVectorStore 18 | ``` 19 | 请参阅详细信息[这里](/docs/integrations/vectorstores/tidb_vector)。 20 | ## 内存 21 | ```python 22 | from langchain_community.chat_message_histories import TiDBChatMessageHistory 23 | ``` 24 | 25 | 请参阅详细信息[这里](/docs/integrations/memory/tidb_chat_message_history)。 -------------------------------------------------------------------------------- /docs/integrations/providers/tigergraph.mdx: -------------------------------------------------------------------------------- 1 | # TigerGraph 2 | 3 | [TigerGraph](https://www.tigergraph.com/tigergraph-db/) 是一种本地分布式且高性能的图数据库。以顶点和边的图格式存储数据,形成丰富的关系,非常适合用于支持LLM响应。 4 | 5 | ## 安装和设置 6 | 7 | 按照[连接到 `TigerGraph` 数据库的说明](https://docs.tigergraph.com/pytigergraph/current/getting-started/connection)进行操作。 8 | 9 | 安装 Python SDK: 10 | 11 | ```bash 12 | pip install pyTigerGraph 13 | ``` 14 | 15 | ## 图存储 16 | 17 | ### TigerGraph 18 | 19 | 查看[使用示例](/docs/integrations/graphs/tigergraph)。 20 | 21 | ```python 22 | from langchain_community.graphs import TigerGraph 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/tigris.mdx: -------------------------------------------------------------------------------- 1 | # Tigris 2 | 3 | > [Tigris](https://tigrisdata.com) 是一个开源的无服务器 NoSQL 数据库和搜索平台,旨在简化构建高性能向量搜索应用程序。 4 | 5 | > `Tigris` 消除了管理、操作和同步多个工具的基础设施复杂性,让您可以专注于构建出色的应用程序。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install tigrisdb openapi-schema-pydantic 11 | ``` 12 | 13 | ## 向量存储 14 | 15 | 查看 [使用示例](/docs/integrations/vectorstores/tigris)。 16 | 17 | ```python 18 | from langchain_community.vectorstores import Tigris 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/tomarkdown.mdx: -------------------------------------------------------------------------------- 1 | # 2Markdown 2 | 3 | [2markdown](https://2markdown.com/) 服务可以将网站内容转换为结构化的 Markdown 文件。 4 | 5 | ## 安装和设置 6 | 7 | 我们需要使用 `API key`。请参阅[获取 API key 的说明](https://2markdown.com/login)。 8 | 9 | ## 文档加载器 10 | 11 | 查看一个[使用示例](/docs/integrations/document_loaders/tomarkdown)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import ToMarkdownLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/trello.mdx: -------------------------------------------------------------------------------- 1 | # Trello 2 | 3 | [Trello](https://www.atlassian.com/software/trello) 是一个基于网络的项目管理和协作工具,允许个人和团队组织和跟踪他们的任务和项目。它提供了一个被称为“看板”的可视化界面,用户可以在其中创建列表和卡片来表示他们的任务和活动。 4 | 5 | TrelloLoader 允许我们从 `Trello` 看板加载卡片。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install py-trello beautifulsoup4 11 | ``` 12 | 13 | 查看 [设置说明](/docs/integrations/document_loaders/trello)。 14 | 15 | ## 文档加载器 16 | 17 | 查看 [使用示例](/docs/integrations/document_loaders/trello)。 18 | 19 | ```python 20 | from langchain_community.document_loaders import TrelloLoader 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/trubrics.mdx: -------------------------------------------------------------------------------- 1 | # Trubrics 2 | 3 | [Trubrics](https://trubrics.com) 是一个LLM用户分析平台,可以帮助您收集、分析和管理对AI模型的用户提示和反馈。 4 | 5 | 查看[Trubrics存储库](https://github.com/trubrics/trubrics-sdk)以获取有关`Trubrics`的更多信息。 6 | 7 | ## 安装和设置 8 | 9 | 我们需要安装`trubrics` Python包: 10 | 11 | ```bash 12 | pip install trubrics 13 | ``` 14 | 15 | ## 回调 16 | 17 | 查看[用法示例](/docs/integrations/callbacks/trubrics)。 18 | 19 | ```python 20 | from langchain.callbacks import TrubricsCallbackHandler 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/twitter.mdx: -------------------------------------------------------------------------------- 1 | # Twitter 2 | 3 | [Twitter](https://twitter.com/) 是一种在线社交媒体和社交网络服务。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install tweepy 9 | ``` 10 | 11 | 我们必须使用 `Twitter API` 令牌初始化加载器,并且需要设置 Twitter `用户名`。 12 | 13 | ## 文档加载器 14 | 15 | 查看[使用示例](/docs/integrations/document_loaders/twitter)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import TwitterTweetLoader 19 | ``` 20 | 21 | ## 聊天加载器 22 | 23 | 查看[使用示例](/docs/integrations/chat_loaders/twitter)。 -------------------------------------------------------------------------------- /docs/integrations/providers/typesense.mdx: -------------------------------------------------------------------------------- 1 | # Typesense 2 | 3 | > [Typesense](https://typesense.org) 是一个开源的内存搜索引擎,您可以选择自行 4 | 5 | > [托管](https://typesense.org/docs/guide/install-typesense.html#option-2-local-machine-self-hosting)或在 6 | 7 | > [Typesense 云](https://cloud.typesense.org/)上运行。 8 | 9 | > `Typesense` 专注于性能,通过将整个索引存储在 RAM 中(同时备份到磁盘),并且专注于提供开箱即用的开发者体验,简化可用选项并设置良好的默认值。 10 | 11 | ## 安装和设置 12 | 13 | ```bash 14 | pip install typesense openapi-schema-pydantic 15 | ``` 16 | 17 | ## 向量存储 18 | 19 | 查看[使用示例](/docs/integrations/vectorstores/typesense)。 20 | 21 | ```python 22 | from langchain_community.vectorstores import Typesense 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/uptrain.md: -------------------------------------------------------------------------------- 1 | # UpTrain 2 | 3 | [UpTrain](https://uptrain.ai/) 是一个开源的统一平台,用于评估和改进生成式人工智能应用。它提供了超过20个预配置评估项目(涵盖语言、代码、嵌入式用例),对失败案例进行根本原因分析,并提供解决方案的见解。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install uptrain 9 | ``` 10 | 11 | ## 回调函数 12 | 13 | ```python 14 | from langchain_community.callbacks.uptrain_callback import UpTrainCallbackHandler 15 | ``` 16 | 17 | 查看一个[示例](/docs/integrations/callbacks/uptrain)。 -------------------------------------------------------------------------------- /docs/integrations/providers/usearch.mdx: -------------------------------------------------------------------------------- 1 | # USearch 2 | 3 | [USearch](https://unum-cloud.github.io/usearch/) 是一个更小更快的单文件向量搜索引擎。 4 | 5 | `USearch` 的基本功能与 `FAISS` 相同,如果你曾经研究过近似最近邻搜索,那么它的界面应该很熟悉。`USearch` 和 `FAISS` 都使用了 `HNSW` 算法,但它们在设计原则上有很大的不同。`USearch` 紧凑且与 `FAISS` 广泛兼容,而且不会牺牲性能,主要关注用户定义的度量标准和较少的依赖项。 6 | 7 | ## 安装和设置 8 | 9 | 我们需要安装 `usearch` Python 包。 10 | 11 | ```bash 12 | pip install usearch 13 | ``` 14 | 15 | ## 向量存储 16 | 17 | 请参阅[使用示例](/docs/integrations/vectorstores/usearch)。 18 | 19 | ```python 20 | from langchain_community.vectorstores import USearch 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/vearch.md: -------------------------------------------------------------------------------- 1 | # Vearch 2 | 3 | [Vearch](https://github.com/vearch/vearch) 是一个用于高效相似度搜索深度学习向量的可扩展分布式系统。 4 | 5 | # 安装和设置 6 | 7 | Vearch Python SDK 可以让 Vearch 在本地使用。可以通过 `pip install vearch` 轻松安装 Vearch Python SDK。 8 | 9 | # Vectorstore 10 | 11 | Vearch 也可以用作向量存储。更多细节请参考[这份笔记](/docs/integrations/vectorstores/vearch)。 12 | 13 | ```python 14 | from langchain_community.vectorstores import Vearch 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/vespa.mdx: -------------------------------------------------------------------------------- 1 | # Vespa 2 | 3 | [Vespa](https://vespa.ai/) 是一个功能齐全的搜索引擎和向量数据库。它支持向量搜索(ANN)、词汇搜索以及在同一查询中搜索结构化数据。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install pyvespa 9 | ``` 10 | 11 | ## Retriever 12 | 13 | 查看一个[使用示例](/docs/integrations/retrievers/vespa)。 14 | 15 | ```python 16 | from langchain.retrievers import VespaRetriever 17 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/vlite.mdx: -------------------------------------------------------------------------------- 1 | # vlite 2 | 3 | 本页面介绍如何在 LangChain 中使用 [vlite](https://github.com/sdan/vlite)。vlite 是一个简单快速的向量数据库,用于存储和检索嵌入。 4 | 5 | ## 安装和设置 6 | 7 | 要安装 vlite,请运行以下命令: 8 | 9 | ```bash 10 | pip install vlite 11 | ``` 12 | 13 | 要支持 PDF OCR,请安装 `vlite[ocr]` 扩展: 14 | 15 | ```bash 16 | pip install vlite[ocr] 17 | ``` 18 | 19 | ## VectorStore 20 | 21 | vlite 提供了一个围绕其向量数据库的包装器,允许您将其用作语义搜索和示例选择的向量存储。 22 | 23 | 要导入 vlite 向量存储: 24 | 25 | ```python 26 | from langchain_community.vectorstores import vlite 27 | ``` 28 | 29 | ### 用法 30 | 31 | 有关 vlite 包装器的更详细的使用说明,请参阅[此笔记本](/docs/integrations/vectorstores/vlite)。 -------------------------------------------------------------------------------- /docs/integrations/providers/voyageai.mdx: -------------------------------------------------------------------------------- 1 | # VoyageAI 2 | 3 | 与 VoyageAI 相关的所有功能 4 | 5 | >[VoyageAI](https://www.voyageai.com/) Voyage AI 构建嵌入模型,根据您的领域和公司定制,以提高检索质量。 6 | 7 | ## 安装和设置 8 | 9 | 使用以下命令安装集成包 10 | 11 | ```bash 12 | pip install langchain-voyageai 13 | ``` 14 | 15 | 获取 VoyageAI API 密钥,并将其设置为环境变量 (`VOYAGE_API_KEY`) 16 | 17 | ## 文本嵌入模型 18 | 19 | 查看[使用示例](/docs/integrations/text_embedding/voyageai) 20 | 21 | ```python 22 | from langchain_voyageai import VoyageAIEmbeddings 23 | ``` 24 | 25 | ## 重新排序 26 | 27 | 查看[使用示例](/docs/integrations/document_transformers/voyageai-reranker) 28 | 29 | ```python 30 | from langchain_voyageai import VoyageAIRerank 31 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/weather.mdx: -------------------------------------------------------------------------------- 1 | # 天气 2 | 3 | [OpenWeatherMap](https://openweathermap.org/) 是一家开源天气服务提供商。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install pyowm 9 | ``` 10 | 11 | 我们必须设置 `OpenWeatherMap API token`。 12 | 13 | ## 文档加载器 14 | 15 | 查看一个[使用示例](/docs/integrations/document_loaders/weather)。 16 | 17 | ```python 18 | from langchain_community.document_loaders import WeatherDataLoader 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/whatsapp.mdx: -------------------------------------------------------------------------------- 1 | # WhatsApp 2 | 3 | [WhatsApp](https://www.whatsapp.com/)(也称为`WhatsApp Messenger`)是一款免费的跨平台集中式即时通讯(IM)和网络电话(VoIP)服务。它允许用户发送文本和语音消息,进行语音和视频通话,并分享图片、文档、用户位置和其他内容。 4 | 5 | ## 安装和设置 6 | 7 | 对于它并没有特别的设置。 8 | 9 | ## 文档加载器 10 | 11 | 查看[使用示例](/docs/integrations/document_loaders/whatsapp_chat)。 12 | 13 | ```python 14 | from langchain_community.document_loaders import WhatsAppChatLoader 15 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/wikipedia.mdx: -------------------------------------------------------------------------------- 1 | # 维基百科 2 | 3 | [维基百科](https://wikipedia.org/)是一个由志愿者社区(被称为维基人)撰写和维护的多语言免费在线百科全书,通过开放协作并使用名为MediaWiki的基于维基的编辑系统。`维基百科`是历史上最大的、阅读量最高的参考作品。 4 | 5 | ## 安装和设置 6 | 7 | ```bash 8 | pip install wikipedia 9 | ``` 10 | 11 | ## 文档加载器 12 | 13 | 查看[使用示例](/docs/integrations/document_loaders/wikipedia)。 14 | 15 | ```python 16 | from langchain_community.document_loaders import WikipediaLoader 17 | ``` 18 | 19 | ## 检索器 20 | 21 | 查看[使用示例](/docs/integrations/retrievers/wikipedia)。 22 | 23 | ```python 24 | from langchain.retrievers import WikipediaRetriever 25 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/wolfram_alpha.mdx: -------------------------------------------------------------------------------- 1 | # Wolfram Alpha 2 | 3 | [WolframAlpha](https://en.wikipedia.org/wiki/WolframAlpha) 是由 `Wolfram Research` 开发的一个答案引擎。它通过计算外部数据的答案来回答事实性查询。 4 | 5 | 本页面介绍如何在 LangChain 中使用 `Wolfram Alpha API`。 6 | 7 | ## 安装和设置 8 | 9 | - 使用以下命令安装所需的库 10 | 11 | ```bash 12 | pip install wolframalpha 13 | ``` 14 | 15 | - 前往 Wolfram Alpha 网站注册开发者账户 [链接在这里](https://developer.wolframalpha.com/) 16 | 17 | - 创建一个应用并获取你的 `APP ID` 18 | 19 | - 将你的 APP ID 设置为环境变量 `WOLFRAM_ALPHA_APPID` 20 | 21 | ## 封装器 22 | 23 | ### 实用工具 24 | 25 | 存在一个 WolframAlphaAPIWrapper 实用工具来封装这个 API。导入此实用工具: 26 | 27 | ```python 28 | from langchain_community.utilities.wolfram_alpha import WolframAlphaAPIWrapper 29 | ``` 30 | 31 | 有关此封装器的更详细的使用说明,请参阅[此笔记本](/docs/integrations/tools/wolfram_alpha)。 32 | 33 | ### 工具 34 | 35 | 您还可以将此封装器轻松加载为一个工具(用于与代理一起使用)。 36 | 37 | 您可以使用以下命令实现: 38 | 39 | ```python 40 | from langchain.agents import load_tools 41 | tools = load_tools(["wolfram-alpha"]) 42 | ``` 43 | 44 | 有关工具的更多信息,请参阅[此页面](/docs/how_to/tools_builtin)。 -------------------------------------------------------------------------------- /docs/integrations/providers/writer.mdx: -------------------------------------------------------------------------------- 1 | # 写作工具 2 | 3 | 本页面介绍如何在 LangChain 中使用写作工具生态系统。 4 | 5 | 内容分为两部分:安装和设置,以及特定写作工具包的引用。 6 | 7 | ## 安装和设置 8 | 9 | - 获取一个写作工具的 API 密钥,并将其设置为环境变量 (`WRITER_API_KEY`) 10 | 11 | ## 工具包 12 | 13 | ### LLM 14 | 15 | LangChain 提供了一个写作工具 LLM 的包装器,您可以通过以下方式访问: 16 | 17 | ```python 18 | from langchain_community.llms import Writer 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/xata.mdx: -------------------------------------------------------------------------------- 1 | # Xata 2 | 3 | > [Xata](https://xata.io) 是一个基于 `PostgreSQL` 的无服务器数据平台。 4 | 5 | > 它提供了一个用于与数据库交互的 Python SDK,以及一个用于管理数据的用户界面。 6 | 7 | > `Xata` 具有原生的向量类型,可以添加到任何表中,并支持相似性搜索。LangChain 直接将向量插入 `Xata`,并查询给定向量的最近邻居,这样您就可以将所有 LangChain 嵌入与 `Xata` 集成。 8 | 9 | ## 安装和设置 10 | 11 | 我们需要安装 `xata` Python 包。 12 | 13 | ```bash 14 | pip install xata==1.0.0a7 15 | ``` 16 | 17 | ## 向量存储 18 | 19 | 查看[使用示例](/docs/integrations/vectorstores/xata)。 20 | 21 | ```python 22 | from langchain_community.vectorstores import XataVectorStore 23 | ``` 24 | 25 | ## 存储空间 26 | 27 | 查看[使用示例](/docs/integrations/memory/xata_chat_message_history)。 28 | 29 | ```python 30 | from langchain_community.chat_message_histories import XataChatMessageHistory 31 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/yandex.mdx: -------------------------------------------------------------------------------- 1 | # Yandex 2 | 3 | 所有与Yandex Cloud相关的功能 4 | 5 | >[Yandex Cloud](https://cloud.yandex.com/en/) 是一个公共云平台。 6 | 7 | ## 安装和设置 8 | 9 | 可以通过 PyPI 使用 pip 安装 Yandex Cloud SDK: 10 | 11 | ```bash 12 | pip install yandexcloud 13 | ``` 14 | 15 | ## 语言模型 16 | 17 | ### YandexGPT 18 | 19 | 查看一个[使用示例](/docs/integrations/llms/yandex)。 20 | 21 | ```python 22 | from langchain_community.llms import YandexGPT 23 | ``` 24 | 25 | ## 聊天模型 26 | 27 | ### YandexGPT 28 | 29 | 查看一个[使用示例](/docs/integrations/chat/yandex)。 30 | 31 | ```python 32 | from langchain_community.chat_models import ChatYandexGPT 33 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/youtube.mdx: -------------------------------------------------------------------------------- 1 | # YouTube 2 | 3 | [YouTube](https://www.youtube.com/) 是由 Google 推出的在线视频分享和社交媒体平台。 4 | 5 | 我们下载了 YouTube 的字幕和视频信息。 6 | 7 | ## 安装和设置 8 | 9 | ```bash 10 | pip install youtube-transcript-api 11 | pip install pytube 12 | ``` 13 | 14 | 查看[使用示例](/docs/integrations/document_loaders/youtube_transcript)。 15 | 16 | ## 文档加载器 17 | 18 | 查看[使用示例](/docs/integrations/document_loaders/youtube_transcript)。 19 | 20 | ```python 21 | from langchain_community.document_loaders import YoutubeLoader 22 | from langchain_community.document_loaders import GoogleApiYoutubeLoader 23 | ``` -------------------------------------------------------------------------------- /docs/integrations/providers/zilliz.mdx: -------------------------------------------------------------------------------- 1 | # Zilliz 2 | 3 | [Zilliz Cloud](https://zilliz.com/doc/quick_start) 是 LF AI Milvus® 在云端的全托管服务。 4 | 5 | ## 安装和设置 6 | 7 | 安装 Python SDK: 8 | 9 | ```bash 10 | pip install pymilvus 11 | ``` 12 | 13 | ## Vectorstore 14 | 15 | Zilliz 索引的包装器允许您将其用作向量存储,无论是用于语义搜索还是示例选择。 16 | 17 | ```python 18 | from langchain_community.vectorstores import Milvus 19 | ``` 20 | 21 | 有关 Miluvs 包装器的更详细演练,请参阅[此笔记本](/docs/integrations/vectorstores/zilliz)。 -------------------------------------------------------------------------------- /docs/integrations/retrievers/amazon_kendra_retriever.md: -------------------------------------------------------------------------------- 1 | # Amazon Kendra 2 | 3 | > [Amazon Kendra](https://docs.aws.amazon.com/kendra/latest/dg/what-is-kendra.html) 是由 `Amazon Web Services` (`AWS`) 提供的智能搜索服务。它利用先进的自然语言处理(NLP)和机器学习算法,在组织内的各种数据源之间实现强大的搜索能力。`Kendra` 旨在帮助用户快速准确地找到所需信息,提高生产力和决策能力。 4 | 5 | > 使用 `Kendra`,用户可以搜索各种内容类型,包括文档、常见问题解答、知识库、手册和网站。它支持多种语言,并能理解复杂的查询、同义词和上下文含义,提供高度相关的搜索结果。 6 | 7 | ## 使用 Amazon Kendra Index Retriever 8 | 9 | ```python 10 | %pip install --upgrade --quiet boto3 11 | ``` 12 | 13 | ```python 14 | from langchain_community.retrievers import AmazonKendraRetriever 15 | ``` 16 | 17 | 创建新的检索器 18 | 19 | ```python 20 | retriever = AmazonKendraRetriever(index_id="c0806df7-e76b-4bce-9b5c-d5582f6b1a03") 21 | ``` 22 | 23 | 现在您可以使用从 Kendra 索引中检索到的文档 24 | 25 | ```python 26 | retriever.invoke("什么是 LangChain") 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/retrievers/bm25.md: -------------------------------------------------------------------------------- 1 | # BM25 2 | 3 | [BM25 (维基百科)](https://en.wikipedia.org/wiki/Okapi_BM25) 也被称为 `Okapi BM25`,是信息检索系统中用于估计文档与给定搜索查询相关性的排名函数。 4 | 5 | `BM25Retriever` 检索器使用 [`rank_bm25`](https://github.com/dorianbrown/rank_bm25) 软件包。 6 | 7 | ```python 8 | %pip install --upgrade --quiet rank_bm25 9 | ``` 10 | 11 | ```python 12 | from langchain_community.retrievers import BM25Retriever 13 | ``` 14 | 15 | ## 使用 -------------------------------------------------------------------------------- /docs/integrations/retrievers/knn.md: -------------------------------------------------------------------------------- 1 | # kNN 2 | 3 | 在统计学中,[k-最近邻算法 (k-NN)](https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm) 是一种非参数的监督学习方法,最早由 `Evelyn Fix` 和 `Joseph Hodges` 在 1951 年开发,后来由 `Thomas Cover` 进行了扩展。它被用于分类和回归。 4 | 5 | 本文档介绍了如何使用底层使用 kNN 的检索器。 6 | 7 | 主要基于 [Andrej Karpathy](https://github.com/karpathy/randomfun/blob/master/knn_vs_svm.html) 的代码。 8 | 9 | ```python 10 | from langchain_community.retrievers import KNNRetriever 11 | from langchain_openai import OpenAIEmbeddings 12 | ``` 13 | 14 | ## 创建带有文本的新检索器 15 | 16 | ```python 17 | retriever = KNNRetriever.from_texts( 18 | ["foo", "bar", "world", "hello", "foo bar"], OpenAIEmbeddings() 19 | ) 20 | ``` 21 | 22 | ## 使用检索器 23 | 24 | 现在我们可以使用检索器了! 25 | 26 | ```python 27 | result = retriever.invoke("foo") 28 | ``` 29 | 30 | ```python 31 | result 32 | ``` 33 | 34 | ```output 35 | [Document(page_content='foo', metadata={}), 36 | Document(page_content='foo bar', metadata={}), 37 | Document(page_content='hello', metadata={}), 38 | Document(page_content='bar', metadata={})] 39 | ``` -------------------------------------------------------------------------------- /docs/integrations/retrievers/self_query/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | 侧边栏位置: 0 4 | 5 | --- 6 | 7 | # 自问式检索器 8 | 9 | 了解自问式检索器的工作原理,请点击[这里](/docs/how_to/self_query)。 10 | 11 | import DocCardList from "@theme/DocCardList"; 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/integrations/stores/file_system.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_label: 本地文件系统 4 | 5 | sidebar_position: 3 6 | 7 | --- 8 | 9 | # 本地文件存储 10 | 11 | `LocalFileStore` 是 `ByteStore` 的一个持久化实现,它将所有数据存储在您选择的文件夹中。 12 | 13 | ```python 14 | from pathlib import Path 15 | from langchain.storage import LocalFileStore 16 | root_path = Path.cwd() / "data" # 也可以是一个由字符串设置的路径 17 | store = LocalFileStore(root_path) 18 | store.mset([("k1", b"v1"), ("k2", b"v2")]) 19 | print(store.mget(["k1", "k2"])) 20 | ``` 21 | 22 | ```output 23 | [b'v1', b'v2'] 24 | ``` 25 | 26 | 现在让我们看看我们的 `data` 文件夹中存在哪些文件: 27 | 28 | ```python 29 | !ls {root_path} 30 | ``` 31 | 32 | ```output 33 | k1 k2 34 | ``` -------------------------------------------------------------------------------- /docs/integrations/stores/in_memory.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | 侧边栏标签: 内存 4 | 5 | 侧边栏位置: 2 6 | 7 | 关键词: [内存存储] 8 | 9 | --- 10 | 11 | # 内存字节存储 12 | 13 | `InMemoryByteStore` 是 `ByteStore` 的非持久化实现,它将所有数据存储在 Python 字典中。 14 | 15 | ```python 16 | from langchain.storage import InMemoryByteStore 17 | store = InMemoryByteStore() 18 | store.mset([("k1", b"v1"), ("k2", b"v2")]) 19 | print(store.mget(["k1", "k2"])) 20 | ``` 21 | 22 | ```output 23 | [b'v1', b'v2'] 24 | ``` -------------------------------------------------------------------------------- /docs/integrations/stores/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_position: 1 4 | 5 | sidebar_class_name: hidden 6 | 7 | --- 8 | 9 | # 存储 10 | 11 | 在许多不同的应用中,拥有一种键值存储是很有帮助的。 12 | 13 | 在本节中,我们将介绍使用 `ByteStore` 接口的几种不同方式来存储键值对。 14 | 15 | ## 特性(本地支持) 16 | 17 | 所有的 `ByteStore` 都支持以下函数,用于同时修改**多个**键值对: 18 | 19 | - `mget(key: Sequence[str]) -> List[Optional[bytes]]`:获取多个键的内容,如果键不存在则返回 `None` 20 | 21 | - `mset(key_value_pairs: Sequence[Tuple[str, bytes]]) -> None`:设置多个键的内容 22 | 23 | - `mdelete(key: Sequence[str]) -> None`:删除多个键 24 | 25 | - `yield_keys(prefix: Optional[str] = None) -> Iterator[str]`:返回存储中的所有键,可选择按前缀进行筛选 26 | 27 | ## 如何选择 28 | 29 | `ByteStore` 的设计目标是可以互换的。默认情况下,大多数依赖集成使用的是 `InMemoryByteStore`,它是一个简单的内存键值存储。 30 | 31 | 然而,如果您开始有其他需求,比如巨大的可扩展性或持久性,您可以将 `ByteStore` 实现替换为本节中记录的其他实现之一。 -------------------------------------------------------------------------------- /docs/integrations/stores/redis.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_label: Redis 4 | 5 | --- 6 | 7 | # RedisStore 8 | 9 | `RedisStore` 是 `ByteStore` 的一种实现,它将所有数据存储在您的 Redis 实例中。 10 | 11 | 要配置 Redis,请参考我们的[Redis指南](/docs/integrations/providers/redis)。 12 | 13 | ```python 14 | %pip install --upgrade --quiet redis 15 | ``` 16 | 17 | ```python 18 | from langchain_community.storage import RedisStore 19 | store = RedisStore(redis_url="redis://localhost:6379") 20 | store.mset([("k1", b"v1"), ("k2", b"v2")]) 21 | print(store.mget(["k1", "k2"])) 22 | ``` 23 | 24 | ```output 25 | [b'v1', b'v2'] 26 | ``` -------------------------------------------------------------------------------- /docs/integrations/stores/upstash_redis.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_label: Upstash Redis 4 | 5 | --- 6 | 7 | # UpstashRedisByteStore 8 | 9 | `UpstashRedisStore` 是 `ByteStore` 的一种实现,它将所有数据存储在您的 Upstash 托管的 Redis 实例中。 10 | 11 | 要使用基本的 `RedisStore`,请参阅[此指南](/docs/integrations/stores/redis/) 12 | 13 | 要配置 Upstash Redis,请参考我们的[Upstash指南](/docs/integrations/providers/upstash). 14 | 15 | ```python 16 | %pip install --upgrade --quiet upstash-redis 17 | ``` 18 | 19 | ```python 20 | from langchain_community.storage import UpstashRedisByteStore 21 | from upstash_redis import Redis 22 | URL = "" 23 | TOKEN = "" 24 | redis_client = Redis(url=URL, token=TOKEN) 25 | store = UpstashRedisByteStore(client=redis_client, ttl=None, namespace="test-ns") 26 | store.mset([("k1", b"v1"), ("k2", b"v2")]) 27 | print(store.mget(["k1", "k2"])) 28 | ``` 29 | 30 | ```output 31 | [b'v1', b'v2'] 32 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/ai21.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_label: AI21实验室 4 | 5 | --- 6 | 7 | # AI21嵌入 8 | 9 | 本文介绍如何开始使用AI21嵌入模型。 10 | 11 | ## 安装 12 | 13 | ```python 14 | !pip install -qU langchain-ai21 15 | ``` 16 | 17 | ## 环境设置 18 | 19 | 我们需要获取一个[AI21 API密钥](https://docs.ai21.com/),并设置`AI21_API_KEY`环境变量: 20 | 21 | ```python 22 | import os 23 | from getpass import getpass 24 | os.environ["AI21_API_KEY"] = getpass() 25 | ``` 26 | 27 | ## 使用 28 | 29 | ```python 30 | from langchain_ai21 import AI21Embeddings 31 | embeddings = AI21Embeddings() 32 | ``` 33 | 34 | ```python 35 | embeddings.embed_query("我要查询的内容") 36 | ``` 37 | 38 | ```python 39 | embeddings.embed_documents( 40 | ["这是一个文档的内容", "这是另一个文档"] 41 | ) 42 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/awadb.md: -------------------------------------------------------------------------------- 1 | # AwaDB 2 | 3 | [AwaDB](https://github.com/awa-ai/awadb) 是一种用于搜索和存储由 LLM 应用程序使用的嵌入向量的 AI 本地数据库。 4 | 5 | 本笔记本将解释如何在 LangChain 中使用 `AwaEmbeddings`。 6 | 7 | ```python 8 | # pip install awadb 9 | ``` 10 | 11 | ## 导入库 12 | 13 | ```python 14 | from langchain_community.embeddings import AwaEmbeddings 15 | ``` 16 | 17 | ```python 18 | Embedding = AwaEmbeddings() 19 | ``` 20 | 21 | # 设置嵌入模型 22 | 23 | 用户可以使用 `Embedding.set_model()` 来指定嵌入模型。\ 24 | 25 | 此函数的输入是表示模型名称的字符串。\ 26 | 27 | 当前支持的模型列表可以在[这里](https://github.com/awa-ai/awadb)获取。 28 | 29 | **默认模型**是 `all-mpnet-base-v2`,可以在不设置的情况下使用。 30 | 31 | ```python 32 | text = "our embedding test" 33 | Embedding.set_model("all-mpnet-base-v2") 34 | ``` 35 | 36 | ```python 37 | res_query = Embedding.embed_query("The test information") 38 | res_document = Embedding.embed_documents(["test1", "another test"]) 39 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/bedrock.md: -------------------------------------------------------------------------------- 1 | # 基石 2 | 3 | >[亚马逊基石](https://aws.amazon.com/bedrock/)是一项完全托管的服务,提供了来自领先人工智能公司如`AI21 Labs`、`Anthropic`、`Cohere`、`Meta`、`Stability AI`和`Amazon`的高性能基础模型(FMs),通过单一 API,以及您构建生成式人工智能应用所需的广泛功能,包括安全性、隐私性和负责任的人工智能。使用`亚马逊基石`,您可以轻松尝试和评估适合您用例的顶级 FMs,使用微调和`检索增强生成`(`RAG`)等技术私密定制它们,并构建执行任务的代理,这些代理使用您的企业系统和数据源。由于`亚马逊基石`是无服务器的,您无需管理任何基础设施,可以安全地集成和部署生成式人工智能功能到您已熟悉的 AWS 服务中。 4 | 5 | ```python 6 | %pip install --upgrade --quiet boto3 7 | ``` 8 | 9 | ```python 10 | from langchain_community.embeddings import BedrockEmbeddings 11 | embeddings = BedrockEmbeddings( 12 | credentials_profile_name="bedrock-admin", region_name="us-east-1" 13 | ) 14 | ``` 15 | 16 | ```python 17 | embeddings.embed_query("这是文档的内容") 18 | ``` 19 | 20 | ```python 21 | embeddings.embed_documents( 22 | ["这是文档的内容", "这是另一个文档"] 23 | ) 24 | ``` 25 | 26 | ```python 27 | # 异步嵌入查询 28 | await embeddings.aembed_query("这是文档的内容") 29 | ``` 30 | 31 | ```python 32 | # 异步嵌入文档 33 | await embeddings.aembed_documents( 34 | ["这是文档的内容", "这是另一个文档"] 35 | ) 36 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/bge_huggingface.md: -------------------------------------------------------------------------------- 1 | # Hugging Face 上的 BGE 模型 2 | 3 | [Hugging Face 上的 BGE 模型](https://huggingface.co/BAAI/bge-large-en) 被认为是[最好的开源嵌入模型](https://huggingface.co/spaces/mteb/leaderboard)。 4 | 5 | BGE 模型是由[北京智源人工智能研究院(BAAI)](https://en.wikipedia.org/wiki/Beijing_Academy_of_Artificial_Intelligence)创建的。`BAAI` 是一家从事人工智能研究和开发的私立非营利组织。 6 | 7 | 这个笔记展示了如何通过 `Hugging Face` 使用 `BGE Embeddings` 8 | 9 | ```python 10 | %pip install --upgrade --quiet sentence_transformers 11 | ``` 12 | 13 | ```python 14 | from langchain_community.embeddings import HuggingFaceBgeEmbeddings 15 | model_name = "BAAI/bge-small-en" 16 | model_kwargs = {"device": "cpu"} 17 | encode_kwargs = {"normalize_embeddings": True} 18 | hf = HuggingFaceBgeEmbeddings( 19 | model_name=model_name, model_kwargs=model_kwargs, encode_kwargs=encode_kwargs 20 | ) 21 | ``` 22 | 23 | ```python 24 | embedding = hf.embed_query("hi this is harrison") 25 | len(embedding) 26 | ``` 27 | 28 | ```output 29 | 384 30 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/bookend.md: -------------------------------------------------------------------------------- 1 | # Bookend AI 2 | 3 | 让我们加载 Bookend AI Embeddings 类。 4 | 5 | ```python 6 | from langchain_community.embeddings import BookendEmbeddings 7 | ``` 8 | 9 | ```python 10 | embeddings = BookendEmbeddings( 11 | domain="your_domain", 12 | api_token="your_api_token", 13 | model_id="your_embeddings_model_id", 14 | ) 15 | ``` 16 | 17 | ```python 18 | text = "This is a test document." 19 | ``` 20 | 21 | ```python 22 | query_result = embeddings.embed_query(text) 23 | ``` 24 | 25 | ```python 26 | doc_result = embeddings.embed_documents([text]) 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/dashscope.md: -------------------------------------------------------------------------------- 1 | # DashScope 2 | 3 | 让我们加载 DashScope 嵌入类。 4 | 5 | ```python 6 | from langchain_community.embeddings import DashScopeEmbeddings 7 | ``` 8 | 9 | ```python 10 | embeddings = DashScopeEmbeddings( 11 | model="text-embedding-v1", dashscope_api_key="your-dashscope-api-key" 12 | ) 13 | ``` 14 | 15 | ```python 16 | text = "This is a test document." 17 | ``` 18 | 19 | ```python 20 | query_result = embeddings.embed_query(text) 21 | print(query_result) 22 | ``` 23 | 24 | ```python 25 | doc_results = embeddings.embed_documents(["foo"]) 26 | print(doc_results) 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/fake.md: -------------------------------------------------------------------------------- 1 | # 虚假嵌入 2 | 3 | LangChain 还提供了一个虚假嵌入类。您可以使用这个类来测试您的流水线。 4 | 5 | ```python 6 | from langchain_community.embeddings import FakeEmbeddings 7 | ``` 8 | 9 | ```python 10 | embeddings = FakeEmbeddings(size=1352) 11 | ``` 12 | 13 | ```python 14 | query_result = embeddings.embed_query("foo") 15 | ``` 16 | 17 | ```python 18 | doc_results = embeddings.embed_documents(["foo"]) 19 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/gigachat.md: -------------------------------------------------------------------------------- 1 | # GigaChat 2 | 3 | 本笔记本展示了如何使用 LangChain 与 [GigaChat embeddings](https://developers.sber.ru/portal/products/gigachat)。要使用它,您需要安装 ```gigachat``` Python 包。 4 | 5 | ```python 6 | %pip install --upgrade --quiet gigachat 7 | ``` 8 | 9 | 要获取 GigaChat 凭据,您需要[创建账户](https://developers.sber.ru/studio/login),并[获取 API 访问权限](https://developers.sber.ru/docs/ru/gigachat/individuals-quickstart)。 10 | 11 | ## 示例 12 | 13 | ```python 14 | import os 15 | from getpass import getpass 16 | os.environ["GIGACHAT_CREDENTIALS"] = getpass() 17 | ``` 18 | 19 | ```python 20 | from langchain_community.embeddings import GigaChatEmbeddings 21 | embeddings = GigaChatEmbeddings(verify_ssl_certs=False, scope="GIGACHAT_API_PERS") 22 | ``` 23 | 24 | ```python 25 | query_result = embeddings.embed_query("The quick brown fox jumps over the lazy dog") 26 | ``` 27 | 28 | ```python 29 | query_result[:5] 30 | ``` 31 | 32 | ```output 33 | [0.8398333191871643, 34 | -0.14180311560630798, 35 | -0.6161925792694092, 36 | -0.17103666067123413, 37 | 1.2884578704833984] 38 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/instruct_embeddings.md: -------------------------------------------------------------------------------- 1 | # Hugging Face 上的 Instruct Embeddings 2 | 3 | [Hugging Face 句子转换器](https://huggingface.co/sentence-transformers) 是一个用于最先进的句子、文本和图像嵌入的 Python 框架。 4 | 5 | 其中的 instruct 嵌入模型被用于 `HuggingFaceInstructEmbeddings` 类中。 6 | 7 | ```python 8 | from langchain_community.embeddings import HuggingFaceInstructEmbeddings 9 | ``` 10 | 11 | ```python 12 | embeddings = HuggingFaceInstructEmbeddings( 13 | query_instruction="表示用于检索的查询:" 14 | ) 15 | ``` 16 | 17 | ```output 18 | load INSTRUCTOR_Transformer 19 | max_seq_length 512 20 | ``` 21 | 22 | ```python 23 | text = "这是一个测试文档。" 24 | ``` 25 | 26 | ```python 27 | query_result = embeddings.embed_query(text) 28 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/jina.md: -------------------------------------------------------------------------------- 1 | # Jina 2 | 3 | 让我们加载 Jina 嵌入类。 4 | 5 | ```python 6 | from langchain_community.embeddings import JinaEmbeddings 7 | ``` 8 | 9 | ```python 10 | embeddings = JinaEmbeddings( 11 | jina_api_key="jina_*", model_name="jina-embeddings-v2-base-en" 12 | ) 13 | ``` 14 | 15 | ```python 16 | text = "这是一个测试文档。" 17 | ``` 18 | 19 | ```python 20 | query_result = embeddings.embed_query(text) 21 | ``` 22 | 23 | ```python 24 | print(query_result) 25 | ``` 26 | 27 | ```python 28 | doc_result = embeddings.embed_documents([text]) 29 | ``` 30 | 31 | ```python 32 | print(doc_result) 33 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/llamacpp.md: -------------------------------------------------------------------------------- 1 | # Llama-cpp 2 | 3 | 本文介绍如何在 LangChain 中使用 Llama-cpp 嵌入。 4 | 5 | ```python 6 | %pip install --upgrade --quiet llama-cpp-python 7 | ``` 8 | 9 | ```python 10 | from langchain_community.embeddings import LlamaCppEmbeddings 11 | ``` 12 | 13 | ```python 14 | llama = LlamaCppEmbeddings(model_path="/path/to/model/ggml-model-q4_0.bin") 15 | ``` 16 | 17 | ```python 18 | text = "This is a test document." 19 | ``` 20 | 21 | ```python 22 | query_result = llama.embed_query(text) 23 | ``` 24 | 25 | ```python 26 | doc_result = llama.embed_documents([text]) 27 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/mistralai.md: -------------------------------------------------------------------------------- 1 | # MistralAI 2 | 3 | 本文介绍如何使用 MistralAIEmbeddings,在 langchain_mistralai 包中提供的功能,将文本嵌入到 langchain 中。 4 | 5 | ```python 6 | # pip install -U langchain-mistralai 7 | ``` 8 | 9 | ## 导入库 10 | 11 | ```python 12 | from langchain_mistralai import MistralAIEmbeddings 13 | ``` 14 | 15 | ```python 16 | embedding = MistralAIEmbeddings(api_key="your-api-key") 17 | ``` 18 | 19 | # 使用嵌入模型 20 | 21 | 使用 `MistralAIEmbeddings`,您可以直接使用默认模型 'mistral-embed',或者如果有其他可用模型,也可以设置为其他模型。 22 | 23 | ```python 24 | embedding.model = "mistral-embed" # 或者您偏好的其他模型(如果可用) 25 | ``` 26 | 27 | ```python 28 | res_query = embedding.embed_query("The test information") 29 | res_document = embedding.embed_documents(["test1", "another test"]) 30 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/modelscope_hub.md: -------------------------------------------------------------------------------- 1 | # ModelScope 2 | 3 | [ModelScope](https://www.modelscope.cn/home) 是一个大型的模型和数据集仓库。 4 | 5 | 让我们加载 ModelScope Embedding 类。 6 | 7 | ```python 8 | from langchain_community.embeddings import ModelScopeEmbeddings 9 | ``` 10 | 11 | ```python 12 | model_id = "damo/nlp_corom_sentence-embedding_english-base" 13 | ``` 14 | 15 | ```python 16 | embeddings = ModelScopeEmbeddings(model_id=model_id) 17 | ``` 18 | 19 | ```python 20 | text = "This is a test document." 21 | ``` 22 | 23 | ```python 24 | query_result = embeddings.embed_query(text) 25 | ``` 26 | 27 | ```python 28 | doc_results = embeddings.embed_documents(["foo"]) 29 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/nemo.md: -------------------------------------------------------------------------------- 1 | # NVIDIA NeMo 嵌入 2 | 3 | 使用 `NeMoEmbeddings` 类连接到 NVIDIA 的嵌入服务。 4 | 5 | NeMo Retriever Embedding Microservice (NREM) 将最先进的文本嵌入技术引入您的应用程序,提供无与伦比的自然语言处理和理解能力。无论您是开发语义搜索、检索增强生成 (RAG) 流水线,还是任何需要使用文本嵌入的应用程序,NREM 都能满足您的需求。NREM 基于 NVIDIA 软件平台,包括 CUDA、TensorRT 和 Triton,提供最先进的 GPU 加速文本嵌入模型服务。 6 | 7 | NREM 使用 NVIDIA 的 TensorRT 构建在 Triton 推理服务器之上,以优化推断文本嵌入模型。 8 | 9 | ## 导入 10 | 11 | ```python 12 | from langchain_community.embeddings import NeMoEmbeddings 13 | ``` 14 | 15 | ## 设置 16 | 17 | ```python 18 | batch_size = 16 19 | model = "NV-Embed-QA-003" 20 | api_endpoint_url = "http://localhost:8080/v1/embeddings" 21 | ``` 22 | 23 | ```python 24 | embedding_model = NeMoEmbeddings( 25 | batch_size=batch_size, model=model, api_endpoint_url=api_endpoint_url 26 | ) 27 | ``` 28 | 29 | ```output 30 | 检查端点是否在线: http://localhost:8080/v1/embeddings 31 | ``` 32 | 33 | ```python 34 | embedding_model.embed_query("This is a test.") 35 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/nlp_cloud.md: -------------------------------------------------------------------------------- 1 | # NLP Cloud 2 | 3 | [NLP Cloud](https://docs.nlpcloud.com/#introduction) 是一个人工智能平台,允许您使用最先进的AI引擎,甚至可以使用自己的数据训练自己的引擎。 4 | 5 | [embeddings](https://docs.nlpcloud.com/#embeddings) 端点提供以下模型: 6 | 7 | * `paraphrase-multilingual-mpnet-base-v2`:Paraphrase Multilingual MPNet Base V2 是基于Sentence Transformers的非常快速的模型,非常适合在50多种语言中提取嵌入(在此处查看完整列表)。 8 | 9 | ```python 10 | %pip install --upgrade --quiet nlpcloud 11 | ``` 12 | 13 | ```python 14 | from langchain_community.embeddings import NLPCloudEmbeddings 15 | ``` 16 | 17 | ```python 18 | import os 19 | os.environ["NLPCLOUD_API_KEY"] = "xxx" 20 | nlpcloud_embd = NLPCloudEmbeddings() 21 | ``` 22 | 23 | ```python 24 | text = "This is a test document." 25 | ``` 26 | 27 | ```python 28 | query_result = nlpcloud_embd.embed_query(text) 29 | ``` 30 | 31 | ```python 32 | doc_result = nlpcloud_embd.embed_documents([text]) 33 | ``` -------------------------------------------------------------------------------- /docs/integrations/text_embedding/together.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_label: Together AI 4 | 5 | --- 6 | 7 | # TogetherEmbeddings 8 | 9 | 这份笔记覆盖了如何开始使用托管在 Together AI API 中的开源嵌入模型。 10 | 11 | ## 安装 12 | 13 | ```python 14 | # 安装包 15 | %pip install --upgrade --quiet langchain-together 16 | ``` 17 | 18 | ## 环境设置 19 | 20 | 确保设置以下环境变量: 21 | 22 | - `TOGETHER_API_KEY` 23 | 24 | ## 使用 25 | 26 | 首先,从[这个列表](https://docs.together.ai/docs/embedding-models)中选择一个支持的模型。在下面的示例中,我们将使用 `togethercomputer/m2-bert-80M-8k-retrieval` 模型。 27 | 28 | ```python 29 | from langchain_together.embeddings import TogetherEmbeddings 30 | embeddings = TogetherEmbeddings(model="togethercomputer/m2-bert-80M-8k-retrieval") 31 | ``` 32 | 33 | ```python 34 | embeddings.embed_query("我的查询内容") 35 | ``` 36 | 37 | ```python 38 | embeddings.embed_documents( 39 | ["这是一个文档的内容", "这是另一个文档"] 40 | ) 41 | ``` 42 | 43 | ```python 44 | # 异步嵌入查询 45 | await embeddings.aembed_query("我的查询内容") 46 | ``` 47 | 48 | ```python 49 | # 异步嵌入文档 50 | await embeddings.aembed_documents( 51 | ["这是一个文档的内容", "这是另一个文档"] 52 | ) 53 | ``` -------------------------------------------------------------------------------- /docs/integrations/tools/_gradio_tools_files/output_7_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/docs/integrations/tools/_gradio_tools_files/output_7_0.png -------------------------------------------------------------------------------- /docs/integrations/tools/dataherald.md: -------------------------------------------------------------------------------- 1 | # Dataherald 2 | 3 | 本文介绍如何使用 Dataherald 组件。 4 | 5 | 首先,您需要设置 Dataherald 账户并获取 API 密钥: 6 | 7 | 1. 前往 dataherald 网站并注册 [链接](https://www.dataherald.com/) 8 | 9 | 2. 登录管理控制台后,创建一个 API 密钥 10 | 11 | 3. 运行以下命令安装 dataherald: 12 | 13 | ```python 14 | pip install dataherald 15 | ``` 16 | 17 | 接下来,我们需要设置一些环境变量: 18 | 19 | 1. 将您的 API 密钥保存到 DATAHERALD_API_KEY 环境变量中 20 | 21 | ```python 22 | import os 23 | os.environ["DATAHERALD_API_KEY"] = "" 24 | ``` 25 | 26 | 然后,我们可以使用以下代码连接到 Dataherald API: 27 | 28 | ```python 29 | from langchain_community.utilities.dataherald import DataheraldAPIWrapper 30 | dataherald = DataheraldAPIWrapper(db_connection_id="65fb766367dd22c99ce1a12d") 31 | ``` 32 | 33 | 最后,我们可以运行以下代码来查询公司的员工数量: 34 | 35 | ```python 36 | dataherald.run("How many employees are in the company?") 37 | ``` 38 | 39 | ```output 40 | 'select COUNT(*) from employees' 41 | ``` -------------------------------------------------------------------------------- /docs/integrations/tools/google_cloud_texttospeech.md: -------------------------------------------------------------------------------- 1 | # Google Cloud 文本转语音 2 | 3 | [Google Cloud 文本转语音](https://cloud.google.com/text-to-speech) 可以让开发者合成自然音质的语音,提供100多种语音,支持多种语言和变体。它应用了 DeepMind 在 WaveNet 上的突破性研究成果,以及 Google 强大的神经网络,以实现尽可能高的保真度。 4 | 5 | 本文档展示了如何使用 `Google Cloud 文本转语音 API` 来实现语音合成功能。 6 | 7 | 首先,您需要设置一个 Google Cloud 项目。您可以按照[这里](https://cloud.google.com/text-to-speech/docs/before-you-begin)的说明进行操作。 8 | 9 | ```python 10 | %pip install --upgrade --quiet google-cloud-text-to-speech 11 | ``` 12 | 13 | ## 使用方法 14 | 15 | ```python 16 | from langchain_community.tools import GoogleCloudTextToSpeechTool 17 | text_to_speak = "你好,世界!" 18 | tts = GoogleCloudTextToSpeechTool() 19 | tts.name 20 | ``` 21 | 22 | 我们可以生成音频,将其保存到临时文件,然后播放。 23 | 24 | ```python 25 | speech_file = tts.run(text_to_speak) 26 | ``` -------------------------------------------------------------------------------- /docs/integrations/tools/google_places.md: -------------------------------------------------------------------------------- 1 | # 谷歌地点 2 | 3 | 本文介绍如何使用谷歌地点 API。 4 | 5 | ```python 6 | %pip install --upgrade --quiet googlemaps 7 | ``` 8 | 9 | ```python 10 | import os 11 | os.environ["GPLACES_API_KEY"] = "" 12 | ``` 13 | 14 | ```python 15 | from langchain_community.tools import GooglePlacesTool 16 | ``` 17 | 18 | ```python 19 | places = GooglePlacesTool() 20 | ``` 21 | 22 | ```python 23 | places.run("al fornos") 24 | ``` 25 | 26 | ```output 27 | "1. Delfina Restaurant\n地址:3621 18th St, San Francisco, CA 94110, 美国\n电话:(415) 552-4055\n网站:https://www.delfinasf.com/\n\n\n2. Piccolo Forno\n地址:725 Columbus Ave, San Francisco, CA 94133, 美国\n电话:(415) 757-0087\n网站:https://piccolo-forno-sf.com/\n\n\n3. L'Osteria del Forno\n地址:519 Columbus Ave, San Francisco, CA 94133, 美国\n电话:(415) 982-1124\n网站:未知\n\n\n4. Il Fornaio\n地址:1265 Battery St, San Francisco, CA 94111, 美国\n电话:(415) 986-0100\n网站:https://www.ilfornaio.com/\n\n" 28 | ``` -------------------------------------------------------------------------------- /docs/integrations/tools/huggingface_tools.md: -------------------------------------------------------------------------------- 1 | # HuggingFace Hub 工具 2 | 3 | >[Huggingface Tools](https://huggingface.co/docs/transformers/v4.29.0/en/custom_tools) 支持直接使用 `load_huggingface_tool` 函数加载支持文本输入输出的工具。 4 | 5 | ```python 6 | # 需要 transformers>=4.29.0 和 huggingface_hub>=0.14.1 7 | %pip install --upgrade --quiet transformers huggingface_hub > /dev/null 8 | ``` 9 | 10 | ```python 11 | from langchain.agents import load_huggingface_tool 12 | tool = load_huggingface_tool("lysandre/hf-model-downloads") 13 | print(f"{tool.name}: {tool.description}") 14 | ``` 15 | 16 | ```output 17 | model_download_counter: 这是一个工具,可以返回 Hugging Face Hub 上给定任务中下载量最高的模型。它接受类别的名称(例如文本分类、深度估计等),并返回检查点的名称。 18 | ``` 19 | 20 | ```python 21 | tool.run("text-classification") 22 | ``` 23 | 24 | ```output 25 | 'facebook/bart-large-mnli' 26 | ``` -------------------------------------------------------------------------------- /docs/integrations/tools/mojeek_search.md: -------------------------------------------------------------------------------- 1 | # Mojeek 搜索 2 | 3 | 以下笔记将解释如何使用 Mojeek 搜索获取结果。请访问 [Mojeek 网站](https://www.mojeek.com/services/search/web-search-api/) 获取 API 密钥。 4 | 5 | ```python 6 | from langchain_community.tools import MojeekSearch 7 | ``` 8 | 9 | ```python 10 | api_key = "KEY" # 从 Mojeek 网站获取 11 | ``` 12 | 13 | ```python 14 | search = MojeekSearch.config(api_key=api_key, search_kwargs={"t": 10}) 15 | ``` 16 | 17 | 在 `search_kwargs` 中,您可以添加任何您在 [Mojeek 文档](https://www.mojeek.com/support/api/search/request_parameters.html) 中找到的搜索参数。 18 | 19 | ```python 20 | search.run("mojeek") 21 | ``` -------------------------------------------------------------------------------- /docs/integrations/tools/python.md: -------------------------------------------------------------------------------- 1 | # Python REPL 2 | 3 | 有时,对于复杂的计算,与其让 LLM 直接生成答案,让 LLM 生成计算答案的代码,然后运行该代码以获得答案可能更好。为了方便这样做,我们提供了一个简单的 Python REPL 来执行命令。 4 | 5 | 此接口只会返回被打印出来的内容 - 因此,如果你想用它来计算一个答案,请确保让它打印出答案。 6 | 7 | ```python 8 | from langchain_core.tools import Tool 9 | from langchain_experimental.utilities import PythonREPL 10 | ``` 11 | 12 | ```python 13 | python_repl = PythonREPL() 14 | ``` 15 | 16 | ```python 17 | python_repl.run("print(1+1)") 18 | ``` 19 | 20 | ```output 21 | Python REPL 可以执行任意代码。请谨慎使用。 22 | ``` 23 | 24 | ```output 25 | '2\n' 26 | ``` 27 | 28 | ```python 29 | # 你可以创建一个工具来传递给一个代理 30 | repl_tool = Tool( 31 | name="python_repl", 32 | description="一个 Python shell。使用它来执行 Python 命令。输入应该是一个有效的 Python 命令。如果你想看到一个值的输出,你应该用 `print(...)` 来打印出来。", 33 | func=python_repl.run, 34 | ) 35 | ``` -------------------------------------------------------------------------------- /docs/integrations/tools/stackexchange.md: -------------------------------------------------------------------------------- 1 | # StackExchange 2 | 3 | >[Stack Exchange](https://stackexchange.com/) 是一个涵盖各个领域主题的问答网站网络,每个网站都涵盖特定的主题,用户可以在这些网站上提问、回答问题,并且通过声望奖励机制进行评价。这个声望系统使得网站能够自我管理。 4 | 5 | ``StackExchange`` 组件将 StackExchange API 集成到 LangChain 中,使得可以访问 Stack Exchange 网络中的 [StackOverflow](https://stackoverflow.com/) 网站。Stack Overflow 主要关注计算机编程。 6 | 7 | 本文介绍如何使用 ``StackExchange`` 组件。 8 | 9 | 首先,我们需要安装实现了 Stack Exchange API 的 Python 包 stackapi。 10 | 11 | ```python 12 | pip install --upgrade stackapi 13 | ``` 14 | 15 | ```python 16 | from langchain_community.utilities import StackExchangeAPIWrapper 17 | stackexchange = StackExchangeAPIWrapper() 18 | stackexchange.run("zsh: command not found: python") 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/integrations/tools/wolfram_alpha.md: -------------------------------------------------------------------------------- 1 | # Wolfram Alpha 2 | 3 | 本笔记介绍如何使用 Wolfram Alpha 组件。 4 | 5 | 首先,您需要设置您的 Wolfram Alpha 开发者账户并获取您的 APP ID: 6 | 7 | 1. 前往 [这里](https://developer.wolframalpha.com/) 的 Wolfram Alpha 网站注册开发者账户 8 | 9 | 2. 创建一个应用并获取您的 APP ID 10 | 11 | 3. 运行 `pip install wolframalpha` 安装 Wolfram Alpha Python 包 12 | 13 | 然后,我们需要设置一些环境变量: 14 | 15 | 1. 将您的 APP ID 保存到 WOLFRAM_ALPHA_APPID 环境变量中 16 | 17 | ```python 18 | pip install wolframalpha 19 | ``` 20 | 21 | ```python 22 | import os 23 | os.environ["WOLFRAM_ALPHA_APPID"] = "您的APP ID" 24 | ``` 25 | 26 | ```python 27 | from langchain_community.utilities.wolfram_alpha import WolframAlphaAPIWrapper 28 | ``` 29 | 30 | ```python 31 | wolfram = WolframAlphaAPIWrapper() 32 | ``` 33 | 34 | ```python 35 | wolfram.run("What is 2x+5 = -3x + 7?") 36 | ``` 37 | 38 | ```output 39 | 'x = 2/5' 40 | ``` -------------------------------------------------------------------------------- /docs/integrations/vectorstores/duckdb.md: -------------------------------------------------------------------------------- 1 | # DuckDB 2 | 3 | 本笔记展示了如何将 `DuckDB` 用作向量存储。 4 | 5 | ```python 6 | ! pip install duckdb 7 | ``` 8 | 9 | 我们想要使用 OpenAIEmbeddings,因此我们需要获取 OpenAI API 密钥。 10 | 11 | ```python 12 | import getpass 13 | import os 14 | os.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API 密钥:") 15 | ``` 16 | 17 | ```python 18 | from langchain.vectorstores import DuckDB 19 | from langchain_openai import OpenAIEmbeddings 20 | ``` 21 | 22 | ```python 23 | from langchain_community.document_loaders import TextLoader 24 | from langchain_text_splitters import CharacterTextSplitter 25 | loader = TextLoader("../../how_to/state_of_the_union.txt") 26 | documents = loader.load() 27 | documents = CharacterTextSplitter().split_documents(documents) 28 | embeddings = OpenAIEmbeddings() 29 | ``` 30 | 31 | ```python 32 | docsearch = DuckDB.from_documents(documents, embeddings) 33 | query = "总统对Ketanji Brown Jackson有什么评论" 34 | docs = docsearch.similarity_search(query) 35 | ``` 36 | 37 | ```python 38 | print(docs[0].page_content) 39 | ``` -------------------------------------------------------------------------------- /docs/people.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | hide_table_of_contents: true 3 | --- 4 | 5 | import People from "@theme/People"; 6 | 7 | 8 | 9 | # 人物 10 | 11 | 世界各地有一些令人难以置信的人,他们对LangChain社区的繁荣发展起到了重要作用🌐! 12 | 13 | 本页面重点介绍了一些为开源仓库做出直接贡献和审查的人员。 14 | 15 | ## 顶级审查者 16 | 17 | 随着LangChain的发展,维护者所涵盖的范围也在不断扩大。 18 | 19 | 感谢以下人员在审查PR时的出色表现🙏! 20 | 21 | 22 | 23 | ## 最近顶级贡献者 24 | 25 | 以下列表包含了在过去三个月中合并的PR数量最多的贡献者,根据影响力(不完美地)加权。 26 | 27 | 非常感谢你们在改进LangChain方面所付出的时间和努力 ❤️! 28 | 29 | 30 | 31 | ## 核心维护者 32 | 33 | 大家好👋! 34 | 35 | 我们是LangChain的核心维护者。如果你在社区中花费了时间,可能已经与我们中的至少一位交叉过。 36 | 37 | 38 | 39 | ## 历史最佳贡献者 40 | 41 | 最后,这是一个有关为该框架做出重大贡献的历史榜单🌟: 42 | 43 | 44 | 45 | 我们非常感谢你们的支持! 46 | 47 | 还要感谢[@tiangolo](https://github.com/tiangolo)通过FastAPI的[出色人物页面](https://fastapi.tiangolo.com/fastapi-people)给予的灵感。 -------------------------------------------------------------------------------- /docs/tutorials/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | sidebar_position: 0 4 | 5 | sidebar_class_name: hidden 6 | 7 | --- 8 | 9 | # 教程 10 | 11 | 是第一次接触 LangChain 或 LLM 应用开发吗?阅读这些材料,快速上手。 12 | 13 | ### 基础 14 | 15 | - [构建简单的 LLM 应用](/docs/tutorials/llm_chain) 16 | 17 | - [构建聊天机器人](/docs/tutorials/chatbot) 18 | 19 | - [构建向量存储和检索器](/docs/tutorials/retrievers) 20 | 21 | - [构建一个代理](/docs/tutorials/agents) 22 | 23 | ### 外部知识处理 24 | 25 | - [构建一个检索增强生成(RAG)应用](/docs/tutorials/rag) 26 | 27 | - [构建一个对话式 RAG 应用](/docs/tutorials/qa_chat_history) 28 | 29 | - [构建一个基于 SQL 数据的问答系统](/docs/tutorials/sql_qa) 30 | 31 | - [构建一个查询分析系统](/docs/tutorials/query_analysis) 32 | 33 | - [构建一个本地 RAG 应用](/docs/tutorials/local_rag) 34 | 35 | - [构建一个基于图数据库的问答应用](/docs/tutorials/graph) 36 | 37 | ### 专业任务 38 | 39 | - [构建一个提取链](/docs/tutorials/extraction) 40 | 41 | - [生成合成数据](/docs/tutorials/data_generation) 42 | 43 | - [将文本分类为标签](/docs/tutorials/classification) 44 | 45 | - [文本摘要](/docs/tutorials/summarization) 46 | 47 | 查看更多教程,请访问我们的[菜谱部分](https://github.com/langchain-ai/langchain/tree/master/cookbook)。 -------------------------------------------------------------------------------- /src/pages/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | */ 9 | 10 | import React from "react"; 11 | import { Redirect } from "@docusaurus/router"; 12 | import useBaseUrl from "@docusaurus/useBaseUrl"; 13 | 14 | export default function Home() { 15 | return ; 16 | } 17 | -------------------------------------------------------------------------------- /src/theme/Columns.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export function ColumnContainer({children}) { 4 | return ( 5 |
6 | {children} 7 |
8 | ) 9 | } 10 | 11 | export function Column({children}) { 12 | return ( 13 |
14 | {children} 15 |
16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /src/theme/DocItem/Content/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Content from "@theme-original/DocItem/Content"; 3 | import Feedback from "../../Feedback"; 4 | 5 | export default function ContentWrapper(props) { 6 | return ( 7 | <> 8 | {/* eslint-disable react/jsx-props-no-spreading */} 9 | 10 | 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /src/theme/DocPaginator/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import DocPaginator from "@theme-original/DocPaginator"; 3 | 4 | const BLACKLISTED_PATHS = ["/docs/how_to/", "/docs/tutorials/"]; 5 | 6 | export default function DocPaginatorWrapper(props) { 7 | const [shouldHide, setShouldHide] = React.useState(false); 8 | 9 | React.useEffect(() => { 10 | if (typeof window === "undefined") return; 11 | const currentPath = window.location.pathname; 12 | if (BLACKLISTED_PATHS.some((path) => currentPath.includes(path))) { 13 | setShouldHide(true); 14 | } 15 | }, []); 16 | 17 | if (!shouldHide) { 18 | // eslint-disable-next-line react/jsx-props-no-spreading 19 | return ; 20 | } 21 | return null; 22 | } 23 | -------------------------------------------------------------------------------- /static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/.nojekyll -------------------------------------------------------------------------------- /static/fonts/Manrope-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/fonts/Manrope-VariableFont_wght.ttf -------------------------------------------------------------------------------- /static/fonts/PublicSans-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/fonts/PublicSans-VariableFont_wght.ttf -------------------------------------------------------------------------------- /static/img/ApifyActors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/ApifyActors.png -------------------------------------------------------------------------------- /static/img/HeliconeDashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/HeliconeDashboard.png -------------------------------------------------------------------------------- /static/img/HeliconeKeys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/HeliconeKeys.png -------------------------------------------------------------------------------- /static/img/MetalDash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/MetalDash.png -------------------------------------------------------------------------------- /static/img/OSS_LLM_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/OSS_LLM_overview.png -------------------------------------------------------------------------------- /static/img/ReAct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/ReAct.png -------------------------------------------------------------------------------- /static/img/RemembrallDashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/RemembrallDashboard.png -------------------------------------------------------------------------------- /static/img/SQLDatabaseToolkit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/SQLDatabaseToolkit.png -------------------------------------------------------------------------------- /static/img/agent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/agent.png -------------------------------------------------------------------------------- /static/img/agents_use_case_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/agents_use_case_1.png -------------------------------------------------------------------------------- /static/img/agents_use_case_trace_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/agents_use_case_trace_1.png -------------------------------------------------------------------------------- /static/img/agents_use_case_trace_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/agents_use_case_trace_2.png -------------------------------------------------------------------------------- /static/img/agents_vs_chains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/agents_vs_chains.png -------------------------------------------------------------------------------- /static/img/api_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/api_chain.png -------------------------------------------------------------------------------- /static/img/api_chain_response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/api_chain_response.png -------------------------------------------------------------------------------- /static/img/api_function_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/api_function_call.png -------------------------------------------------------------------------------- /static/img/api_use_case.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/api_use_case.png -------------------------------------------------------------------------------- /static/img/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/apple-touch-icon.png -------------------------------------------------------------------------------- /static/img/brand/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/brand/favicon.png -------------------------------------------------------------------------------- /static/img/brand/theme-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/brand/theme-image.png -------------------------------------------------------------------------------- /static/img/brand/wordmark-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/brand/wordmark-dark.png -------------------------------------------------------------------------------- /static/img/brand/wordmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/brand/wordmark.png -------------------------------------------------------------------------------- /static/img/chat_use_case.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/chat_use_case.png -------------------------------------------------------------------------------- /static/img/chat_use_case_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/chat_use_case_2.png -------------------------------------------------------------------------------- /static/img/code_retrieval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/code_retrieval.png -------------------------------------------------------------------------------- /static/img/code_understanding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/code_understanding.png -------------------------------------------------------------------------------- /static/img/contextual_compression.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/contextual_compression.jpg -------------------------------------------------------------------------------- /static/img/conversational_retrieval_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/conversational_retrieval_chain.png -------------------------------------------------------------------------------- /static/img/cpal_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/cpal_diagram.png -------------------------------------------------------------------------------- /static/img/create_sql_query_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/create_sql_query_chain.png -------------------------------------------------------------------------------- /static/img/data_connection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/data_connection.jpg -------------------------------------------------------------------------------- /static/img/extraction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/extraction.png -------------------------------------------------------------------------------- /static/img/extraction_trace_few_shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/extraction_trace_few_shot.png -------------------------------------------------------------------------------- /static/img/extraction_trace_function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/extraction_trace_function.png -------------------------------------------------------------------------------- /static/img/extraction_trace_parsing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/extraction_trace_parsing.png -------------------------------------------------------------------------------- /static/img/extraction_trace_tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/extraction_trace_tool.png -------------------------------------------------------------------------------- /static/img/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/favicon-16x16.png -------------------------------------------------------------------------------- /static/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/favicon-32x32.png -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/google_generative_ai_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/google_generative_ai_1.jpg -------------------------------------------------------------------------------- /static/img/google_imagen_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/google_imagen_1.png -------------------------------------------------------------------------------- /static/img/google_imagen_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/google_imagen_2.png -------------------------------------------------------------------------------- /static/img/google_imagen_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/google_imagen_3.png -------------------------------------------------------------------------------- /static/img/google_imagen_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/google_imagen_4.png -------------------------------------------------------------------------------- /static/img/google_vertex_ai_palm_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/google_vertex_ai_palm_1.png -------------------------------------------------------------------------------- /static/img/graph_chain.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/graph_chain.webp -------------------------------------------------------------------------------- /static/img/graph_construction1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/graph_construction1.png -------------------------------------------------------------------------------- /static/img/graph_construction2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/graph_construction2.png -------------------------------------------------------------------------------- /static/img/graph_semantic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/graph_semantic.png -------------------------------------------------------------------------------- /static/img/graph_usecase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/graph_usecase.png -------------------------------------------------------------------------------- /static/img/jupyter_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/jupyter_screen.png -------------------------------------------------------------------------------- /static/img/langchain_stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/langchain_stack.png -------------------------------------------------------------------------------- /static/img/llama-memory-weights.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/llama-memory-weights.png -------------------------------------------------------------------------------- /static/img/llama_t_put.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/llama_t_put.png -------------------------------------------------------------------------------- /static/img/map_reduce.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/map_reduce.jpg -------------------------------------------------------------------------------- /static/img/map_rerank.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/map_rerank.jpg -------------------------------------------------------------------------------- /static/img/memory_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/memory_diagram.png -------------------------------------------------------------------------------- /static/img/model_io.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/model_io.jpg -------------------------------------------------------------------------------- /static/img/multi_vector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/multi_vector.png -------------------------------------------------------------------------------- /static/img/npm_run_serve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/npm_run_serve.png -------------------------------------------------------------------------------- /static/img/oai_function_agent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/oai_function_agent.png -------------------------------------------------------------------------------- /static/img/ollama_example_img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/ollama_example_img.jpg -------------------------------------------------------------------------------- /static/img/open_clip_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/open_clip_1.png -------------------------------------------------------------------------------- /static/img/open_clip_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/open_clip_2.png -------------------------------------------------------------------------------- /static/img/parrot-chainlink-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/parrot-chainlink-icon.png -------------------------------------------------------------------------------- /static/img/parrot-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/parrot-icon.png -------------------------------------------------------------------------------- /static/img/portkey-dashboard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/portkey-dashboard.gif -------------------------------------------------------------------------------- /static/img/portkey-tracing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/portkey-tracing.png -------------------------------------------------------------------------------- /static/img/qa_data_load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/qa_data_load.png -------------------------------------------------------------------------------- /static/img/qa_intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/qa_intro.png -------------------------------------------------------------------------------- /static/img/qa_privacy_protection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/qa_privacy_protection.png -------------------------------------------------------------------------------- /static/img/qrcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/qrcode.jpg -------------------------------------------------------------------------------- /static/img/query_analysis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/query_analysis.png -------------------------------------------------------------------------------- /static/img/rag_indexing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/rag_indexing.png -------------------------------------------------------------------------------- /static/img/rag_retrieval_generation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/rag_retrieval_generation.png -------------------------------------------------------------------------------- /static/img/refine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/refine.jpg -------------------------------------------------------------------------------- /static/img/run_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/run_details.png -------------------------------------------------------------------------------- /static/img/screen1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/screen1.png -------------------------------------------------------------------------------- /static/img/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/screenshot.png -------------------------------------------------------------------------------- /static/img/self_querying.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/self_querying.jpg -------------------------------------------------------------------------------- /static/img/sql_usecase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/sql_usecase.png -------------------------------------------------------------------------------- /static/img/sqldbchain_trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/sqldbchain_trace.png -------------------------------------------------------------------------------- /static/img/stuff.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/stuff.jpg -------------------------------------------------------------------------------- /static/img/summarization_use_case_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/summarization_use_case_1.png -------------------------------------------------------------------------------- /static/img/summarization_use_case_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/summarization_use_case_2.png -------------------------------------------------------------------------------- /static/img/summarization_use_case_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/summarization_use_case_3.png -------------------------------------------------------------------------------- /static/img/summary_chains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/summary_chains.png -------------------------------------------------------------------------------- /static/img/tagging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/tagging.png -------------------------------------------------------------------------------- /static/img/tagging_trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/tagging_trace.png -------------------------------------------------------------------------------- /static/img/vector_stores.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/vector_stores.jpg -------------------------------------------------------------------------------- /static/img/web_research.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/web_research.png -------------------------------------------------------------------------------- /static/img/web_scraping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/web_scraping.png -------------------------------------------------------------------------------- /static/img/wsj_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/wsj_page.png -------------------------------------------------------------------------------- /static/img/yarn_install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/yarn_install.png -------------------------------------------------------------------------------- /static/img/yarn_run_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aidoczh/langchain-doc-zh/b26eec34c0e8016c5bb67816e14ae6b9497b0028/static/img/yarn_run_start.png -------------------------------------------------------------------------------- /static/js/google_analytics.js: -------------------------------------------------------------------------------- 1 | window.dataLayer = window.dataLayer || []; 2 | function gtag(){dataLayer.push(arguments);} 3 | gtag('js', new Date()); 4 | 5 | gtag('config', 'G-9B66JQQH2F'); 6 | -------------------------------------------------------------------------------- /vercel_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | make install-vercel-deps 6 | 7 | make build 8 | 9 | rm -rf docs 10 | mv build/output-new/docs ./ 11 | -------------------------------------------------------------------------------- /vercel_requirements.txt: -------------------------------------------------------------------------------- 1 | -e ../libs/core 2 | -e ../libs/langchain 3 | -e ../libs/community 4 | -e ../libs/experimental 5 | -e ../libs/text-splitters 6 | langchain-cohere 7 | langchain-astradb 8 | langchain-nvidia-ai-endpoints 9 | langchain-elasticsearch 10 | urllib3==1.26.18 11 | nbconvert==7.16.4 12 | --------------------------------------------------------------------------------