LangChain - classes


说明

LangChain 发展越来越大,但从范例难以窥全貌,这样学起来云里雾里。
这里整理了它的类,方便查看使用。

基于 0.1.13 版本


官方文档:https://python.langchain.com/docs/get_started/introduction


langchain

help(langchain) 

PACKAGE CONTENTS

  • _api (package)
  • adapters (package) w
  • agents (package)
  • base_language
  • cache
  • callbacks (package)
  • chains (package)
  • chat_loaders (package)
  • chat_models (package)
  • docstore (package)
  • document_loaders (package)
  • document_transformers (package)
  • embeddings (package)
  • env
  • evaluation (package)
  • example_generator
  • formatting
  • globals (package)
  • graphs (package)
  • hub
  • indexes (package)
  • input
  • llms (package)
  • load (package)
  • memory (package)
  • model_laboratory
  • output_parsers (package)
  • prompts (package)
  • pydantic_v1 (package)
  • python
  • requests
  • retrievers (package)
  • runnables (package)
  • schema (package)
  • serpapi
  • smith (package)
  • sql_database
  • storage (package)
  • text_splitter
  • tools (package)
  • utilities (package)
  • utils (package)
  • vectorstores (package)

agents


PACKAGE CONTENTS

  • agent
  • agent_iterator
  • agent_toolkits (package)
  • agent_types
  • chat (package)
  • conversational (package)
  • conversational_chat (package)
  • format_scratchpad (package)
  • initialize
  • json_chat (package)
  • load_tools
  • loading
  • mrkl (package)
  • openai_assistant (package)
  • openai_functions_agent (package)
  • openai_functions_multi_agent (package)
  • openai_tools (package)
  • output_parsers (package)
  • react (package)
  • schema
  • self_ask_with_search (package)
  • structured_chat (package)
  • tools
  • types
  • utils
  • xml (package)

CLASSES

  • builtins.object
    • langchain.agents.agent_iterator.AgentExecutorIterator
  • builtins.str(builtins.object)
    • langchain.agents.agent_types.AgentType(builtins.str, enum.Enum)
  • enum.Enum(builtins.object)
    • langchain.agents.agent_types.AgentType(builtins.str, enum.Enum)
  • langchain.agents.react.base.ReActDocstoreAgent(langchain.agents.agent.Agent)
    • langchain.agents.react.base.ReActTextWorldAgent
  • langchain.chains.base.Chain(langchain_core.runnables.base.RunnableSerializable, abc.ABC)
    • langchain.agents.agent.AgentExecutor
      • langchain.agents.mrkl.base.MRKLChain
      • langchain.agents.react.base.ReActChain
      • langchain.agents.self_ask_with_search.base.SelfAskWithSearchChain
  • langchain_core.output_parsers.base.BaseOutputParser(langchain_core.output_parsers.base.BaseLLMOutputParser, langchain_core.runnables.base.RunnableSerializable)
    • langchain.agents.agent.AgentOutputParser
  • langchain_core.tools.BaseTool(langchain_core.runnables.base.RunnableSerializable)
    • langchain_core.tools.Tool
  • pydantic.v1.main.BaseModel(pydantic.v1.utils.Representation)
    • langchain.agents.agent.BaseMultiActionAgent
      • langchain.agents.openai_functions_multi_agent.base.OpenAIMultiFunctionsAgent
    • langchain.agents.agent.BaseSingleActionAgent
      • langchain.agents.agent.Agent
        • langchain.agents.conversational.base.ConversationalAgent
        • langchain.agents.conversational_chat.base.ConversationalChatAgent
        • langchain.agents.mrkl.base.ZeroShotAgent
        • langchain.agents.structured_chat.base.StructuredChatAgent
      • langchain.agents.agent.LLMSingleActionAgent
      • langchain.agents.openai_functions_agent.base.OpenAIFunctionsAgent
      • langchain.agents.xml.base.XMLAgent

cache

Help on module langchain.cache in langchain:


CLASSES

  • langchain_community.cache._RedisCacheBase(langchain_core.caches.BaseCache, abc.ABC)
    • langchain_community.cache.RedisCache
  • langchain_core.caches.BaseCache(abc.ABC)
    • langchain_community.cache.AstraDBCache
    • langchain_community.cache.AstraDBSemanticCache
    • langchain_community.cache.CassandraCache
    • langchain_community.cache.CassandraSemanticCache
    • langchain_community.cache.GPTCache
    • langchain_community.cache.InMemoryCache
    • langchain_community.cache.MomentoCache
    • langchain_community.cache.RedisSemanticCache
    • langchain_community.cache.SQLAlchemyCache
      • langchain_community.cache.SQLiteCache
    • langchain_community.cache.SQLAlchemyMd5Cache
    • langchain_community.cache.UpstashRedisCache
  • sqlalchemy.orm.decl_api.Base(builtins.object)
    • langchain_community.cache.FullLLMCache
    • langchain_community.cache.FullMd5LLMCache

callbacks

Help on package langchain.callbacks in langchain:


NAME

langchain.callbacks -Callback handlers allow listening to events in LangChain.


DESCRIPTION


Class hierarchy:

… code-block::

​ BaseCallbackHandler --> CallbackHandler # Example: AimCallbackHandler


PACKAGE CONTENTS

  • aim_callback
  • argilla_callback
  • arize_callback
  • arthur_callback
  • base
  • clearml_callback
  • comet_ml_callback
  • confident_callback
  • context_callback
  • file
  • flyte_callback
  • human
  • infino_callback
  • labelstudio_callback
  • llmonitor_callback
  • manager
  • mlflow_callback
  • openai_info
  • promptlayer_callback
  • sagemaker_callback
  • stdout
  • streaming_aiter
  • streaming_aiter_final_only
  • streaming_stdout
  • streaming_stdout_final_only
  • streamlit (package)
  • tracers (package)
  • trubrics_callback
  • utils
  • wandb_callback
  • whylabs_callback

CLASSES

  • langchain_core.callbacks.base.AsyncCallbackHandler(langchain_core.callbacks.base.BaseCallbackHandler)
    • langchain.callbacks.streaming_aiter.AsyncIteratorCallbackHandler
  • langchain_core.callbacks.base.BaseCallbackHandler(langchain_core.callbacks.base.LLMManagerMixin, langchain_core.callbacks.base.ChainManagerMixin, langchain_core.callbacks.base.ToolManagerMixin, langchain_core.callbacks.base.RetrieverManagerMixin, langchain_core.callbacks.base.CallbackManagerMixin, langchain_core.callbacks.base.RunManagerMixin)
    • langchain.callbacks.file.FileCallbackHandler
    • langchain_core.callbacks.stdout.StdOutCallbackHandler
    • langchain_core.callbacks.streaming_stdout.StreamingStdOutCallbackHandler
      • langchain.callbacks.streaming_stdout_final_only.FinalStreamingStdOutCallbackHandler
  • langchain_core.tracers.base.BaseTracer(langchain_core.callbacks.base.BaseCallbackHandler, abc.ABC)
    • langchain_core.tracers.langchain.LangChainTracer

memory


PACKAGE CONTENTS

  • buffer
  • buffer_window
  • chat_memory
  • chat_message_histories (package)
  • combined
  • entity
  • kg
  • motorhead_memory
  • prompt
  • readonly
  • simple
  • summary
  • summary_buffer
  • token_buffer
  • utils
  • vectorstore
  • zep_memory

CLASSES

  • langchain.memory.chat_memory.BaseChatMemory(langchain_core.memory.BaseMemory, abc.ABC)
    • langchain.memory.buffer.ConversationBufferMemory
      • langchain.memory.zep_memory.ZepMemory
    • langchain.memory.buffer_window.ConversationBufferWindowMemory
    • langchain.memory.entity.ConversationEntityMemory
    • langchain.memory.kg.ConversationKGMemory
    • langchain.memory.motorhead_memory.MotorheadMemory
    • langchain.memory.summary.ConversationSummaryMemory(langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin)
    • langchain.memory.summary_buffer.ConversationSummaryBufferMemory(langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin)
    • langchain.memory.token_buffer.ConversationTokenBufferMemory
  • langchain.memory.entity.BaseEntityStore(pydantic.v1.main.BaseModel, abc.ABC)
    • langchain.memory.entity.InMemoryEntityStore
    • langchain.memory.entity.RedisEntityStore
    • langchain.memory.entity.SQLiteEntityStore
    • langchain.memory.entity.UpstashRedisEntityStore
  • langchain.memory.summary.SummarizerMixin(pydantic.v1.main.BaseModel)
    • langchain.memory.summary.ConversationSummaryMemory(langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin)
    • langchain.memory.summary_buffer.ConversationSummaryBufferMemory(langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin)
  • langchain_core.chat_history.BaseChatMessageHistory(abc.ABC)
    • langchain_community.chat_message_histories.astradb.AstraDBChatMessageHistory
    • langchain_community.chat_message_histories.cassandra.CassandraChatMessageHistory
    • langchain_community.chat_message_histories.cosmos_db.CosmosDBChatMessageHistory
    • langchain_community.chat_message_histories.dynamodb.DynamoDBChatMessageHistory
    • langchain_community.chat_message_histories.elasticsearch.ElasticsearchChatMessageHistory
    • langchain_community.chat_message_histories.file.FileChatMessageHistory
    • langchain_community.chat_message_histories.in_memory.ChatMessageHistory(langchain_core.chat_history.BaseChatMessageHistory, pydantic.v1.main.BaseModel)
    • langchain_community.chat_message_histories.momento.MomentoChatMessageHistory
    • langchain_community.chat_message_histories.mongodb.MongoDBChatMessageHistory
    • langchain_community.chat_message_histories.postgres.PostgresChatMessageHistory
    • langchain_community.chat_message_histories.redis.RedisChatMessageHistory
    • langchain_community.chat_message_histories.singlestoredb.SingleStoreDBChatMessageHistory
    • langchain_community.chat_message_histories.sql.SQLChatMessageHistory
    • langchain_community.chat_message_histories.streamlit.StreamlitChatMessageHistory
    • langchain_community.chat_message_histories.upstash_redis.UpstashRedisChatMessageHistory
    • langchain_community.chat_message_histories.xata.XataChatMessageHistory
    • langchain_community.chat_message_histories.zep.ZepChatMessageHistory
  • langchain_core.memory.BaseMemory(langchain_core.load.serializable.Serializable, abc.ABC)
    • langchain.memory.buffer.ConversationStringBufferMemory
    • langchain.memory.combined.CombinedMemory
    • langchain.memory.readonly.ReadOnlySharedMemory
    • langchain.memory.simple.SimpleMemory
    • langchain.memory.vectorstore.VectorStoreRetrieverMemory
  • pydantic.v1.main.BaseModel(pydantic.v1.utils.Representation)
    • langchain_community.chat_message_histories.in_memory.ChatMessageHistory(langchain_core.chat_history.BaseChatMessageHistory, pydantic.v1.main.BaseModel)


