langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever¶
class langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever[source]¶
Bases: BaseRetriever
ChatGPT plugin retriever.
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 aiosession: Optional[aiohttp.ClientSession] = None¶
Aiohttp session to use for requests.
param bearer_token: str [Required]¶
Bearer token for the ChatGPT plugin.
param filter: Optional[dict] = None¶
Filter to apply to the results.
param metadata: Optional[Dict[str, Any]] = None¶
Optional metadata associated with the retriever. Defaults to None
This metadata 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.
param tags: Optional[List[str]] = None¶
Optional list of tags associated with the retriever. Defaults to None
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.
param top_k: int = 3¶
Number of documents to return.
param url: str [Required]¶
URL of the ChatGPT plugin.
async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs: Optional[Any]) → List[Output]¶
Default implementation of abatch, which calls ainvoke N times.