id stringlengths 14 15 | text stringlengths 49 2.47k | source stringlengths 61 166 |
|---|---|---|
64c07dc5afa9-0 | langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI¶
class langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI[source]¶
Bases: Chain, BaseModel
Controller model for the BabyAGI agent.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if ... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
64c07dc5afa9-1 | Optional list of tags associated with the chain. Defaults to None.
These tags will be associated with each call to this chain,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a chain with its use case.
param task_creation_chain: langchain.chains.base... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
64c07dc5afa9-2 | these runtime callbacks will propagate to calls to other objects.
tags – List of string tags to pass to all callbacks. These will be passed in
addition to tags passed to the chain during construction, but only
these runtime tags will propagate to calls to other objects.
metadata – Optional metadata associated with the ... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
64c07dc5afa9-3 | tags – List of string tags to pass to all callbacks. These will be passed in
addition to tags passed to the chain during construction, but only
these runtime tags will propagate to calls to other objects.
metadata – Optional metadata associated with the chain. Defaults to None
include_run_info – Whether to include run ... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
64c07dc5afa9-4 | addition to tags passed to the chain during construction, but only
these runtime tags will propagate to calls to other objects.
**kwargs – If the chain expects multiple inputs, they can be passed in
directly as keyword arguments.
Returns
The chain output.
Example
# Suppose we have a single-input chain that takes a 'que... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
64c07dc5afa9-5 | Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶
Duplicate a model, optionally... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
64c07dc5afa9-6 | Initialize the BabyAGI Controller.
classmethod from_orm(obj: Any) → Model¶
get_next_task(result: str, task_description: str, objective: str, **kwargs: Any) → List[Dict][source]¶
Get the next task.
invoke(input: Dict[str, Any], config: Optional[RunnableConfig] = None) → Dict[str, Any]¶
json(*, include: Optional[Union[Ab... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
64c07dc5afa9-7 | only one param. Should contain all inputs specified in
Chain.input_keys except for inputs that will be set by the chain’s
memory.
Returns
A dictionary of all inputs, including those added by the chain’s memory.
prep_outputs(inputs: Dict[str, str], outputs: Dict[str, str], return_only_outputs: bool = False) → Dict[str, ... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
64c07dc5afa9-8 | addition to callbacks passed to the chain during construction, but only
these runtime callbacks will propagate to calls to other objects.
tags – List of string tags to pass to all callbacks. These will be passed in
addition to tags passed to the chain during construction, but only
these runtime tags will propagate to c... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
64c07dc5afa9-9 | to_json_not_implemented() → SerializedNotImplemented¶
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_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema.runnable.Runnable[~langchain... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html |
5f3e316bc2de-0 | langchain_experimental.autonomous_agents.hugginggpt.task_executor.Task¶
class langchain_experimental.autonomous_agents.hugginggpt.task_executor.Task(task: str, id: int, dep: List[int], args: Dict, tool: BaseTool)[source]¶
Methods
__init__(task, id, dep, args, tool)
completed()
failed()
pending()
run()
save_product()
__... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.hugginggpt.task_executor.Task.html |
1a7a096740c0-0 | langchain_experimental.autonomous_agents.hugginggpt.task_planner.PlanningOutputParser¶
class langchain_experimental.autonomous_agents.hugginggpt.task_planner.PlanningOutputParser[source]¶
Bases: BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.hugginggpt.task_planner.PlanningOutputParser.html |
1a7a096740c0-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/autonomous_agents/langchain_experimental.autonomous_agents.hugginggpt.task_planner.PlanningOutputParser.html |
e88a85a7ee62-0 | langchain_experimental.autonomous_agents.hugginggpt.task_executor.TaskExecutor¶
class langchain_experimental.autonomous_agents.hugginggpt.task_executor.TaskExecutor(plan: Plan)[source]¶
Load tools to execute tasks.
Methods
__init__(plan)
check_dependency(task)
completed()
describe()
failed()
pending()
run()
update_args... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.hugginggpt.task_executor.TaskExecutor.html |
98fbed7d5622-0 | langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTAction¶
class langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTAction(name: str, args: Dict)[source]¶
Action returned by AutoGPTOutputParser.
Create new instance of AutoGPTAction(name, args)
Attributes
args
Alias for field number... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTAction.html |
754fbbb0e22e-0 | langchain_experimental.autonomous_agents.hugginggpt.repsonse_generator.ResponseGenerator¶
class langchain_experimental.autonomous_agents.hugginggpt.repsonse_generator.ResponseGenerator(llm_chain: LLMChain, stop: Optional[List] = None)[source]¶
Methods
__init__(llm_chain[, stop])
generate(inputs[, callbacks])
Given inpu... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.hugginggpt.repsonse_generator.ResponseGenerator.html |
2175464a5978-0 | langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser¶
class langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser[source]¶
Bases: BaseAutoGPTOutputParser
Output parser for AutoGPT.
Create a new model by parsing and validating input data from keyword arguments.
... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser.html |
2175464a5978-1 | 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/autonomous_agents/langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser.html |
2175464a5978-2 | 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, exclude_none: bool = False, encoder: Optional[Cal... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser.html |
2175464a5978-3 | The prompt is largely provided in the event the OutputParser wants
to retry or fix the output in some way, and needs information from
the prompt to do so.
Parameters
completion – String output of a language model.
prompt – Input PromptValue.
Returns
Structured output
classmethod schema(by_alias: bool = True, ref_templa... | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser.html |
2175464a5978-4 | eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is serializable. | https://api.python.langchain.com/en/latest/autonomous_agents/langchain_experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser.html |
c5b95633f82a-0 | langchain.vectorstores.meilisearch.Meilisearch¶
class langchain.vectorstores.meilisearch.Meilisearch(embedding: Embeddings, client: Optional[Client] = None, url: Optional[str] = None, api_key: Optional[str] = None, index_name: str = 'langchain-demo', text_key: str = 'text', metadata_key: str = 'metadata')[source]¶
Init... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
c5b95633f82a-1 | Initialize with Meilisearch client.
aadd_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
aadd_texts(texts[, metadatas])
Run more texts through the embeddings and add to the vectorstore.
add_documents(documents, **kwargs)
Run more documents through the embeddings and ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
c5b95633f82a-2 | max_marginal_relevance_search(query[, k, ...])
Return docs selected using the maximal marginal relevance.
max_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.
search(query, search_type, **kwargs)
Return docs most similar to query using specified search type.
similarity... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
c5b95633f82a-3 | Run more texts through the embeddings and add to the vectorstore.
add_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documents through the embeddings and add to the vectorstore.
Parameters
(List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added text... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
c5b95633f82a-4 | Return docs selected using the maximal marginal relevance.
async amax_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶
Return docs selected using the maximal marginal relevance.
as_retriever(**kwargs: Any) → VectorStore... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
c5b95633f82a-5 | search_kwargs={'k': 5, 'fetch_k': 50}
)
# Only retrieve documents that have a relevance score
# Above a certain threshold
docsearch.as_retriever(
search_type="similarity_score_threshold",
search_kwargs={'score_threshold': 0.8}
)
# Only get the single most similar document from the dataset
docsearch.as_retriever... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
c5b95633f82a-6 | Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, client: Optional[Client] = None, url: Optional[str] = None, api_key: Optional[str] = None, index_name: str = 'langchain-demo', ids: Optional[List[str]] = ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
c5b95633f82a-7 | fetch_k – Number of Documents to fetch to pass to MMR algorithm.
lambda_mult – Number between 0 and 1 that determines the degree
of diversity among the results with 0 corresponding
to maximum diversity and 1 to minimum diversity.
Defaults to 0.5.
Returns
List of Documents selected by maximal marginal relevance.
max_mar... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
c5b95633f82a-8 | Defaults to None.
Returns
List of Documents most similar to the query
text and score for each.
Return type
List[Document]
similarity_search_by_vector(embedding: List[float], k: int = 4, filter: Optional[Dict[str, str]] = None, **kwargs: Any) → List[Document][source]¶
Return meilisearch documents most similar to embeddi... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
c5b95633f82a-9 | query – input text
k – Number of Documents to return. Defaults to 4.
**kwargs – kwargs to be passed to similarity search. Should include:
score_threshold: Optional, a floating point value between 0 to 1 to
filter the resulting set of retrieved docs
Returns
List of Tuples of (doc, similarity_score)
similarity_search_wit... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.meilisearch.Meilisearch.html |
050a58c2c27d-0 | langchain.vectorstores.tigris.Tigris¶
class langchain.vectorstores.tigris.Tigris(client: TigrisClient, embeddings: Embeddings, index_name: str)[source]¶
Initialize Tigris vector store
Attributes
embeddings
Access the query embedding object if available.
search_index
Methods
__init__(client, embeddings, index_name)
Init... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html |
050a58c2c27d-1 | Return docs most similar to query.
delete([ids])
Delete by vector ID or other criteria.
from_documents(documents, embedding, **kwargs)
Return VectorStore initialized from documents and embeddings.
from_texts(texts, embedding[, metadatas, ...])
Return VectorStore initialized from texts and embeddings.
max_marginal_relev... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html |
050a58c2c27d-2 | Run more texts through the embeddings and add to the vectorstore.
add_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documents through the embeddings and add to the vectorstore.
Parameters
(List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added text... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html |
050a58c2c27d-3 | Return docs selected using the maximal marginal relevance.
async amax_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶
Return docs selected using the maximal marginal relevance.
as_retriever(**kwargs: Any) → VectorStore... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html |
050a58c2c27d-4 | search_kwargs={'k': 5, 'fetch_k': 50}
)
# Only retrieve documents that have a relevance score
# Above a certain threshold
docsearch.as_retriever(
search_type="similarity_score_threshold",
search_kwargs={'score_threshold': 0.8}
)
# Only get the single most similar document from the dataset
docsearch.as_retriever... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html |
050a58c2c27d-5 | Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, client: Optional[TigrisClient] = None, index_name: Optional[str] = None, **kwargs: Any) → Tigris[source]¶
Return VectorSt... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html |
050a58c2c27d-6 | fetch_k – Number of Documents to fetch to pass to MMR algorithm.
lambda_mult – Number between 0 and 1 that determines the degree
of diversity among the results with 0 corresponding
to maximum diversity and 1 to minimum diversity.
Defaults to 0.5.
Returns
List of Documents selected by maximal marginal relevance.
search(... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html |
050a58c2c27d-7 | Returns
List of Tuples of (doc, similarity_score)
similarity_search_with_score(query: str, k: int = 4, filter: Optional[TigrisFilter] = None) → List[Tuple[Document, float]][source]¶
Run similarity search with Chroma with distance.
Parameters
query (str) – Query text to search for.
k (int) – Number of results to return.... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.tigris.Tigris.html |
0c1d707bee2b-0 | langchain.vectorstores.vectara.Vectara¶
class langchain.vectorstores.vectara.Vectara(vectara_customer_id: Optional[str] = None, vectara_corpus_id: Optional[str] = None, vectara_api_key: Optional[str] = None, vectara_api_timeout: int = 60)[source]¶
Implementation of Vector Store using Vectara.
See (https://vectara.com).... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
0c1d707bee2b-1 | Return VectorStore initialized from texts and embeddings.
amax_marginal_relevance_search(query[, k, ...])
Return docs selected using the maximal marginal relevance.
amax_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.
as_retriever(**kwargs)
Return VectorStoreRetriever... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
0c1d707bee2b-2 | Return docs and relevance scores in the range [0, 1].
similarity_search_with_score(query[, k, ...])
Return Vectara documents most similar to query, along with scores.
__init__(vectara_customer_id: Optional[str] = None, vectara_corpus_id: Optional[str] = None, vectara_api_key: Optional[str] = None, vectara_api_timeout: ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
0c1d707bee2b-3 | Parameters
files_list – Iterable of strings, each representing a local file path.
Files could be text, HTML, PDF, markdown, doc/docx, ppt/pptx, etc.
see API docs for full list
metadatas – Optional list of metadatas associated with each file
Returns
List of ids associated with each of the files indexed
add_texts(texts: ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
0c1d707bee2b-4 | Return docs selected using the maximal marginal relevance.
async amax_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶
Return docs selected using the maximal marginal relevance.
as_retriever(**kwargs: Any) → VectaraRetr... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
0c1d707bee2b-5 | search_kwargs={'k': 5, 'fetch_k': 50}
)
# Only retrieve documents that have a relevance score
# Above a certain threshold
docsearch.as_retriever(
search_type="similarity_score_threshold",
search_kwargs={'score_threshold': 0.8}
)
# Only get the single most similar document from the dataset
docsearch.as_retriever... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
0c1d707bee2b-6 | Return VectorStore initialized from documents and embeddings.
classmethod from_files(files: List[str], embedding: Optional[Embeddings] = None, metadatas: Optional[List[dict]] = None, **kwargs: Any) → Vectara[source]¶
Construct Vectara wrapper from raw documents.
This is intended to be a quick way to get started.
.. rub... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
0c1d707bee2b-7 | lambda_mult – Number between 0 and 1 that determines the degree
of diversity among the results with 0 corresponding
to maximum diversity and 1 to minimum diversity.
Defaults to 0.5.
Returns
List of Documents selected by maximal marginal relevance.
max_marginal_relevance_search_by_vector(embedding: List[float], k: int =... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
0c1d707bee2b-8 | filter – Dictionary of argument(s) to filter on metadata. For example a
filter can be “doc.rating > 3.0 and part.lang = ‘deu’”} see
https://docs.vectara.com/docs/search-apis/sql/filter-overview for more
details.
n_sentence_context – number of sentences before/after the matching segment
to add
Returns
List of Documents ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
0c1d707bee2b-9 | Parameters
query – Text to look up documents similar to.
k – Number of Documents to return. Defaults to 5.
lambda_val – lexical match parameter for hybrid search.
filter – Dictionary of argument(s) to filter on metadata. For example a
filter can be “doc.rating > 3.0 and part.lang = ‘deu’”} see
https://docs.vectara.com/... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.vectara.Vectara.html |
38b05876daef-0 | langchain.vectorstores.typesense.Typesense¶
class langchain.vectorstores.typesense.Typesense(typesense_client: Client, embedding: Embeddings, *, typesense_collection_name: Optional[str] = None, text_key: str = 'text')[source]¶
Wrapper around Typesense vector search.
To use, you should have the typesense python package ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html |
38b05876daef-1 | Run more documents through the embeddings and add to the vectorstore.
add_texts(texts[, metadatas, ids])
Run more texts through the embedding and add to the vectorstore.
afrom_documents(documents, embedding, **kwargs)
Return VectorStore initialized from documents and embeddings.
afrom_texts(texts, embedding[, metadatas... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html |
38b05876daef-2 | search(query, search_type, **kwargs)
Return docs most similar to query using specified search type.
similarity_search(query[, k, filter])
Return typesense documents most similar to query.
similarity_search_by_vector(embedding[, k])
Return docs most similar to embedding vector.
similarity_search_with_relevance_scores(qu... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html |
38b05876daef-3 | Run more texts through the embedding and add to the vectorstore.
Parameters
texts – Iterable of strings to add to the vectorstore.
metadatas – Optional list of metadatas associated with the texts.
ids – Optional list of ids to associate with the texts.
Returns
List of ids from adding the texts into the vectorstore.
asy... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html |
38b05876daef-4 | k: Amount of documents to return (Default: 4)
score_threshold: Minimum relevance threshold
for similarity_score_threshold
fetch_k: Amount of documents to pass to MMR algorithm (Default: 20)
lambda_mult: Diversity of results returned by MMR;
1 for minimum diversity and 0 for maximum. (Default: 0.5)
filter: Filter by doc... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html |
38b05876daef-5 | Return docs most similar to query.
async asimilarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document]¶
Return docs most similar to embedding vector.
async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs most ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html |
38b05876daef-6 | Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, typesense_client: Optional[Client] = None, typesense_client_params: Optional[dict] = None, typesense_collection_name: Opt... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html |
38b05876daef-7 | k – Number of Documents to return. Defaults to 4.
fetch_k – Number of Documents to fetch to pass to MMR algorithm.
lambda_mult – Number between 0 and 1 that determines the degree
of diversity among the results with 0 corresponding
to maximum diversity and 1 to minimum diversity.
Defaults to 0.5.
Returns
List of Documen... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html |
38b05876daef-8 | query – input text
k – Number of Documents to return. Defaults to 4.
**kwargs – kwargs to be passed to similarity search. Should include:
score_threshold: Optional, a floating point value between 0 to 1 to
filter the resulting set of retrieved docs
Returns
List of Tuples of (doc, similarity_score)
similarity_search_wit... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.typesense.Typesense.html |
85ea787527c8-0 | langchain.vectorstores.annoy.Annoy¶
class langchain.vectorstores.annoy.Annoy(embedding_function: Callable, index: Any, metric: str, docstore: Docstore, index_to_docstore_id: Dict[int, str])[source]¶
Wrapper around Annoy vector database.
To use, you should have the annoy python package installed.
Example
from langchain ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-1 | Return docs most similar to query using specified search type.
asimilarity_search(query[, k])
Return docs most similar to query.
asimilarity_search_by_vector(embedding[, k])
Return docs most similar to embedding vector.
asimilarity_search_with_relevance_scores(query)
Return docs most similar to query.
delete([ids])
Del... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-2 | Return docs and relevance scores in the range [0, 1].
similarity_search_with_score(query[, k, ...])
Return docs most similar to query.
similarity_search_with_score_by_index(...[, ...])
Return docs most similar to query.
similarity_search_with_score_by_vector(embedding)
Return docs most similar to query.
__init__(embedd... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-3 | kwargs – vectorstore specific parameters
Returns
List of ids from adding the texts into the vectorstore.
async classmethod afrom_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶
Return VectorStore initialized from documents and embeddings.
async classmethod afrom_texts(texts: List[str],... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-4 | lambda_mult: Diversity of results returned by MMR;
1 for minimum diversity and 0 for maximum. (Default: 0.5)
filter: Filter by document metadata
Returns
Retriever class for VectorStore.
Return type
VectorStoreRetriever
Examples:
# Retrieve more documents with higher diversity
# Useful if your dataset has many similar d... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-5 | Return docs most similar to embedding vector.
async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs most similar to query.
delete(ids: Optional[List[str]] = None, **kwargs: Any) → Optional[bool]¶
Delete by vector ID or other criteria.
Parameter... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-6 | from langchain.embeddings import OpenAIEmbeddings
embeddings = OpenAIEmbeddings()
text_embeddings = embeddings.embed_documents(texts)
text_embedding_pairs = list(zip(texts, text_embeddings))
db = Annoy.from_embeddings(text_embedding_pairs, embeddings)
classmethod from_texts(texts: List[str], embedding: Embeddings, meta... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-7 | embeddings – Embeddings to use when generating queries.
max_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document][source]¶
Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for similarity to query AND ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-8 | Turns annoy results into a list of documents and scores.
Parameters
idxs – List of indices of the documents in the index.
dists – List of distances of the documents in the index.
Returns
List of Documents and scores.
save_local(folder_path: str, prefault: bool = False) → None[source]¶
Save Annoy index, docstore, and in... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-9 | Returns
List of Documents most similar to the embedding.
similarity_search_by_vector(embedding: List[float], k: int = 4, search_k: int = - 1, **kwargs: Any) → List[Document][source]¶
Return docs most similar to embedding vector.
Parameters
embedding – Embedding to look up documents similar to.
k – Number of Documents t... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
85ea787527c8-10 | Returns
List of Documents most similar to the query and score for each
similarity_search_with_score_by_index(docstore_index: int, k: int = 4, search_k: int = - 1) → List[Tuple[Document, float]][source]¶
Return docs most similar to query.
Parameters
query – Text to look up documents similar to.
k – Number of Documents t... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.annoy.Annoy.html |
4f8d7907330c-0 | langchain.vectorstores.marqo.Marqo¶
class langchain.vectorstores.marqo.Marqo(client: marqo.Client, index_name: str, add_documents_settings: Optional[Dict[str, Any]] = None, searchable_attributes: Optional[List[str]] = None, page_content_builder: Optional[Callable[[Dict[str, Any]], str]] = None)[source]¶
Wrapper around ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-1 | add_texts(texts[, metadatas])
Upload texts with metadata (properties) to Marqo.
afrom_documents(documents, embedding, **kwargs)
Return VectorStore initialized from documents and embeddings.
afrom_texts(texts, embedding[, metadatas])
Return VectorStore initialized from texts and embeddings.
amax_marginal_relevance_searc... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-2 | get_number_of_documents()
Helper to see the number of documents in the index
marqo_bulk_similarity_search(queries[, k])
Return documents from Marqo using a bulk search, exposes Marqo's output directly
marqo_similarity_search(query[, k])
Return documents from Marqo exposing Marqo's output directly
max_marginal_relevance... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-3 | Returns
List of IDs of the added texts.
Return type
List[str]
async aadd_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str]¶
Run more texts through the embeddings and add to the vectorstore.
add_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documen... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-4 | Return VectorStore initialized from texts and embeddings.
async amax_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶
Return docs selected using the maximal marginal relevance.
async amax_marginal_relevance_search_by_vector(embedding: List[f... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-5 | )
# Fetch more documents for the MMR algorithm to consider
# But only return the top 5
docsearch.as_retriever(
search_type="mmr",
search_kwargs={'k': 5, 'fetch_k': 50}
)
# Only retrieve documents that have a relevance score
# Above a certain threshold
docsearch.as_retriever(
search_type="similarity_score_th... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-6 | queries.
Parameters
queries (Iterable[Union[str, Dict[str, float]]]) – An iterable of queries to
bulk (execute in) –
of (queries in the list can be strings or dictionaries) –
queries. (weighted) –
k (int, optional) – The number of documents to return for each query.
4. (Defaults to) –
Returns
A list of results for ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-7 | Return VectorStore initialized from documents. Note that Marqo does not
need embeddings, we retain the parameter to adhere to the Liskov substitution
principle.
Parameters
documents (List[Document]) – Input documents
embedding (Any, optional) – Embeddings (not required). Defaults to None.
Returns
A Marqo vectorstore
Re... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-8 | texts (List[str]) – A list of texts to index into marqo upon creation.
embedding (Any, optional) – Embeddings (not required). Defaults to None.
index_name (str, optional) – The name of the index to use, if none is
None. (accompany the texts. Defaults to) –
url (str, optional) – The URL for Marqo. Defaults to “http://l... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-9 | List[Dict[str, str]]
get_number_of_documents() → int[source]¶
Helper to see the number of documents in the index
Returns
The number of documents
Return type
int
marqo_bulk_similarity_search(queries: Iterable[Union[str, Dict[str, float]]], k: int = 4) → Dict[str, List[Dict[str, List[Dict[str, str]]]]][source]¶
Return do... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-10 | k – Number of Documents to return. Defaults to 4.
fetch_k – Number of Documents to fetch to pass to MMR algorithm.
lambda_mult – Number between 0 and 1 that determines the degree
of diversity among the results with 0 corresponding
to maximum diversity and 1 to minimum diversity.
Defaults to 0.5.
Returns
List of Documen... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-11 | query. (as a string or a weighted) –
k (int, optional) – The number of documents to return. Defaults to 4.
Returns
k documents ordered from best to worst match.
Return type
List[Document]
similarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document]¶
Return docs most similar to embedd... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
4f8d7907330c-12 | ordered by descending score.
Return type
List[Tuple[Document, float]]
Examples using Marqo¶
Marqo | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.marqo.Marqo.html |
df54bad52a1c-0 | langchain.vectorstores.chroma.Chroma¶
class langchain.vectorstores.chroma.Chroma(collection_name: str = 'langchain', embedding_function: Optional[Embeddings] = None, persist_directory: Optional[str] = None, client_settings: Optional[chromadb.config.Settings] = None, collection_metadata: Optional[Dict] = None, client: O... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-1 | amax_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.
as_retriever(**kwargs)
Return VectorStoreRetriever initialized from this VectorStore.
asearch(query, search_type, **kwargs)
Return docs most similar to query using specified search type.
asimilarity_search(query[, k... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-2 | Return docs and relevance scores in the range [0, 1].
similarity_search_with_score(query[, k, filter])
Run similarity search with Chroma with distance.
update_document(document_id, document)
Update a document in the collection.
__init__(collection_name: str = 'langchain', embedding_function: Optional[Embeddings] = None... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-3 | Run more texts through the embeddings and add to the vectorstore.
Parameters
texts (Iterable[str]) – Texts to add to the vectorstore.
metadatas (Optional[List[dict]], optional) – Optional list of metadatas.
ids (Optional[List[str]], optional) – Optional list of IDs.
Returns
List of IDs of the added texts.
Return type
L... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-4 | search function. Can include things like:
k: Amount of documents to return (Default: 4)
score_threshold: Minimum relevance threshold
for similarity_score_threshold
fetch_k: Amount of documents to pass to MMR algorithm (Default: 20)
lambda_mult: Diversity of results returned by MMR;
1 for minimum diversity and 0 for max... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-5 | Return docs most similar to query using specified search type.
async asimilarity_search(query: str, k: int = 4, **kwargs: Any) → List[Document]¶
Return docs most similar to query.
async asimilarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document]¶
Return docs most similar to embeddin... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-6 | embedding (Optional[Embeddings]) – Embedding function. Defaults to None.
client_settings (Optional[chromadb.config.Settings]) – Chroma client settings
collection_metadata (Optional[Dict]) – Collection configurations.
Defaults to None.
Returns
Chroma vectorstore.
Return type
Chroma
classmethod from_texts(texts: List[str... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-7 | Defaults to None.
Returns
Chroma vectorstore.
Return type
Chroma
get(ids: Optional[OneOrMany[ID]] = None, where: Optional[Where] = None, limit: Optional[int] = None, offset: Optional[int] = None, where_document: Optional[WhereDocument] = None, include: Optional[List[str]] = None) → Dict[str, Any][source]¶
Gets the coll... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-8 | fetch_k – Number of Documents to fetch to pass to MMR algorithm.
lambda_mult – Number between 0 and 1 that determines the degree
of diversity among the results with 0 corresponding
to maximum diversity and 1 to minimum diversity.
Defaults to 0.5.
filter (Optional[Dict[str, str]]) – Filter by metadata. Defaults to None.... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-9 | Return docs most similar to query using specified search type.
similarity_search(query: str, k: int = 4, filter: Optional[Dict[str, str]] = None, **kwargs: Any) → List[Document][source]¶
Run similarity search with Chroma.
Parameters
query (str) – Query text to search for.
k (int) – Number of results to return. Defaults... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-10 | List of documents most similar to
the query text and cosine distance in float for each.
Lower score represents more similarity.
Return type
List[Tuple[Document, float]]
similarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs and relevance scores in the ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
df54bad52a1c-11 | Chroma
Vectorstore Agent
StarRocks
Psychic
Docugami
Data Augmented Question Answering
Context aware text splitting and QA / Chat
QA over Documents
Running LLMs locally
Perform context-aware text splitting
Use local LLMs
Retrieve from vector stores directly
Improve document indexing with HyDE
Structure answers with Open... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.chroma.Chroma.html |
50fa38b2bdcb-0 | langchain.vectorstores.singlestoredb.SingleStoreDB¶
class langchain.vectorstores.singlestoredb.SingleStoreDB(embedding: Embeddings, *, distance_strategy: DistanceStrategy = DistanceStrategy.DOT_PRODUCT, table_name: str = 'embeddings', content_field: str = 'content', metadata_field: str = 'metadata', vector_field: str =... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.singlestoredb.SingleStoreDB.html |
50fa38b2bdcb-1 | Defaults to “vector”.
pool (Following arguments pertain to the connection) –
pool_size (int, optional) – Determines the number of active connections in
the pool. Defaults to 5.
max_overflow (int, optional) – Determines the maximum number of connections
allowed beyond the pool_size. Defaults to 10.
timeout (float, opti... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.singlestoredb.SingleStoreDB.html |
50fa38b2bdcb-2 | Automatically enabled if ssl_ca is specified.
ssl_verify_identity (bool, optional) – Verifies the server’s identity.
conv (dict[int, Callable], optional) – A dictionary of data conversion
functions.
credential_type (str, optional) – Specifies the type of authentication to
use: auth.PASSWORD, auth.JWT, or auth.BROWSER_S... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.singlestoredb.SingleStoreDB.html |
50fa38b2bdcb-3 | Attributes
embeddings
Access the query embedding object if available.
vector_field
Pass the rest of the kwargs to the connection.
connection_kwargs
Add program name and version to connection attributes.
Methods
__init__(embedding, *[, distance_strategy, ...])
Initialize with necessary components.
aadd_documents(documen... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.singlestoredb.SingleStoreDB.html |
50fa38b2bdcb-4 | from_documents(documents, embedding, **kwargs)
Return VectorStore initialized from documents and embeddings.
from_texts(texts, embedding[, metadatas, ...])
Create a SingleStoreDB vectorstore from raw documents. This is a user-friendly interface that: 1. Embeds documents. 2. Creates a new table for the embeddings in... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.singlestoredb.SingleStoreDB.html |
50fa38b2bdcb-5 | distance_strategy (DistanceStrategy, optional) – Determines the strategy employed for calculating
the distance between vectors in the embedding space.
Defaults to DOT_PRODUCT.
Available options are:
- DOT_PRODUCT: Computes the scalar product of two vectors.
This is the default behavior
EUCLIDEAN_DISTANCE: Computes the ... | https://api.python.langchain.com/en/latest/vectorstores/langchain.vectorstores.singlestoredb.SingleStoreDB.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.