PACKAGE CONTENTS

  • amadeus (package)
  • arxiv (package)
  • base
  • bearly (package)
  • bing_search (package)
  • brave_search (package)
  • clickup (package)
  • convert_to_openai
  • dataforseo_api_search (package)
  • ddg_search (package)
  • e2b_data_analysis (package)
  • edenai (package)
  • eleven_labs (package)
  • file_management (package)
  • github (package)
  • gitlab (package)
  • gmail (package)
  • golden_query (package)
  • google_cloud (package)
  • google_finance (package)
  • google_jobs (package)
  • google_lens (package)
  • google_places (package)
  • google_scholar (package)
  • google_search (package)
  • google_trends (package)
  • graphql (package)
  • human (package)
  • ifttt
  • interaction (package)
  • jira (package)
  • json (package)
  • memorize (package)
  • merriam_webster (package)
  • metaphor_search (package)
  • multion (package)
  • nasa (package)
  • nuclia (package)
  • office365 (package)
  • openapi (package)
  • openweathermap (package)
  • playwright (package)
  • plugin
  • powerbi (package)
  • pubmed (package)
  • python (package)
  • reddit_search (package)
  • render
  • requests (package)
  • retriever
  • scenexplain (package)
  • searchapi (package)
  • searx_search (package)
  • shell (package)
  • slack (package)
  • sleep (package)
  • spark_sql (package)
  • sql_database (package)
  • stackexchange (package)
  • steam (package)
  • steamship_image_generation (package)
  • tavily_search (package)
  • vectorstore (package)
  • wikipedia (package)
  • wolfram_alpha (package)
  • yahoo_finance_news
  • youtube (package)
  • zapier (package)

CLASSES

  • langchain_core.runnables.base.RunnableSerializable(langchain_core.load.serializable.Serializable, langchain_core.runnables.base.Runnable)
    • langchain_core.tools.BaseTool
      • langchain_core.tools.StructuredTool
      • langchain_core.tools.Tool

chat_loaders

Load chat messages from various communications platforms such as Facebook Messenger, Telegram, and WhatsApp. The loaded chat messages can be used for fine-tuning models.


Class hierarchy:

… code-block::

​ BaseChatLoader --> ChatLoader # Examples: WhatsAppChatLoader, IMessageChatLoader


Main helpers:

… code-block::

​ ChatSession


PACKAGE CONTENTS

  • base
  • facebook_messenger
  • gmail
  • imessage
  • langsmith
  • slack
  • telegram
  • utils
  • whatsapp

chat_models


NAME

langchain.chat_models -Chat Models are a variation on language models.


DESCRIPTION

While Chat Models use language models under the hood, the interface they expose is a bit different. Rather than expose a “text in, text out” API, they expose an interface where “chat messages” are the inputs and outputs.


Class hierarchy:

… code-block::

​ BaseLanguageModel --> BaseChatModel --> # Examples: ChatOpenAI, ChatGooglePalm


Main helpers:

… code-block::

​ AIMessage, BaseMessage, HumanMessage


PACKAGE CONTENTS

  • anthropic
  • anyscale
  • azure_openai
  • azureml_endpoint
  • baichuan
  • baidu_qianfan_endpoint
  • base
  • bedrock
  • cohere
  • databricks
  • ernie
  • everlyai
  • fake
  • fireworks
  • gigachat
  • google_palm
  • human
  • hunyuan
  • javelin_ai_gateway
  • jinachat
  • konko
  • litellm
  • meta
  • minimax
  • mlflow
  • mlflow_ai_gateway
  • ollama
  • openai
  • pai_eas_endpoint
  • promptlayer_openai
  • tongyi
  • vertexai
  • volcengine_maas
  • yandex

docstore

Help on package langchain.docstore in langchain:


NAME

langchain.docstore -Docstores are classes to store and load Documents.


DESCRIPTION

The Docstore is a simplified version of the Document Loader.


Class hierarchy:

… code-block::

​ Docstore --> # Examples: InMemoryDocstore, Wikipedia


Main helpers:

… code-block::

​ Document, AddableMixin


PACKAGE CONTENTS

  • arbitrary_fn
  • base
  • document
  • in_memory
  • wikipedia

document_loaders

help(langchain_community.document_loaders) 

PACKAGE CONTENTS

  • acreom
  • airbyte
  • airbyte_json
  • airtable
  • apify_dataset
  • arcgis_loader
  • arxiv
  • assemblyai
  • astradb
  • async_html
  • athena
  • azlyrics
  • azure_ai_data
  • azure_blob_storage_container
  • azure_blob_storage_file
  • baiducloud_bos_directory
  • baiducloud_bos_file
  • base
  • base_o365
  • bibtex
  • bigquery
  • bilibili
  • blackboard
  • blob_loaders (package)
  • blockchain
  • brave_search
  • browserless
  • cassandra
  • chatgpt
  • chm
  • chromium
  • college_confidential
  • concurrent
  • confluence
  • conllu
  • couchbase
  • csv_loader
  • cube_semantic
  • datadog_logs
  • dataframe
  • diffbot
  • directory
  • discord
  • doc_intelligence
  • docugami
  • docusaurus
  • dropbox
  • duckdb_loader
  • email
  • epub
  • etherscan
  • evernote
  • excel
  • facebook_chat
  • fauna
  • figma
  • gcs_directory
  • gcs_file
  • generic
  • geodataframe
  • git
  • gitbook
  • github
  • google_speech_to_text
  • googledrive
  • gutenberg
  • helpers
  • hn
  • html
  • html_bs
  • hugging_face_dataset
  • hugging_face_model
  • ifixit
  • image
  • image_captions
  • imsdb
  • iugu
  • joplin
  • json_loader
  • lakefs
  • larksuite
  • markdown
  • mastodon
  • max_compute
  • mediawikidump
  • merge
  • mhtml
  • modern_treasury
  • mongodb
  • news
  • notebook
  • notion
  • notiondb
  • nuclia
  • obs_directory
  • obs_file
  • obsidian
  • odt
  • onedrive
  • onedrive_file
  • onenote
  • open_city_data
  • org_mode
  • parsers (package)
  • pdf
  • pebblo
  • polars_dataframe
  • powerpoint
  • psychic
  • pubmed
  • pyspark_dataframe
  • python
  • quip
  • readthedocs
  • recursive_url_loader
  • reddit
  • roam
  • rocksetdb
  • rspace
  • rss
  • rst
  • rtf
  • s3_directory
  • s3_file
  • sharepoint
  • sitemap
  • slack_directory
  • snowflake_loader
  • spreedly
  • sql_database
  • srt
  • stripe
  • surrealdb
  • telegram
  • tencent_cos_directory
  • tencent_cos_file
  • tensorflow_datasets
  • text
  • tidb
  • tomarkdown
  • toml
  • trello
  • tsv
  • twitter
  • unstructured
  • url
  • url_playwright
  • url_selenium
  • vsdx
  • weather
  • web_base
  • whatsapp_chat
  • wikipedia
  • word_document
  • xml
  • xorbits
  • youtube
  • yuque

document_transformers


PACKAGE CONTENTS

  • beautiful_soup_transformer
  • doctran_text_extract
  • doctran_text_qa
  • doctran_text_translate
  • embeddings_redundant_filter
  • google_translate
  • html2text
  • long_context_reorder
  • nuclia_text_transform
  • openai_functions

embeddings


PACKAGE CONTENTS

  • aleph_alpha
  • awa
  • azure_openai
  • baidu_qianfan_endpoint
  • base
  • bedrock
  • bookend
  • cache
  • clarifai
  • cloudflare_workersai
  • cohere
  • dashscope
  • databricks
  • deepinfra
  • edenai
  • elasticsearch
  • embaas
  • ernie
  • fake
  • fastembed
  • google_palm
  • gpt4all
  • gradient_ai
  • huggingface
  • huggingface_hub
  • infinity
  • javelin_ai_gateway
  • jina
  • johnsnowlabs
  • llamacpp
  • llm_rails
  • localai
  • minimax
  • mlflow
  • mlflow_gateway
  • modelscope_hub
  • mosaicml
  • nlpcloud
  • octoai_embeddings
  • ollama
  • openai
  • sagemaker_endpoint
  • self_hosted
  • self_hosted_hugging_face
  • sentence_transformer
  • spacy_embeddings
  • tensorflow_hub
  • vertexai
  • voyageai
  • xinference

