id stringlengths 14 15 | text stringlengths 44 2.47k | source stringlengths 61 181 |
|---|---|---|
04cd467b9802-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.ListStepContainer.html |
fd07883e0551-0 | langchain_experimental.plan_and_execute.planners.base.LLMPlanner¶
class langchain_experimental.plan_and_execute.planners.base.LLMPlanner[source]¶
Bases: BasePlanner
LLM planner.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to f... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.planners.base.LLMPlanner.html |
fd07883e0551-1 | the new model: you should trust this data
deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[boo... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.planners.base.LLMPlanner.html |
fd07883e0551-2 | plan(inputs: dict, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Plan[source]¶
Given input, decide what to do.
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmethod schema_json(*, by_alias: bool = True, ... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.planners.base.LLMPlanner.html |
1655fae8a10a-0 | langchain_experimental.plan_and_execute.schema.Step¶
class langchain_experimental.plan_and_execute.schema.Step[source]¶
Bases: BaseModel
Step.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param value: str... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.Step.html |
1655fae8a10a-1 | Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
classmethod from_orm(obj: Any) → Model¶
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False,... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.Step.html |
b68bef97a7f6-0 | langchain_experimental.plan_and_execute.schema.BaseStepContainer¶
class langchain_experimental.plan_and_execute.schema.BaseStepContainer[source]¶
Bases: BaseModel
Base step container.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parse... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.BaseStepContainer.html |
b68bef97a7f6-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.BaseStepContainer.html |
b68bef97a7f6-2 | classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmet... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.BaseStepContainer.html |
1efe44a370fb-0 | langchain_experimental.plan_and_execute.executors.agent_executor.load_agent_executor¶
langchain_experimental.plan_and_execute.executors.agent_executor.load_agent_executor(llm: BaseLanguageModel, tools: List[BaseTool], verbose: bool = False, include_task_in_prompt: bool = False) → ChainExecutor[source]¶
Load an agent ex... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.executors.agent_executor.load_agent_executor.html |
fc83c8026c03-0 | langchain_experimental.plan_and_execute.planners.base.BasePlanner¶
class langchain_experimental.plan_and_execute.planners.base.BasePlanner[source]¶
Bases: BaseModel
Base planner.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to ... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.planners.base.BasePlanner.html |
fc83c8026c03-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.planners.base.BasePlanner.html |
fc83c8026c03-2 | abstract plan(inputs: dict, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Plan[source]¶
Given input, decide what to do.
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmethod schema_json(*, by_alias: bool... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.planners.base.BasePlanner.html |
d191ea88a121-0 | langchain_experimental.plan_and_execute.planners.chat_planner.load_chat_planner¶
langchain_experimental.plan_and_execute.planners.chat_planner.load_chat_planner(llm: BaseLanguageModel, system_prompt: str = "Let's first understand the problem and devise a plan to solve the problem. Please output the plan starting with t... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.planners.chat_planner.load_chat_planner.html |
332257aa85a9-0 | langchain_experimental.plan_and_execute.schema.PlanOutputParser¶
class langchain_experimental.plan_and_execute.schema.PlanOutputParser[source]¶
Bases: BaseOutputParser
Plan output parser.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be p... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.PlanOutputParser.html |
332257aa85a9-1 | Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.PlanOutputParser.html |
332257aa85a9-2 | Bind arguments to a Runnable, returning a new Runnable.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.PlanOutputParser.html |
332257aa85a9-3 | classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.PlanOutputParser.html |
332257aa85a9-4 | Parse a list of candidate model Generations into a specific format.
The return value is parsed from only the first Generation in the result, whichis assumed to be the highest-likelihood Generation.
Parameters
result – A list of Generations to be parsed. The Generations are assumed
to be different candidate outputs for ... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.PlanOutputParser.html |
332257aa85a9-5 | classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a Runnable, returning a new Runna... | https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.PlanOutputParser.html |
27af779b3cef-0 | langchain.schema.runnable.utils.GetLambdaSource¶
class langchain.schema.runnable.utils.GetLambdaSource[source]¶
Methods
__init__()
generic_visit(node)
Called if no explicit visitor function exists for a node.
visit(node)
Visit a node.
visit_Constant(node)
visit_Lambda(node)
__init__() → None[source]¶
generic_visit(node... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.utils.GetLambdaSource.html |
7832c29c9268-0 | langchain.schema.runnable.config.get_async_callback_manager_for_config¶
langchain.schema.runnable.config.get_async_callback_manager_for_config(config: RunnableConfig) → AsyncCallbackManager[source]¶ | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.config.get_async_callback_manager_for_config.html |
c79874e81e14-0 | langchain.schema.runnable.base.RunnableLambda¶
class langchain.schema.runnable.base.RunnableLambda(func: Union[Callable[[Input], Output], Callable[[Input], Awaitable[Output]]], afunc: Optional[Callable[[Input], Awaitable[Output]]] = None)[source]¶
A runnable that runs a callable.
Attributes
InputType
OutputType
input_s... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.base.RunnableLambda.html |
c79874e81e14-1 | with_retry(*[, retry_if_exception_type, ...])
__init__(func: Union[Callable[[Input], Output], Callable[[Input], Awaitable[Output]]], afunc: Optional[Callable[[Input], Awaitable[Output]]] = None) → None[source]¶
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, re... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.base.RunnableLambda.html |
c79874e81e14-2 | Output is streamed as Log objects, which include a list of
jsonpatch ops that describe how the state of the run has changed in each
step, and the final state of the run.
The jsonpatch ops can be applied in order to construct state.
async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, *... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.base.RunnableLambda.html |
c79874e81e14-3 | Subclasses should override this method if they can start producing output while
input is still being generated.
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a Runnable, returning a new Runnable.
with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.base.RunnableLambda.html |
009db62a8a07-0 | langchain.schema.runnable.utils.aadd¶
async langchain.schema.runnable.utils.aadd(addables: AsyncIterable[Addable]) → Optional[Addable][source]¶ | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.utils.aadd.html |
e7bd59f1ae90-0 | langchain.schema.retriever.BaseRetriever¶
class langchain.schema.retriever.BaseRetriever[source]¶
Bases: Serializable, Runnable[str, List[Document]], ABC
Abstract base class for a Document retrieval system.
A retrieval system is defined as something that can take string queries and returnthe most ‘relevant’ Documents f... | https://api.python.langchain.com/en/latest/schema/langchain.schema.retriever.BaseRetriever.html |
e7bd59f1ae90-1 | These tags will be associated with each call to this retriever,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a retriever with its
use case.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, ... | https://api.python.langchain.com/en/latest/schema/langchain.schema.retriever.BaseRetriever.html |
e7bd59f1ae90-2 | Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[... | https://api.python.langchain.com/en/latest/schema/langchain.schema.retriever.BaseRetriever.html |
e7bd59f1ae90-3 | Bind arguments to a Runnable, returning a new Runnable.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config... | https://api.python.langchain.com/en/latest/schema/langchain.schema.retriever.BaseRetriever.html |
e7bd59f1ae90-4 | Get the namespace of the langchain object.
For example, if the class is langchain.llms.openai.OpenAI, then the
namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[s... | https://api.python.langchain.com/en/latest/schema/langchain.schema.retriever.BaseRetriever.html |
e7bd59f1ae90-5 | Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a ... | https://api.python.langchain.com/en/latest/schema/langchain.schema.retriever.BaseRetriever.html |
e7bd59f1ae90-6 | Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing output while
input is still being generated.
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and lo... | https://api.python.langchain.com/en/latest/schema/langchain.schema.retriever.BaseRetriever.html |
e7bd59f1ae90-7 | Examples using BaseRetriever¶
Retrieve as you generate with FLARE | https://api.python.langchain.com/en/latest/schema/langchain.schema.retriever.BaseRetriever.html |
88254b3ff4c7-0 | langchain.schema.runnable.passthrough.identity¶
langchain.schema.runnable.passthrough.identity(x: Input) → Input[source]¶ | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.passthrough.identity.html |
83642dafe9ce-0 | langchain.schema.runnable.config.call_func_with_variable_args¶
langchain.schema.runnable.config.call_func_with_variable_args(func: Union[Callable[[Input], Output], Callable[[Input, CallbackManagerForChainRun], Output], Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output]], input: Input, run_manager: Ca... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.config.call_func_with_variable_args.html |
3c5d897248cb-0 | langchain.schema.messages.BaseMessage¶
class langchain.schema.messages.BaseMessage[source]¶
Bases: Serializable
The base abstract Message class.
Messages are the inputs and outputs of ChatModels.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data can... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.BaseMessage.html |
3c5d897248cb-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.BaseMessage.html |
3c5d897248cb-2 | The unique identifier is a list of strings that describes the path
to the object.
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Uni... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.BaseMessage.html |
3aecc9eb506f-0 | langchain.schema.messages.get_buffer_string¶
langchain.schema.messages.get_buffer_string(messages: Sequence[BaseMessage], human_prefix: str = 'Human', ai_prefix: str = 'AI') → str[source]¶
Convert sequence of Messages to strings and concatenate them into one string.
Args:messages: Messages to be converted to strings.
h... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.get_buffer_string.html |
ff1f885def65-0 | langchain.schema.output_parser.StrOutputParser¶
class langchain.schema.output_parser.StrOutputParser[source]¶
Bases: BaseTransformOutputParser[str]
OutputParser that parses LLMResult into the top likely string.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output_parser.StrOutputParser.html |
ff1f885def65-1 | Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output_parser.StrOutputParser.html |
ff1f885def65-2 | Bind arguments to a Runnable, returning a new Runnable.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output_parser.StrOutputParser.html |
ff1f885def65-3 | Return whether this class is serializable.
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclud... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output_parser.StrOutputParser.html |
ff1f885def65-4 | Parse a list of candidate model Generations into a specific format.
The return value is parsed from only the first Generation in the result, whichis assumed to be the highest-likelihood Generation.
Parameters
result – A list of Generations to be parsed. The Generations are assumed
to be different candidate outputs for ... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output_parser.StrOutputParser.html |
ff1f885def65-5 | classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a Runnable, returning a new Runna... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output_parser.StrOutputParser.html |
3f5b063e2878-0 | langchain.schema.messages.AIMessage¶
class langchain.schema.messages.AIMessage[source]¶
Bases: BaseMessage
A Message from an AI.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param additional_kwargs: dict ... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.AIMessage.html |
3f5b063e2878-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.AIMessage.html |
3f5b063e2878-2 | The unique identifier is a list of strings that describes the path
to the object.
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Uni... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.AIMessage.html |
3f5b063e2878-3 | Multi-agent decentralized speaker selection
Multi-agent authoritarian speaker selection
Multi-Player Dungeons & Dragons
Simulated Environment: Gymnasium
Agent Debates with Tools
Prompt pipelining | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.AIMessage.html |
1827adb07ed3-0 | langchain.schema.runnable.utils.SupportsAdd¶
class langchain.schema.runnable.utils.SupportsAdd(*args, **kwargs)[source]¶
Methods
__init__(*args, **kwargs)
__init__(*args, **kwargs)¶ | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.utils.SupportsAdd.html |
549ac2a61904-0 | langchain.schema.messages.AIMessageChunk¶
class langchain.schema.messages.AIMessageChunk[source]¶
Bases: AIMessage, BaseMessageChunk
A Message chunk from an AI.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.AIMessageChunk.html |
549ac2a61904-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.AIMessageChunk.html |
549ac2a61904-2 | The unique identifier is a list of strings that describes the path
to the object.
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Uni... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.AIMessageChunk.html |
7836df7d55fe-0 | langchain.schema.messages.SystemMessage¶
class langchain.schema.messages.SystemMessage[source]¶
Bases: BaseMessage
A Message for priming AI behavior, usually passed in as the first of a sequence
of input messages.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if ... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.SystemMessage.html |
7836df7d55fe-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.SystemMessage.html |
7836df7d55fe-2 | The unique identifier is a list of strings that describes the path
to the object.
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Uni... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.SystemMessage.html |
7836df7d55fe-3 | Conversational Retrieval Agent
Structure answers with OpenAI functions
Agents
CAMEL Role-Playing Autonomous Cooperative Agents
Multi-Agent Simulated Environment: Petting Zoo
Multi-agent decentralized speaker selection
Multi-agent authoritarian speaker selection
Two-Player Dungeons & Dragons
Multi-Player Dungeons & Drag... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.SystemMessage.html |
ca22f1cd46b0-0 | langchain.schema.vectorstore.VectorStoreRetriever¶
class langchain.schema.vectorstore.VectorStoreRetriever[source]¶
Bases: BaseRetriever
Base Retriever class for VectorStore.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form... | https://api.python.langchain.com/en/latest/schema/langchain.schema.vectorstore.VectorStoreRetriever.html |
ca22f1cd46b0-1 | Subclasses should override this method if they can batch more efficiently.
add_documents(documents: List[Document], **kwargs: Any) → List[str][source]¶
Add documents to vectorstore.
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, A... | https://api.python.langchain.com/en/latest/schema/langchain.schema.vectorstore.VectorStoreRetriever.html |
ca22f1cd46b0-2 | Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Optional[Sequence[str]] = None, exclude_names: Optional[Sequence[... | https://api.python.langchain.com/en/latest/schema/langchain.schema.vectorstore.VectorStoreRetriever.html |
ca22f1cd46b0-3 | Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu... | https://api.python.langchain.com/en/latest/schema/langchain.schema.vectorstore.VectorStoreRetriever.html |
ca22f1cd46b0-4 | namespace is [“langchain”, “llms”, “openai”]
get_relevant_documents(query: str, *, callbacks: Callbacks = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[str] = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to fi... | https://api.python.langchain.com/en/latest/schema/langchain.schema.vectorstore.VectorStoreRetriever.html |
ca22f1cd46b0-5 | classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a list of strings that describes the path
to the object.
map() → Runnable[List[Input], List[Output]]¶
Return a new Runnable that maps a list of inputs to a list of outputs,
by calling invoke() with e... | https://api.python.langchain.com/en/latest/schema/langchain.schema.vectorstore.VectorStoreRetriever.html |
ca22f1cd46b0-6 | classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
classmethod validate(value: Any) → Model¶
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a Runnable, returning a new Runna... | https://api.python.langchain.com/en/latest/schema/langchain.schema.vectorstore.VectorStoreRetriever.html |
7d70ebe55afd-0 | langchain.schema.runnable.base.RunnableGenerator¶
class langchain.schema.runnable.base.RunnableGenerator(transform: Union[Callable[[Iterator[Input]], Iterator[Output]], Callable[[AsyncIterator[Input]], AsyncIterator[Output]]], atransform: Optional[Callable[[AsyncIterator[Input]], AsyncIterator[Output]]] = None)[source]... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.base.RunnableGenerator.html |
7d70ebe55afd-1 | with_retry(*[, retry_if_exception_type, ...])
__init__(transform: Union[Callable[[Iterator[Input]], Iterator[Output]], Callable[[AsyncIterator[Input]], AsyncIterator[Output]]], atransform: Optional[Callable[[AsyncIterator[Input]], AsyncIterator[Output]]] = None) → None[source]¶
async abatch(inputs: List[Input], config:... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.base.RunnableGenerator.html |
7d70ebe55afd-2 | This includes all inner runs of LLMs, Retrievers, Tools, etc.
Output is streamed as Log objects, which include a list of
jsonpatch ops that describe how the state of the run has changed in each
step, and the final state of the run.
The jsonpatch ops can be applied in order to construct state.
atransform(input: AsyncIte... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.base.RunnableGenerator.html |
7d70ebe55afd-3 | Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing output while
input is still being generated.
with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶
Bind config to a Runnable, return... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.base.RunnableGenerator.html |
2afb7719e0fb-0 | langchain.schema.messages.FunctionMessageChunk¶
class langchain.schema.messages.FunctionMessageChunk[source]¶
Bases: FunctionMessage, BaseMessageChunk
A Function Message chunk.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to fo... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.FunctionMessageChunk.html |
2afb7719e0fb-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.FunctionMessageChunk.html |
2afb7719e0fb-2 | The unique identifier is a list of strings that describes the path
to the object.
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Uni... | https://api.python.langchain.com/en/latest/schema/langchain.schema.messages.FunctionMessageChunk.html |
2be147cfe0cc-0 | langchain.schema.output.LLMResult¶
class langchain.schema.output.LLMResult[source]¶
Bases: BaseModel
Class that contains all results for a batched LLM call.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
pa... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output.LLMResult.html |
2be147cfe0cc-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output.LLMResult.html |
2be147cfe0cc-2 | classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output.LLMResult.html |
0f0cccc7f324-0 | langchain.schema.chat.ChatSession¶
class langchain.schema.chat.ChatSession[source]¶
Chat Session represents a single
conversation, channel, or other group of messages.
messages: Sequence[langchain.schema.messages.BaseMessage]¶
The LangChain chat messages loaded from the source.
Examples using ChatSession¶
Slack
WhatsAp... | https://api.python.langchain.com/en/latest/schema/langchain.schema.chat.ChatSession.html |
57e15f2a8f41-0 | langchain.schema.output.GenerationChunk¶
class langchain.schema.output.GenerationChunk[source]¶
Bases: Generation
A Generation chunk, which can be concatenated with other Generation chunks.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output.GenerationChunk.html |
57e15f2a8f41-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output.GenerationChunk.html |
57e15f2a8f41-2 | The unique identifier is a list of strings that describes the path
to the object.
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
classmethod parse_obj(obj: Any) → Model¶
classmethod parse_raw(b: Uni... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output.GenerationChunk.html |
e3514a26d1cb-0 | langchain.schema.runnable.config.ensure_config¶
langchain.schema.runnable.config.ensure_config(config: Optional[RunnableConfig] = None) → RunnableConfig[source]¶ | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.config.ensure_config.html |
7220055cdfdd-0 | langchain.schema.language_model.BaseLanguageModel¶
class langchain.schema.language_model.BaseLanguageModel[source]¶
Bases: Serializable, Runnable[Union[PromptValue, str, List[BaseMessage]], LanguageModelOutput], ABC
Abstract base class for interfacing with language models.
All language model wrappers inherit from BaseL... | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
7220055cdfdd-1 | need more output from the model than just the top generated value,
are building chains that are agnostic to the underlying language modeltype (e.g., pure text completion models vs chat models).
Parameters
prompts – List of PromptValues. A PromptValue is an object that can be
converted to match the format of any languag... | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
7220055cdfdd-2 | to the model provider API call.
Returns
Top model prediction as a string.
abstract async apredict_messages(messages: List[BaseMessage], *, stop: Optional[Sequence[str]] = None, **kwargs: Any) → BaseMessage[source]¶
Asynchronously pass messages to the model and return a message prediction.
Use this method when calling c... | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
7220055cdfdd-3 | step, and the final state of the run.
The jsonpatch ops can be applied in order to construct state.
async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of atransform, which buffers input and calls astream.
Subcla... | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
7220055cdfdd-4 | the new model: you should trust this data
deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[boo... | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
7220055cdfdd-5 | to the model provider API call.
Returns
An LLMResult, which contains a list of candidate Generations for each inputprompt and additional model provider-specific output.
classmethod get_lc_namespace() → List[str]¶
Get the namespace of the langchain object.
For example, if the class is langchain.llms.openai.OpenAI, then ... | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
7220055cdfdd-6 | classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa... | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
7220055cdfdd-7 | Pass a single string input to the model and return a string prediction.
Use this method when passing in raw text. If you want to pass in specifictypes of chat messages, use predict_messages.
Parameters
text – String input to pass to the model.
stop – Stop words to use when generating. Model output is cut off at the
fir... | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
7220055cdfdd-8 | to_json_not_implemented() → SerializedNotImplemented¶
transform(input: Iterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → Iterator[Output]¶
Default implementation of transform, which buffers input and then calls stream.
Subclasses should override this method if they can start producing... | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
7220055cdfdd-9 | A map of constructor argument names to secret ids.
For example,{“openai_api_key”: “OPENAI_API_KEY”}
property output_schema: Type[pydantic.main.BaseModel]¶
Examples using BaseLanguageModel¶
Custom chain | https://api.python.langchain.com/en/latest/schema/langchain.schema.language_model.BaseLanguageModel.html |
49b49954f6a0-0 | langchain.schema.output.ChatResult¶
class langchain.schema.output.ChatResult[source]¶
Bases: BaseModel
Class that contains all results for a single chat model call.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid m... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output.ChatResult.html |
49b49954f6a0-1 | deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output.ChatResult.html |
49b49954f6a0-2 | classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on... | https://api.python.langchain.com/en/latest/schema/langchain.schema.output.ChatResult.html |
64a0b90ac65f-0 | langchain.schema.exceptions.LangChainException¶
class langchain.schema.exceptions.LangChainException[source]¶
General LangChain exception. | https://api.python.langchain.com/en/latest/schema/langchain.schema.exceptions.LangChainException.html |
cd320da03aae-0 | langchain.schema.agent.AgentAction¶
class langchain.schema.agent.AgentAction[source]¶
Bases: Serializable
A full description of an action for an ActionAgent to execute.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a val... | https://api.python.langchain.com/en/latest/schema/langchain.schema.agent.AgentAction.html |
cd320da03aae-1 | Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creating
the new model: you should trust this data
deep – set to True to make a deep co... | https://api.python.langchain.com/en/latest/schema/langchain.schema.agent.AgentAction.html |
cd320da03aae-2 | Generate a JSON representation of the model, include and exclude arguments as per dict().
encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().
classmethod lc_id() → List[str]¶
A unique identifier for this class for serialization purposes.
The unique identifier is a ... | https://api.python.langchain.com/en/latest/schema/langchain.schema.agent.AgentAction.html |
cd320da03aae-3 | Custom Trajectory Evaluator
Agents
Plug-and-Plai
Wikibase Agent
SalesGPT - Your Context-Aware AI Sales Assistant With Knowledge Base
Custom Agent with PlugIn Retrieval
Multiple callback handlers
Custom multi-action agent
Custom agent
Custom agent with tool retrieval | https://api.python.langchain.com/en/latest/schema/langchain.schema.agent.AgentAction.html |
537fc5ad4ccd-0 | langchain.schema.runnable.router.RouterRunnable¶
class langchain.schema.runnable.router.RouterRunnable[source]¶
Bases: Serializable, Runnable[RouterInput, Output]
A runnable that routes to a set of runnables based on Input[‘key’].
Returns the output of the selected runnable.
Create a new model by parsing and validating... | https://api.python.langchain.com/en/latest/schema/langchain.schema.runnable.router.RouterRunnable.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.