CLASSES

  • langchain_core.embeddings.Embeddings(abc.ABC)
    • langchain.embeddings.cache.CacheBackedEmbeddings

evaluation


NAME

langchain.evaluation -Evaluation chains for grading LLM and Chain outputs.


DESCRIPTION

This module contains off-the-shelf evaluation chains for grading the output of LangChain primitives such as language models and chains.

Loading an evaluator to load an evaluator, you can use the :func:load_evaluators <langchain.evaluation.loading.load_evaluators> or

:func:load_evaluator <langchain.evaluation.loading.load_evaluator> functions with the

names of the evaluators to load.

… code-block:: python

​ from langchain.evaluation import load_evaluator

​ evaluator = load_evaluator(“qa”)

​ evaluator.evaluate_strings(

​ prediction=“We sold more than 40,000 units last week”,

​ input=“How many units did we sell last week?”,

​ reference=“We sold 32,378 units”,

​ )

The evaluator must be one of :class:EvaluatorType <langchain.evaluation.schema.EvaluatorType>.

Datasets to load one of the LangChain HuggingFace datasets, you can use the :func:load_dataset <langchain.evaluation.loading.load_dataset> function with the name of the dataset to load.

… code-block:: python

​ from langchain.evaluation import load_dataset

​ ds = load_dataset(“llm-math”)

Some common use cases for evaluation include:

  • Grading the accuracy of a response against ground truth answers: :class:QAEvalChain <langchain.evaluation.qa.eval_chain.QAEvalChain>
  • Comparing the output of two models: :class:PairwiseStringEvalChain <langchain.evaluation.comparison.eval_chain.PairwiseStringEvalChain> or :class:LabeledPairwiseStringEvalChain <langchain.evaluation.comparison.eval_chain.LabeledPairwiseStringEvalChain> when there is additionally a reference label.
  • Judging the efficacy of an agent’s tool usage: :class:TrajectoryEvalChain <langchain.evaluation.agents.trajectory_eval_chain.TrajectoryEvalChain>
  • Checking whether an output complies with a set of criteria: :class:CriteriaEvalChain <langchain.evaluation.criteria.eval_chain.CriteriaEvalChain> or :class:LabeledCriteriaEvalChain <langchain.evaluation.criteria.eval_chain.LabeledCriteriaEvalChain> when there is additionally a reference label.
  • Computing semantic difference between a prediction and reference: :class:EmbeddingDistanceEvalChain <langchain.evaluation.embedding_distance.base.EmbeddingDistanceEvalChain> or between two predictions: :class:PairwiseEmbeddingDistanceEvalChain <langchain.evaluation.embedding_distance.base.PairwiseEmbeddingDistanceEvalChain>
  • Measuring the string distance between a prediction and reference :class:StringDistanceEvalChain <langchain.evaluation.string_distance.base.StringDistanceEvalChain> or between two predictions :class:PairwiseStringDistanceEvalChain <langchain.evaluation.string_distance.base.PairwiseStringDistanceEvalChain>

Low-level API

These evaluators implement one of the following interfaces:

  • :class:StringEvaluator <langchain.evaluation.schema.StringEvaluator>: Evaluate a prediction string against a reference label and/or input context.
  • :class:PairwiseStringEvaluator <langchain.evaluation.schema.PairwiseStringEvaluator>: Evaluate two prediction strings against each other. Useful for scoring preferences, measuring similarity between two chain or llm agents, or comparing outputs on similar inputs.
  • :class:AgentTrajectoryEvaluator <langchain.evaluation.schema.AgentTrajectoryEvaluator> Evaluate the full sequence of actions taken by an agent.

These interfaces enable easier composability and usage within a higher level evaluation framework.


PACKAGE CONTENTS

  • agents (package)
  • comparison (package)
  • criteria (package)
  • embedding_distance (package)
  • exact_match (package)
  • loading
  • parsing (package)
  • qa (package)
  • regex_match (package)
  • schema
  • scoring (package)
  • string_distance (package)

CLASSES

  • abc.ABC(builtins.object)
    • langchain.evaluation.schema.AgentTrajectoryEvaluator(langchain.evaluation.schema._EvalArgsMixin, abc.ABC)
      • langchain.evaluation.agents.trajectory_eval_chain.TrajectoryEvalChain(langchain.evaluation.schema.AgentTrajectoryEvaluator, langchain.evaluation.schema.LLMEvalChain)
    • langchain.evaluation.schema.PairwiseStringEvaluator(langchain.evaluation.schema._EvalArgsMixin, abc.ABC)
      • langchain.evaluation.comparison.eval_chain.PairwiseStringEvalChain(langchain.evaluation.schema.PairwiseStringEvaluator, langchain.evaluation.schema.LLMEvalChain, langchain.chains.llm.LLMChain)
        • langchain.evaluation.comparison.eval_chain.LabeledPairwiseStringEvalChain
      • langchain.evaluation.embedding_distance.base.PairwiseEmbeddingDistanceEvalChain(langchain.evaluation.embedding_distance.base._EmbeddingDistanceChainMixin, langchain.evaluation.schema.PairwiseStringEvaluator)
      • langchain.evaluation.string_distance.base.PairwiseStringDistanceEvalChain(langchain.evaluation.schema.PairwiseStringEvaluator, langchain.evaluation.string_distance.base._RapidFuzzChainMixin)
    • langchain.evaluation.schema.StringEvaluator(langchain.evaluation.schema._EvalArgsMixin, abc.ABC)
      • langchain.evaluation.criteria.eval_chain.CriteriaEvalChain(langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain, langchain.chains.llm.LLMChain)
        • langchain.evaluation.criteria.eval_chain.LabeledCriteriaEvalChain
      • langchain.evaluation.embedding_distance.base.EmbeddingDistanceEvalChain(langchain.evaluation.embedding_distance.base._EmbeddingDistanceChainMixin, langchain.evaluation.schema.StringEvaluator)
      • langchain.evaluation.exact_match.base.ExactMatchStringEvaluator
      • langchain.evaluation.parsing.base.JsonEqualityEvaluator
      • langchain.evaluation.parsing.base.JsonValidityEvaluator
      • langchain.evaluation.parsing.json_distance.JsonEditDistanceEvaluator
      • langchain.evaluation.parsing.json_schema.JsonSchemaEvaluator
      • langchain.evaluation.qa.eval_chain.ContextQAEvalChain(langchain.chains.llm.LLMChain, langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain)
        • ​ langchain.evaluation.qa.eval_chain.CotQAEvalChain
      • langchain.evaluation.qa.eval_chain.QAEvalChain(langchain.chains.llm.LLMChain, langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain)
      • langchain.evaluation.regex_match.base.RegexMatchStringEvaluator
      • langchain.evaluation.scoring.eval_chain.ScoreStringEvalChain(langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain, langchain.chains.llm.LLMChain)
        • langchain.evaluation.scoring.eval_chain.LabeledScoreStringEvalChain
      • langchain.evaluation.string_distance.base.StringDistanceEvalChain(langchain.evaluation.schema.StringEvaluator, langchain.evaluation.string_distance.base._RapidFuzzChainMixin)
  • builtins.str(builtins.object)
    • langchain.evaluation.criteria.eval_chain.Criteria(builtins.str, enum.Enum)
    • langchain.evaluation.embedding_distance.base.EmbeddingDistance(builtins.str, enum.Enum)
    • langchain.evaluation.schema.EvaluatorType(builtins.str, enum.Enum)
    • langchain.evaluation.string_distance.base.StringDistance(builtins.str, enum.Enum)
  • enum.Enum(builtins.object)
    • langchain.evaluation.criteria.eval_chain.Criteria(builtins.str, enum.Enum)
    • langchain.evaluation.embedding_distance.base.EmbeddingDistance(builtins.str, enum.Enum)
    • langchain.evaluation.schema.EvaluatorType(builtins.str, enum.Enum)
    • langchain.evaluation.string_distance.base.StringDistance(builtins.str, enum.Enum)
  • langchain.chains.llm.LLMChain(langchain.chains.base.Chain)
    • langchain.evaluation.qa.eval_chain.ContextQAEvalChain(langchain.chains.llm.LLMChain, langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain)
      • langchain.evaluation.qa.eval_chain.CotQAEvalChain
    • langchain.evaluation.qa.eval_chain.QAEvalChain(langchain.chains.llm.LLMChain, langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain)
  • langchain.evaluation.embedding_distance.base._EmbeddingDistanceChainMixin(langchain.chains.base.Chain)
    • langchain.evaluation.embedding_distance.base.EmbeddingDistanceEvalChain(langchain.evaluation.embedding_distance.base._EmbeddingDistanceChainMixin, langchain.evaluation.schema.StringEvaluator)
    • langchain.evaluation.embedding_distance.base.PairwiseEmbeddingDistanceEvalChain(langchain.evaluation.embedding_distance.base._EmbeddingDistanceChainMixin, langchain.evaluation.schema.PairwiseStringEvaluator)
  • langchain.evaluation.schema._EvalArgsMixin(builtins.object)
    • langchain.evaluation.schema.AgentTrajectoryEvaluator(langchain.evaluation.schema._EvalArgsMixin, abc.ABC)
      • langchain.evaluation.agents.trajectory_eval_chain.TrajectoryEvalChain(langchain.evaluation.schema.AgentTrajectoryEvaluator, langchain.evaluation.schema.LLMEvalChain)
    • langchain.evaluation.schema.PairwiseStringEvaluator(langchain.evaluation.schema._EvalArgsMixin, abc.ABC)
      • langchain.evaluation.comparison.eval_chain.PairwiseStringEvalChain(langchain.evaluation.schema.PairwiseStringEvaluator, langchain.evaluation.schema.LLMEvalChain, langchain.chains.llm.LLMChain)
        • langchain.evaluation.comparison.eval_chain.LabeledPairwiseStringEvalChain
      • langchain.evaluation.embedding_distance.base.PairwiseEmbeddingDistanceEvalChain(langchain.evaluation.embedding_distance.base._EmbeddingDistanceChainMixin, langchain.evaluation.schema.PairwiseStringEvaluator)
      • langchain.evaluation.string_distance.base.PairwiseStringDistanceEvalChain(langchain.evaluation.schema.PairwiseStringEvaluator, langchain.evaluation.string_distance.base._RapidFuzzChainMixin)
    • langchain.evaluation.schema.StringEvaluator(langchain.evaluation.schema._EvalArgsMixin, abc.ABC)
      • langchain.evaluation.criteria.eval_chain.CriteriaEvalChain(langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain, langchain.chains.llm.LLMChain)
        • langchain.evaluation.criteria.eval_chain.LabeledCriteriaEvalChain
      • langchain.evaluation.embedding_distance.base.EmbeddingDistanceEvalChain(langchain.evaluation.embedding_distance.base._EmbeddingDistanceChainMixin, langchain.evaluation.schema.StringEvaluator)
      • langchain.evaluation.exact_match.base.ExactMatchStringEvaluator
      • langchain.evaluation.parsing.base.JsonEqualityEvaluator
      • langchain.evaluation.parsing.base.JsonValidityEvaluator
      • langchain.evaluation.parsing.json_distance.JsonEditDistanceEvaluator
      • langchain.evaluation.parsing.json_schema.JsonSchemaEvaluator
      • langchain.evaluation.qa.eval_chain.ContextQAEvalChain(langchain.chains.llm.LLMChain, langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain)
        • langchain.evaluation.qa.eval_chain.CotQAEvalChain
      • langchain.evaluation.qa.eval_chain.QAEvalChain(langchain.chains.llm.LLMChain, langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain)
      • langchain.evaluation.regex_match.base.RegexMatchStringEvaluator
      • langchain.evaluation.scoring.eval_chain.ScoreStringEvalChain(langchain.evaluation.schema.StringEvaluator, langchain.evaluation.schema.LLMEvalChain, langchain.chains.llm.LLMChain)
        • langchain.evaluation.scoring.eval_chain.LabeledScoreStringEvalChain
      • langchain.evaluation.string_distance.base.StringDistanceEvalChain(langchain.evaluation.schema.StringEvaluator, langchain.evaluation.string_distance.base._RapidFuzzChainMixin)

graphs

Help on package langchain.graphs in langchain:


NAME

langchain.graphs -Graphs provide a natural language interface to graph databases.


PACKAGE CONTENTS

  • arangodb_graph
  • falkordb_graph
  • graph_document
  • graph_store
  • hugegraph
  • kuzu_graph
  • memgraph_graph
  • nebula_graph
  • neo4j_graph
  • neptune_graph
  • networkx_graph
  • rdf_graph

indexes

Help on package langchain.indexes in langchain:


NAME

langchain.indexes


DESCRIPTION

Index is used to avoid writing duplicated content into the vectostore and to avoid over-writing content if it’s unchanged.

Indexes also :

  • Create knowledge graphs from data.

  • Support indexing workflows from LangChain data loaders to vectorstores.

    Importantly, Index keeps on working even if the content being written is derived via a set of transformations from some source content (e.g., indexing children

    documents that were derived from parent documents by chunking.)


PACKAGE CONTENTS

  • _api
  • _sql_record_manager
  • base
  • graph
  • prompts (package)
  • vectorstore

CLASSES

  • builtins.dict(builtins.object)
    • langchain.indexes._api.IndexingResult
  • langchain.indexes.base.RecordManager(abc.ABC)
    • langchain.indexes._sql_record_manager.SQLRecordManager
  • pydantic.v1.main.BaseModel(pydantic.v1.utils.Representation)
    • langchain.indexes.graph.GraphIndexCreator
    • langchain.indexes.vectorstore.VectorstoreIndexCreator

llms

Help on package langchain.llms in langchain:


NAME

langchain.llms


DESCRIPTION

LLM classes provide access to the large language model (LLM) APIs and services.


Class hierarchy:

… code-block::

​ BaseLanguageModel --> BaseLLM --> LLM --> # Examples: AI21, HuggingFaceHub, OpenAI


Main helpers:

… code-block::

​ LLMResult, PromptValue,

​ CallbackManagerForLLMRun, AsyncCallbackManagerForLLMRun,

​ CallbackManager, AsyncCallbackManager,

​ AIMessage, BaseMessage


PACKAGE CONTENTS

  • ai21
  • aleph_alpha
  • amazon_api_gateway
  • anthropic
  • anyscale
  • arcee
  • aviary
  • azureml_endpoint
  • baidu_qianfan_endpoint
  • bananadev
  • base
  • baseten
  • beam
  • bedrock
  • bittensor
  • cerebriumai
  • chatglm
  • clarifai
  • cloudflare_workersai
  • cohere
  • ctransformers
  • ctranslate2
  • databricks
  • deepinfra
  • deepsparse
  • edenai
  • fake
  • fireworks
  • forefrontai
  • gigachat
  • google_palm
  • gooseai
  • gpt4all
  • gradient_ai
  • huggingface_endpoint
  • huggingface_hub
  • huggingface_pipeline
  • huggingface_text_gen_inference
  • human
  • javelin_ai_gateway
  • koboldai
  • llamacpp
  • loading
  • manifest
  • minimax
  • mlflow
  • mlflow_ai_gateway
  • modal
  • mosaicml
  • nlpcloud
  • octoai_endpoint
  • ollama
  • opaqueprompts
  • openai
  • openllm
  • openlm
  • pai_eas_endpoint
  • petals
  • pipelineai
  • predibase
  • predictionguard
  • promptlayer_openai
  • replicate
  • rwkv
  • sagemaker_endpoint
  • self_hosted
  • self_hosted_hugging_face
  • stochasticai
  • symblai_nebula
  • textgen
  • titan_takeoff
  • titan_takeoff_pro
  • together
  • tongyi
  • utils
  • vertexai
  • vllm
  • volcengine_maas
  • watsonxllm
  • writer
  • xinference
  • yandex

load

Help on package langchain.load in langchain:


NAME

langchain.load - Serialization and deserialization.


PACKAGE CONTENTS

  • dump
  • load
  • serializable

memory

Help on package langchain.memory in langchain:

NAME
langchain.memory -Memory maintains Chain state, incorporating context from
past runs.

DESCRIPTION
Class hierarchy for Memory:

.. code-block::BaseMemory --> BaseChatMemory --> <name>Memory  # Examples: ZepMemory, MotorheadMemory

Main helpers:

​ … code-block::

​ BaseChatMessageHistory

Chat Message History stores the chat message history in different stores.

Class hierarchy for ChatMessageHistory:

… code-block::

BaseChatMessageHistory --> ChatMessageHistory # Example: ZepChatMessageHistory


Main helpers:

​ … code-block::

​ AIMessage, BaseMessage, HumanMessage


PACKAGE CONTENTS

  • buffer
  • buffer_window
  • chat_memory
  • chat_message_histories (package)
  • combined
  • entity
  • kg
  • motorhead_memory
  • prompt
  • readonly
  • simple
  • summary
  • summary_buffer
  • token_buffer
  • utils
  • vectorstore
  • zep_memory

CLASSES

  • langchain.memory.chat_memory.BaseChatMemory(langchain_core.memory.BaseMemory, abc.ABC)
    • langchain.memory.buffer.ConversationBufferMemory
      • langchain.memory.zep_memory.ZepMemory
    • langchain.memory.buffer_window.ConversationBufferWindowMemory
    • langchain.memory.entity.ConversationEntityMemory
    • langchain.memory.kg.ConversationKGMemory
    • langchain.memory.motorhead_memory.MotorheadMemory
    • langchain.memory.summary.ConversationSummaryMemory(langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin)
    • langchain.memory.summary_buffer.ConversationSummaryBufferMemory(langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin)
    • langchain.memory.token_buffer.ConversationTokenBufferMemory
  • langchain.memory.entity.BaseEntityStore(pydantic.v1.main.BaseModel, abc.ABC)
    • langchain.memory.entity.InMemoryEntityStore
    • langchain.memory.entity.RedisEntityStore
    • langchain.memory.entity.SQLiteEntityStore
    • langchain.memory.entity.UpstashRedisEntityStore
  • langchain.memory.summary.SummarizerMixin(pydantic.v1.main.BaseModel)
    • langchain.memory.summary.ConversationSummaryMemory(langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin)
    • langchain.memory.summary_buffer.ConversationSummaryBufferMemory(langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin)
  • langchain_core.chat_history.BaseChatMessageHistory(abc.ABC)
    • langchain_community.chat_message_histories.astradb.AstraDBChatMessageHistory
    • langchain_community.chat_message_histories.cassandra.CassandraChatMessageHistory
    • langchain_community.chat_message_histories.cosmos_db.CosmosDBChatMessageHistory
    • langchain_community.chat_message_histories.dynamodb.DynamoDBChatMessageHistory
    • langchain_community.chat_message_histories.elasticsearch.ElasticsearchChatMessageHistory
    • langchain_community.chat_message_histories.file.FileChatMessageHistory
    • langchain_community.chat_message_histories.in_memory.ChatMessageHistory(langchain_core.chat_history.BaseChatMessageHistory, pydantic.v1.main.BaseModel)
    • langchain_community.chat_message_histories.momento.MomentoChatMessageHistory
    • langchain_community.chat_message_histories.mongodb.MongoDBChatMessageHistory
    • langchain_community.chat_message_histories.postgres.PostgresChatMessageHistory
    • langchain_community.chat_message_histories.redis.RedisChatMessageHistory
    • langchain_community.chat_message_histories.singlestoredb.SingleStoreDBChatMessageHistory
    • langchain_community.chat_message_histories.sql.SQLChatMessageHistory
    • langchain_community.chat_message_histories.streamlit.StreamlitChatMessageHistory
    • langchain_community.chat_message_histories.upstash_redis.UpstashRedisChatMessageHistory
    • langchain_community.chat_message_histories.xata.XataChatMessageHistory
    • langchain_community.chat_message_histories.zep.ZepChatMessageHistory
  • langchain_core.memory.BaseMemory(langchain_core.load.serializable.Serializable, abc.ABC)
    • langchain.memory.buffer.ConversationStringBufferMemory
    • langchain.memory.combined.CombinedMemory
    • langchain.memory.readonly.ReadOnlySharedMemory
    • langchain.memory.simple.SimpleMemory
    • langchain.memory.vectorstore.VectorStoreRetrieverMemory
  • pydantic.v1.main.BaseModel(pydantic.v1.utils.Representation)
    • langchain_community.chat_message_histories.in_memory.ChatMessageHistory(langchain_core.chat_history.BaseChatMessageHistory, pydantic.v1.main.BaseModel)

output_parsers

Help on package langchain.output_parsers in langchain:


NAME

langchain.output_parsers -OutputParser classes parse the output of an LLM call.


DESCRIPTION

Class hierarchy:

… code-block::

​ BaseLLMOutputParser --> BaseOutputParser --> OutputParser # ListOutputParser, PydanticOutputParser

Main helpers:

… code-block::

​ Serializable, Generation, PromptValue


PACKAGE CONTENTS

  • boolean
  • combining
  • datetime
  • enum
  • ernie_functions
  • fix
  • format_instructions
  • json
  • list
  • loading
  • openai_functions
  • openai_tools
  • pandas_dataframe
  • prompts
  • pydantic
  • rail_parser
  • regex
  • regex_dict
  • retry
  • structured
  • xml
  • yaml

CLASSES

  • langchain_core.output_parsers.base.BaseOutputParser(langchain_core.output_parsers.base.BaseLLMOutputParser, langchain_core.runnables.base.RunnableSerializable)
    • langchain.output_parsers.boolean.BooleanOutputParser
    • langchain.output_parsers.combining.CombiningOutputParser
    • langchain.output_parsers.datetime.DatetimeOutputParser
    • langchain.output_parsers.enum.EnumOutputParser
    • langchain.output_parsers.fix.OutputFixingParser
    • langchain.output_parsers.pandas_dataframe.PandasDataFrameOutputParser
    • langchain.output_parsers.regex.RegexParser
    • langchain.output_parsers.regex_dict.RegexDictParser
    • langchain.output_parsers.retry.RetryOutputParser
    • langchain.output_parsers.retry.RetryWithErrorOutputParser
    • langchain.output_parsers.structured.StructuredOutputParser
    • langchain.output_parsers.yaml.YamlOutputParser
    • langchain_community.output_parsers.rail_parser.GuardrailsOutputParser
  • langchain_core.output_parsers.json.JsonOutputParser(langchain_core.output_parsers.transform.BaseCumulativeTransformOutputParser)
    • langchain_core.output_parsers.pydantic.PydanticOutputParser(langchain_core.output_parsers.json.JsonOutputParser, typing.Generic)
  • langchain_core.output_parsers.transform.BaseCumulativeTransformOutputParser(langchain_core.output_parsers.transform.BaseTransformOutputParser)
    • langchain_core.output_parsers.openai_tools.JsonOutputToolsParser
      • langchain_core.output_parsers.openai_tools.JsonOutputKeyToolsParser
      • langchain_core.output_parsers.openai_tools.PydanticToolsParser
  • langchain_core.output_parsers.transform.BaseTransformOutputParser(langchain_core.output_parsers.base.BaseOutputParser)
    • langchain_core.output_parsers.list.ListOutputParser
      • langchain_core.output_parsers.list.CommaSeparatedListOutputParser
      • langchain_core.output_parsers.list.MarkdownListOutputParser
      • langchain_core.output_parsers.list.NumberedListOutputParser
    • langchain_core.output_parsers.xml.XMLOutputParser
  • pydantic.v1.main.BaseModel(pydantic.v1.utils.Representation)
    • langchain.output_parsers.structured.ResponseSchema
  • typing.Generic(builtins.object)
    • langchain_core.output_parsers.pydantic.PydanticOutputParser(langchain_core.output_parsers.json.JsonOutputParser, typing.Generic)

prompts

Help on package langchain.prompts in langchain:


NAME

langchain.prompts -Prompt is the input to the model.


DESCRIPTION

Prompt is often constructed from multiple components. Prompt classes and functions make constructing and working with prompts easy.


Class hierarchy:

  • BasePromptTemplate
    • PipelinePromptTemplate
    • StringPromptTemplate
      • PromptTemplate
      • FewShotPromptTemplate
      • FewShotPromptWithTemplates
    • BaseChatPromptTemplate
      • AutoGPTPrompt
      • ChatPromptTemplate
        • AgentScratchPadChatPromptTemplate
  • BaseMessagePromptTemplate
    • MessagesPlaceholder
    • BaseStringMessagePromptTemplate
      • ChatMessagePromptTemplate
      • HumanMessagePromptTemplate
      • AIMessagePromptTemplate
      • SystemMessagePromptTemplate
  • PromptValue
    • StringPromptValue
    • ChatPromptValue

PACKAGE CONTENTS

  • base
  • chat
  • example_selector (package)
  • few_shot
  • few_shot_with_templates
  • loading
  • pipeline
  • prompt

CLASSES

  • abc.ABC(builtins.object)
    • langchain_core.prompts.base.BasePromptTemplate(langchain_core.runnables.base.RunnableSerializable, typing.Generic, abc.ABC)
      • langchain_core.prompts.chat.BaseChatPromptTemplate(langchain_core.prompts.base.BasePromptTemplate, abc.ABC)
        • langchain_core.prompts.chat.ChatPromptTemplate
        • langchain_core.prompts.few_shot.FewShotChatMessagePromptTemplate(langchain_core.prompts.chat.BaseChatPromptTemplate, langchain_core.prompts.few_shot._FewShotPromptTemplateMixin)
      • langchain_core.prompts.pipeline.PipelinePromptTemplate
      • langchain_core.prompts.string.StringPromptTemplate(langchain_core.prompts.base.BasePromptTemplate, abc.ABC)
        • langchain_core.prompts.few_shot.FewShotPromptTemplate(langchain_core.prompts.few_shot._FewShotPromptTemplateMixin, langchain_core.prompts.string.StringPromptTemplate)
        • langchain_core.prompts.few_shot_with_templates.FewShotPromptWithTemplates
        • langchain_core.prompts.prompt.PromptTemplate
  • langchain_core.example_selectors.base.BaseExampleSelector(abc.ABC)
    • langchain_community.example_selectors.ngram_overlap.NGramOverlapExampleSelector(langchain_core.example_selectors.base.BaseExampleSelector, pydantic.v1.main.BaseModel)
    • langchain_core.example_selectors.length_based.LengthBasedExampleSelector(langchain_core.example_selectors.base.BaseExampleSelector, pydantic.v1.main.BaseModel)
    • langchain_core.example_selectors.semantic_similarity.SemanticSimilarityExampleSelector(langchain_core.example_selectors.base.BaseExampleSelector, pydantic.v1.main.BaseModel)
      • langchain_core.example_selectors.semantic_similarity.MaxMarginalRelevanceExampleSelector
  • langchain_core.prompts.chat.BaseMessagePromptTemplate(langchain_core.load.serializable.Serializable, abc.ABC)
    • langchain_core.prompts.chat.MessagesPlaceholder
  • langchain_core.prompts.chat.BaseStringMessagePromptTemplate(langchain_core.prompts.chat.BaseMessagePromptTemplate, abc.ABC)
    • langchain_core.prompts.chat.ChatMessagePromptTemplate
  • langchain_core.prompts.chat._StringImageMessagePromptTemplate(langchain_core.prompts.chat.BaseMessagePromptTemplate)
    • langchain_core.prompts.chat.AIMessagePromptTemplate
    • langchain_core.prompts.chat.HumanMessagePromptTemplate
    • langchain_core.prompts.chat.SystemMessagePromptTemplate
  • langchain_core.prompts.few_shot._FewShotPromptTemplateMixin(pydantic.v1.main.BaseModel)
    • langchain_core.prompts.few_shot.FewShotPromptTemplate(langchain_core.prompts.few_shot._FewShotPromptTemplateMixin, langchain_core.prompts.string.StringPromptTemplate)
  • langchain_core.runnables.base.RunnableSerializable(langchain_core.load.serializable.Serializable, langchain_core.runnables.base.Runnable)
    • langchain_core.prompts.base.BasePromptTemplate(langchain_core.runnables.base.RunnableSerializable, typing.Generic, abc.ABC)
      • langchain_core.prompts.chat.BaseChatPromptTemplate(langchain_core.prompts.base.BasePromptTemplate, abc.ABC)
        • langchain_core.prompts.chat.ChatPromptTemplate
        • langchain_core.prompts.few_shot.FewShotChatMessagePromptTemplate(langchain_core.prompts.chat.BaseChatPromptTemplate, langchain_core.prompts.few_shot._FewShotPromptTemplateMixin)
      • langchain_core.prompts.pipeline.PipelinePromptTemplate
      • langchain_core.prompts.string.StringPromptTemplate(langchain_core.prompts.base.BasePromptTemplate, abc.ABC)
        • langchain_core.prompts.few_shot.FewShotPromptTemplate(langchain_core.prompts.few_shot._FewShotPromptTemplateMixin, langchain_core.prompts.string.StringPromptTemplate)
        • langchain_core.prompts.few_shot_with_templates.FewShotPromptWithTemplates
        • langchain_core.prompts.prompt.PromptTemplate
  • pydantic.v1.main.BaseModel(pydantic.v1.utils.Representation)
    • langchain_community.example_selectors.ngram_overlap.NGramOverlapExampleSelector(langchain_core.example_selectors.base.BaseExampleSelector, pydantic.v1.main.BaseModel)
    • langchain_core.example_selectors.length_based.LengthBasedExampleSelector(langchain_core.example_selectors.base.BaseExampleSelector, pydantic.v1.main.BaseModel)
    • langchain_core.example_selectors.semantic_similarity.SemanticSimilarityExampleSelector(langchain_core.example_selectors.base.BaseExampleSelector, pydantic.v1.main.BaseModel)
      • langchain_core.example_selectors.semantic_similarity.MaxMarginalRelevanceExampleSelector
  • typing.Generic(builtins.object)
    • langchain_core.prompts.base.BasePromptTemplate(langchain_core.runnables.base.RunnableSerializable, typing.Generic, abc.ABC)
      • langchain_core.prompts.chat.BaseChatPromptTemplate(langchain_core.prompts.base.BasePromptTemplate, abc.ABC)
        • langchain_core.prompts.chat.ChatPromptTemplate
        • langchain_core.prompts.few_shot.FewShotChatMessagePromptTemplate(langchain_core.prompts.chat.BaseChatPromptTemplate, langchain_core.prompts.few_shot._FewShotPromptTemplateMixin)
      • langchain_core.prompts.pipeline.PipelinePromptTemplate
      • langchain_core.prompts.string.StringPromptTemplate(langchain_core.prompts.base.BasePromptTemplate, abc.ABC)
        • langchain_core.prompts.few_shot.FewShotPromptTemplate(langchain_core.prompts.few_shot._FewShotPromptTemplateMixin, langchain_core.prompts.string.StringPromptTemplate)
        • langchain_core.prompts.few_shot_with_templates.FewShotPromptWithTemplates
        • langchain_core.prompts.prompt.PromptTemplate

retrievers

Help on package langchain.retrievers in langchain:


NAME

langchain.retrievers -Retriever class returns Documents given a textquery.


DESCRIPTION

It is more general than a vector store. A retriever does not need to be able to store documents, only to return (or retrieve) it. Vector stores can be used as the backbone of a retriever, but there are other types of retrievers as well.


Class hierarchy:

… code-block::

​ BaseRetriever --> Retriever # Examples: ArxivRetriever, MergerRetriever

Main helpers:

… code-block::

​ Document, Serializable, Callbacks, CallbackManagerForRetrieverRun, AsyncCallbackManagerForRetrieverRun


PACKAGE CONTENTS

  • arcee
  • arxiv
  • azure_cognitive_search
  • bedrock
  • bm25
  • chaindesk
  • chatgpt_plugin_retriever
  • cohere_rag_retriever
  • contextual_compression
  • databerry
  • docarray
  • document_compressors (package)
  • elastic_search_bm25
  • embedchain
  • ensemble
  • google_cloud_documentai_warehouse
  • google_vertex_ai_search
  • kay
  • kendra
  • knn
  • llama_index
  • merger_retriever
  • metal
  • milvus
  • multi_query
  • multi_vector
  • outline
  • parent_document_retriever
  • pinecone_hybrid_search
  • pubmed
  • pupmed
  • re_phraser
  • remote_retriever
  • self_query (package)
  • svm
  • tavily_search_api
  • tfidf
  • time_weighted_retriever
  • vespa_retriever
  • weaviate_hybrid_search
  • web_research
  • wikipedia
  • you
  • zep
  • zilliz

CLASSES

  • langchain_community.utilities.outline.OutlineAPIWrapper(pydantic.v1.main.BaseModel)
    • langchain_community.retrievers.outline.OutlineRetriever(langchain_core.retrievers.BaseRetriever, langchain_community.utilities.outline.OutlineAPIWrapper)
  • langchain_core.retrievers.BaseRetriever(langchain_core.runnables.base.RunnableSerializable, abc.ABC)
    • langchain.retrievers.contextual_compression.ContextualCompressionRetriever
    • langchain.retrievers.ensemble.EnsembleRetriever
    • langchain.retrievers.merger_retriever.MergerRetriever
    • langchain.retrievers.multi_query.MultiQueryRetriever
    • langchain.retrievers.multi_vector.MultiVectorRetriever
      • langchain.retrievers.parent_document_retriever.ParentDocumentRetriever
    • langchain.retrievers.re_phraser.RePhraseQueryRetriever
    • langchain.retrievers.self_query.base.SelfQueryRetriever
    • langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever
    • langchain.retrievers.web_research.WebResearchRetriever
    • langchain_community.retrievers.outline.OutlineRetriever(langchain_core.retrievers.BaseRetriever, langchain_community.utilities.outline.OutlineAPIWrapper)

runnables

Help on package langchain.runnables in langchain:


NAME

langchain.runnables - LangChainRunnable and the LangChain Expression Language (LCEL).


DESCRIPTION

The LangChain Expression Language (LCEL) offers a declarative method to build production-grade programs that harness the power of LLMs.

Programs created using LCEL and LangChain Runnables inherently support synchronous, asynchronous, batch, and streaming operations.

Support forasync allows servers hosting the LCEL based programs to scale better for higher concurrent loads.


Batch operations allow for processing multiple inputs in parallel.

Streaming of intermediate outputs, as they’re being generated, allows for creating more responsive UX.

This module contains non-core Runnable classes.


PACKAGE CONTENTS

  • hub
  • openai_functions

schema

Help on package langchain.schema in langchain:


NAME

langchain.schema -Schemas are the LangChain Base Classes and Interfaces.


PACKAGE CONTENTS

  • agent
  • cache
  • callbacks (package)
  • chat
  • chat_history
  • document
  • embeddings
  • exceptions
  • language_model
  • memory
  • messages
  • output
  • output_parser
  • prompt
  • prompt_template
  • retriever
  • runnable (package)
  • storage
  • vectorstore

CLASSES

  • abc.ABC(builtins.object)
    • langchain_core.caches.BaseCache
    • langchain_core.chat_history.BaseChatMessageHistory
    • langchain_core.documents.transformers.BaseDocumentTransformer
    • langchain_core.memory.BaseMemory(langchain_core.load.serializable.Serializable, abc.ABC)
    • langchain_core.output_parsers.base.BaseLLMOutputParser(typing.Generic, abc.ABC)
      • langchain_core.output_parsers.base.BaseOutputParser(langchain_core.output_parsers.base.BaseLLMOutputParser, langchain_core.runnables.base.RunnableSerializable)
    • langchain_core.prompt_values.PromptValue(langchain_core.load.serializable.Serializable, abc.ABC)
    • langchain_core.prompts.base.BasePromptTemplate(langchain_core.runnables.base.RunnableSerializable, typing.Generic, abc.ABC)
    • langchain_core.retrievers.BaseRetriever(langchain_core.runnables.base.RunnableSerializable, abc.ABC)
    • langchain_core.stores.BaseStore(typing.Generic, abc.ABC)
  • builtins.Exception(builtins.BaseException)
    • langchain_core.exceptions.LangChainException
      • langchain_core.exceptions.OutputParserException(builtins.ValueError, langchain_core.exceptions.LangChainException)
  • builtins.ValueError(builtins.Exception)
    • langchain_core.exceptions.OutputParserException(builtins.ValueError, langchain_core.exceptions.LangChainException)
  • langchain_core.load.serializable.Serializable(pydantic.v1.main.BaseModel, abc.ABC)
    • langchain_core.agents.AgentAction
    • langchain_core.agents.AgentFinish
    • langchain_core.documents.base.Document
    • langchain_core.memory.BaseMemory(langchain_core.load.serializable.Serializable, abc.ABC)
    • langchain_core.messages.base.BaseMessage
      • langchain_core.messages.ai.AIMessage
      • langchain_core.messages.chat.ChatMessage
      • langchain_core.messages.function.FunctionMessage
      • langchain_core.messages.human.HumanMessage
      • langchain_core.messages.system.SystemMessage
    • langchain_core.outputs.generation.Generation
      • langchain_core.outputs.chat_generation.ChatGeneration
    • langchain_core.prompt_values.PromptValue(langchain_core.load.serializable.Serializable, abc.ABC)
  • langchain_core.output_parsers.transform.BaseTransformOutputParser(langchain_core.output_parsers.base.BaseOutputParser)
    • langchain_core.output_parsers.string.StrOutputParser
  • langchain_core.runnables.base.RunnableSerializable(langchain_core.load.serializable.Serializable, langchain_core.runnables.base.Runnable)
    • langchain_core.prompts.base.BasePromptTemplate(langchain_core.runnables.base.RunnableSerializable, typing.Generic, abc.ABC)
    • langchain_core.retrievers.BaseRetriever(langchain_core.runnables.base.RunnableSerializable, abc.ABC)
  • pydantic.v1.main.BaseModel(pydantic.v1.utils.Representation)
    • langchain_core.outputs.chat_result.ChatResult
    • langchain_core.outputs.llm_result.LLMResult
    • langchain_core.outputs.run_info.RunInfo
  • typing.Generic(builtins.object)
    • langchain_core.output_parsers.base.BaseLLMOutputParser(typing.Generic, abc.ABC)
      • langchain_core.output_parsers.base.BaseOutputParser(langchain_core.output_parsers.base.BaseLLMOutputParser, langchain_core.runnables.base.RunnableSerializable)
    • langchain_core.prompts.base.BasePromptTemplate(langchain_core.runnables.base.RunnableSerializable, typing.Generic, abc.ABC)
    • langchain_core.stores.BaseStore(typing.Generic, abc.ABC)

smith

Help on package langchain.smith in langchain:


NAME

langchain.smith -LangSmith utilities.


DESCRIPTION

This module provides utilities for connecting to LangSmith <https://smith.langchain.com/>.

For more information on LangSmith, see the LangSmith documentation <https://docs.smith.langchain.com/>_.


PACKAGE CONTENTS

  • evaluation (package)

ClassES

  • pydantic.v1.main.BaseModel(pydantic.v1.utils.Representation)
    • langchain.smith.evaluation.config.RunEvalConfig

storage

Help on package langchain.storage in langchain:


NAME

langchain.storage - Implementations of key-value stores and storage helpers.


DESCRIPTION

Module provides implementations of various key-value stores that conform to a simple key-value interface.

The primary goal of these storages is to support implementation of caching.


PACKAGE CONTENTS

  • _lc_store
  • encoder_backed
  • exceptions
  • file_system
  • in_memory
  • redis
  • upstash_redis

CLASSES

  • langchain_core.stores.BaseStore(typing.Generic, abc.ABC)
    • langchain.storage.encoder_backed.EncoderBackedStore
    • langchain.storage.file_system.LocalFileStore

text_splitter

Help on module langchain.text_splitter in langchain:


NAME

langchain.text_splitter - Kept for backwards compatibility.


CLASSES

  • abc.ABC(builtins.object)
    • langchain_text_splitters.base.TextSplitter(langchain_core.documents.transformers.BaseDocumentTransformer, abc.ABC)
      • langchain_text_splitters.base.TokenTextSplitter
      • langchain_text_splitters.character.CharacterTextSplitter
      • langchain_text_splitters.character.RecursiveCharacterTextSplitter
        • langchain_text_splitters.latex.LatexTextSplitter
        • langchain_text_splitters.markdown.MarkdownTextSplitter
        • langchain_text_splitters.python.PythonCodeTextSplitter
      • langchain_text_splitters.konlpy.KonlpyTextSplitter
      • langchain_text_splitters.nltk.NLTKTextSplitter
      • langchain_text_splitters.sentence_transformers.SentenceTransformersTokenTextSplitter
      • langchain_text_splitters.spacy.SpacyTextSplitter
  • builtins.dict(builtins.object)
    • langchain_text_splitters.html.ElementType
    • langchain_text_splitters.markdown.HeaderType
    • langchain_text_splitters.markdown.LineType
  • builtins.object
    • langchain_text_splitters.base.Tokenizer
    • langchain_text_splitters.html.HTMLHeaderTextSplitter
    • langchain_text_splitters.json.RecursiveJsonSplitter
    • langchain_text_splitters.markdown.MarkdownHeaderTextSplitter
  • builtins.str(builtins.object)
    • langchain_text_splitters.base.Language(builtins.str, enum.Enum)
  • enum.Enum(builtins.object)
    • langchain_text_splitters.base.Language(builtins.str, enum.Enum)
  • langchain_core.documents.transformers.BaseDocumentTransformer(abc.ABC)
    • langchain_text_splitters.base.TextSplitter(langchain_core.documents.transformers.BaseDocumentTransformer, abc.ABC)
      • langchain_text_splitters.base.TokenTextSplitter
      • langchain_text_splitters.character.CharacterTextSplitter
      • langchain_text_splitters.character.RecursiveCharacterTextSplitter
        • langchain_text_splitters.latex.LatexTextSplitter
        • langchain_text_splitters.markdown.MarkdownTextSplitter
        • langchain_text_splitters.python.PythonCodeTextSplitter
      • langchain_text_splitters.konlpy.KonlpyTextSplitter
      • langchain_text_splitters.nltk.NLTKTextSplitter
      • langchain_text_splitters.sentence_transformers.SentenceTransformersTokenTextSplitter
      • langchain_text_splitters.spacy.SpacyTextSplitter

tools

Help on package langchain.tools in langchain:


NAME

langchain.tools -Tools are classes that an Agent uses to interact with the world.


DESCRIPTION

Each tool has adescription. Agent uses the description to choose the right tool for the job.


Class hierarchy:

… code-block::

​ ToolMetaclass --> BaseTool --> Tool # Examples: AIPluginTool, BaseGraphQLTool

​ # Examples: BraveSearch, HumanInputRun

Main helpers:

… code-block::

​ CallbackManagerForToolRun, AsyncCallbackManagerForToolRun


PACKAGE CONTENTS

  • amadeus (package)
  • arxiv (package)
  • azure_cognitive_services (package)
  • base
  • bearly (package)
  • bing_search (package)
  • brave_search (package)
  • clickup (package)
  • convert_to_openai
  • dataforseo_api_search (package)
  • ddg_search (package)
  • e2b_data_analysis (package)
  • edenai (package)
  • eleven_labs (package)
  • file_management (package)
  • github (package)
  • gitlab (package)
  • gmail (package)
  • golden_query (package)
  • google_cloud (package)
  • google_finance (package)
  • google_jobs (package)
  • google_lens (package)
  • google_places (package)
  • google_scholar (package)
  • google_search (package)
  • google_serper (package)
  • google_trends (package)
  • graphql (package)
  • human (package)
  • ifttt
  • interaction (package)
  • jira (package)
  • json (package)
  • memorize (package)
  • merriam_webster (package)
  • metaphor_search (package)
  • multion (package)
  • nasa (package)
  • nuclia (package)
  • office365 (package)
  • openapi (package)
  • openweathermap (package)
  • playwright (package)
  • plugin
  • powerbi (package)
  • pubmed (package)
  • python (package)
  • reddit_search (package)
  • render
  • requests (package)
  • retriever
  • scenexplain (package)
  • searchapi (package)
  • searx_search (package)
  • shell (package)
  • slack (package)
  • sleep (package)
  • spark_sql (package)
  • sql_database (package)
  • stackexchange (package)
  • steam (package)
  • steamship_image_generation (package)
  • tavily_search (package)
  • vectorstore (package)
  • wikipedia (package)
  • wolfram_alpha (package)
  • yahoo_finance_news
  • youtube (package)
  • zapier (package)

CLASSES

  • langchain_core.runnables.base.RunnableSerializable(langchain_core.load.serializable.Serializable, langchain_core.runnables.base.Runnable)
    • langchain_core.tools.BaseTool
      • langchain_core.tools.StructuredTool
      • langchain_core.tools.Tool

utilities

Help on package langchain.utilities in langchain:


NAME

langchain.utilities -Utilities are the integrations with third-part systems and packages.


DESCRIPTION

Other LangChain classes useUtilities to interact with third-part systems


PACKAGE CONTENTS

  • alpha_vantage
  • anthropic
  • apify
  • arcee
  • arxiv
  • asyncio
  • awslambda
  • bibtex
  • bing_search
  • brave_search
  • clickup
  • dalle_image_generator
  • dataforseo_api_search
  • duckduckgo_search
  • github
  • gitlab
  • golden_query
  • google_finance
  • google_jobs
  • google_lens
  • google_places_api
  • google_scholar
  • google_search
  • google_serper
  • google_trends
  • graphql
  • jira
  • loading
  • max_compute
  • merriam_webster
  • metaphor_search
  • nasa
  • opaqueprompts
  • openapi
  • openweathermap
  • outline
  • portkey
  • powerbi
  • pubmed
  • python
  • reddit_search
  • redis
  • requests
  • scenexplain
  • searchapi
  • searx_search
  • serpapi
  • spark_sql
  • sql_database
  • stackexchange
  • steam
  • tavily_search
  • tensorflow_datasets
  • twilio
  • vertexai
  • wikipedia
  • wolfram_alpha
  • zapier

CLASSES

  • langchain_community.utilities.requests.GenericRequestsWrapper(pydantic.v1.main.BaseModel)
    • langchain_community.utilities.requests.TextRequestsWrapper
  • pydantic.v1.main.BaseModel(pydantic.v1.utils.Representation)
    • langchain_community.utilities.requests.Requests

utils

Help on package langchain.utils in langchain:


NAME

langchain.utils -Utility functions for LangChain.


DESCRIPTION

These functions do not depend on any other LangChain module.


PACKAGE CONTENTS

  • aiter
  • env
  • ernie_functions
  • formatting
  • html
  • input
  • interactive_env
  • iter
  • json_schema
  • loading
  • math
  • openai
  • openai_functions
  • pydantic
  • strings
  • utils

CLASSES

  • string.Formatter(builtins.object)
    • langchain_core.utils.formatting.StrictFormatter

vectorstores

Help on package langchain.vectorstores in langchain:


NAME

langchain.vectorstores -Vector store stores embedded data and performs vector search.


DESCRIPTION

One of the most common ways to store and search over unstructured data is to embed it and store the resulting embedding vectors, and then query the store and retrieve the data that are ‘most similar’ to the embedded query.


Class hierarchy:

… code-block::

VectorStore --> # Examples: Annoy, FAISS, Milvus

BaseRetriever --> VectorStoreRetriever --> Retriever # Example: VespaRetriever


Main helpers:

… code-block::

Embeddings, Document


PACKAGE CONTENTS

  • alibabacloud_opensearch
  • analyticdb
  • annoy
  • astradb
  • atlas
  • awadb
  • azure_cosmos_db
  • azuresearch
  • bageldb
  • baiducloud_vector_search
  • base
  • cassandra
  • chroma
  • clarifai
  • clickhouse
  • dashvector
  • databricks_vector_search
  • deeplake
  • dingo
  • docarray (package)
  • elastic_vector_search
  • elasticsearch
  • epsilla
  • faiss
  • hippo
  • hologres
  • lancedb
  • llm_rails
  • marqo
  • matching_engine
  • meilisearch
  • milvus
  • momento_vector_index
  • mongodb_atlas
  • myscale
  • neo4j_vector
  • nucliadb
  • opensearch_vector_search
  • pgembedding
  • pgvecto_rs
  • pgvector
  • pinecone
  • qdrant
  • redis (package)
  • rocksetdb
  • scann
  • semadb
  • singlestoredb
  • sklearn
  • sqlitevss
  • starrocks
  • supabase
  • tair
  • tencentvectordb
  • tigris
  • tiledb
  • timescalevector
  • typesense
  • usearch
  • utils
  • vald
  • vearch
  • vectara
  • vespa
  • weaviate
  • xata
  • yellowbrick
  • zep
  • zilliz

CLASSES

  • abc.ABC(builtins.object)
    • langchain_core.vectorstores.VectorStore

2014-03-27(三)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/775559.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

深入理解Vue的生命周期机制

&#x1f90d; 前端开发工程师、技术日更博主、已过CET6 &#x1f368; 阿珊和她的猫_CSDN博客专家、23年度博客之星前端领域TOP1 &#x1f560; 牛客高级专题作者、打造专栏《前端面试必备》 、《2024面试高频手撕题》 &#x1f35a; 蓝桥云课签约作者、上架课程《Vue.js 和 E…

【检索稳定|火爆征稿中】2024年企业管理与数字化经济国际学术会议(ICBMDE 2024)

【检索稳定|火爆征稿中】2024年企业管理与数字化经济国际学术会议&#xff08;ICBMDE 2024&#xff09; 2024 International Conference on Business Management and Digital Economy&#xff08;ICBMDE 2024&#xff09; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~…

【tingsboard开源平台】下载数据库,IDEA编译,项目登录

一&#xff0c; PostgreSQL 下载 需要看官网的&#xff1a;点此下载直达地址&#xff1a;点此进行相关学习&#xff1a;PostgreSQL 菜鸟教程 二&#xff0c;PostgreSQL 安装 点击安装包进行安装 出现乱码错误&#xff1a; There has been an error. Error running C:\Wind…

逆流而上的选择-积极生活,逆流而上

首先请大家看一个故事 李明坐在公司的开放式办公区&#xff0c;耳边是键盘敲击声的交响乐&#xff0c;眼前是一行行跳跃的代码。他的眼神有些恍惚&#xff0c;显示器的蓝光在他眼镜上反射出时代的光芒&#xff0c;这光芒既耀眼又刺眼。他即将35岁&#xff0c;在这个年纪&#x…

鸿蒙雄起!风口就在当下,你如何抉择?

近年来&#xff0c;华为自主研发的鸿蒙操作系统&#xff08;HarmonyOS&#xff09;引起了广泛的关注和讨论。鸿蒙系统不仅标志着华为在软件领域的一次重大突破&#xff0c;也预示着全球智能设备市场格局的潜在变化。本文将深入探讨鸿蒙系统的兴起、其在市场上的表现以及对程序员…

【b站李炎恢】Vue.js Element UI | 十天技能课堂 | 更新中... | 李炎恢

课程地址&#xff1a;【Vue.js Element UI | 十天技能课堂 | 更新中... | 李炎恢】 https://www.bilibili.com/video/BV1U54y127GB/?share_sourcecopy_web&vd_sourceb1cb921b73fe3808550eaf2224d1c155 备注&#xff1a;虽然标题声明还在更新中&#xff0c;但是看一些常用…

前端Vue开发技术总结

VUE官网:https://cn.vuejs.org/ VUE官方教程:https://v2.cn.vuejs.org/v2/guide/ Vite官网:https://cn.vitejs.dev/guide/ Element Plus官网:http://element-plus.org/zh-CN/ VsCode常用快捷键 vscode 代码自动对齐快捷键:Shift+Alt+F 一、新建项目 完整的项目结构图如…

如何创建仓库?

第一 绑定邮箱 第二步 创建仓库 第三步 下载gitee 下载 再点击键盘中 windon加r 输入自己创建好的仓库邮箱 第四 在自己项目的文件夹中 打开项目 再进行推送 推送完毕就可以了

SQL函数操作——2、数据统计初级应用

任务描述 本关任务&#xff1a; 灵活使用分组操作和聚集函数实现数据统计功能 本关使用的关系为printer(model,color,type,price) 表示的含义是 model&#xff1a;打印机型号&#xff1b; color&#xff1a;是否彩色&#xff0c; T 彩色&#xff0c;F 黑白 type:类型&#x…

MySQL数据库存储过程介绍

目录 一、存储过程 1. 概述 2. 存储过程的优点 3. 语法格式 3.1 创建存储过程 3.2 调用存储过程 3.3 查看存储过程 3.4 显示状态信息 3.5 查看指定存储过程信息 3.6 删除存储过程 二、传参 1. 输入参数 in 2. 输出参数 out 3. 输入输出参数 inout 一、存储过…

【GitLab】Ubuntu 22.04 快速安装 GitLab

在 Ubuntu 22.04 上安装最新版本的 GitLab&#xff0c;可以按照以下步骤操作&#xff1a; 1. 更新系统&#xff1a; 在终端中执行以下命令以确保系统是最新的&#xff1a; sudo apt update sudo apt upgrade2. 安装依赖&#xff1a; 安装 GitLab 所需的依赖包&#xff1a; …

【系统架构师】-第13章-层次式架构设计

层次式体系结构设计是将系统组成一个层次结构&#xff0c;每一层 为上层服务 &#xff0c;并作为下层客户。 在一些层次系统中&#xff0c;除了一些精心挑选的输出函数外&#xff0c; 内部的层接口只对相邻的层可见 。 连接件通过决定层间如何交互的协议来定义&#xff0c;拓扑…

kubernetes负载均衡资源-Ingress

一、Ingress概念 1.1 Ingress概念 使用NodePort类型的Service可以将集群内部服务暴露给集群外部客广端,但使用这种类型Service存在如下几个问题。 1、一个端口只能一个服务使用,所有通过NodePort暴露的端口都需要提前规划;2、如果通过NodePort暴露端口过多,后期维护成本太…

开源AI引擎:文本自动分类在公安及消防执法办案自动化中的应用

一、实际案例介绍 通过文本分类算法自动化处理文本数据&#xff0c;快速识别案件性质和关键特征&#xff0c;极大地提高了案件管理和分派的效率。本文将探讨这两种技术如何帮助执法机构优化资源分配&#xff0c;确保案件得到及时而恰当的处理&#xff0c;并增强公共安全管理的…

如何在openGauss中使用zhparser

如何在 openGauss 中使用 zhparser 准备 一个装有 openGauss 数据库的环境下载 scws 代码到任意位置: https://github.com/hightman/scws master下载 zhparser 代码到任意位置: GitHub - amutu/zhparser: zhparser is a PostgreSQL extension for full-text search of Chines…

SpringBoot集成WebSocket实现简单的多人聊天室

上代码—gitee下载地址&#xff1a; https://gitee.com/bestwater/Spring-websocket.git下载代码&#xff0c;连上数据库执行SQL&#xff0c;就可以运行&#xff0c;最终效果

Redis中的客户端(二)

客户端 输入缓冲区。 客户端状态的输入缓冲区用于保存客户端发送的命令请求: typedef struct redisClient {// ...sds querybuf;// ... }redisClient;例子 举个例子&#xff0c;如果客户端向服务器发送了以下命令请求: SET key value那么客户端状态的qureybuf属性将是一个…

C语言和C++实现栈Stack的对比,有什么区别?

C语言和C实现Stack的对比,我们分别看看C语言实现的栈和c实现的栈有什么区别 C语言实现 typedef int DataType; typedef struct Stack {DataType* array;int capacity;int size; }Stack; void StackInit(Stack* ps) {assert(ps);ps->array (DataType*)malloc(sizeof(DataTyp…

LNMP架构之mysql数据库实战

mysql安装 到官网www.mysql.com下载源码版本 实验室使用5.7.40版本 tar xf mysql-boost-5.7.40.tar.gz #解压 cd mysql-boost-5.7.40/ yum install -y cmake gcc-c bison #安装依赖性 cmake -DCMAKE_INSTALL_PREFIX/usr/local/mysql -DMYSQL_DATADIR/data/mysql -DMYSQL_…

CCF-CSP认证考试 202212-3 JPEG 解码 100分题解

更多 CSP 认证考试题目题解可以前往&#xff1a;CSP-CCF 认证考试真题题解 原题链接&#xff1a; 202212-3 JPEG 解码 时间限制&#xff1a; 1.0s 内存限制&#xff1a; 512.0MB 问题背景 四年一度的世界杯即将画上尾声。在本次的世界杯比赛中&#xff0c;视频助理裁判&…