id
stringlengths
14
15
text
stringlengths
35
2.07k
embedding
sequence
source
stringlengths
61
154
b81c7bd1ed05-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'Python_REPL'¶ The unique name of the tool that clearly communicates its purpose. param python_repl: langchain.utilities.python.PythonREPL [Optional]¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param sanitize_input: bool = True¶ param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object.
[ 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 31380, 2241, 2989, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 10344, 1311, 501, 25, 8859, 8995, 63795, 44293, 1087, 27993, 793, 2989, 510, 15669, 60, 55609, 198, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 46283, 6022, 25, 1845, 284, 3082, 55609, 198, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.python.tool.PythonREPLTool.html
b81c7bd1ed05-2
model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.python.tool.PythonREPLTool.html
ec06f5ece71b-0
langchain.tools.playwright.base.BaseBrowserTool¶ class langchain.tools.playwright.base.BaseBrowserTool(*, name: str, description: str, args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, sync_browser: Optional['SyncBrowser'] = None, async_browser: Optional['AsyncBrowser'] = None)[source]¶ Bases: BaseTool Base class for browser tools. 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 args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param async_browser: Optional['AsyncBrowser'] = None¶ param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str [Required]¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str [Required]¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means
[ 5317, 8995, 24029, 13269, 53852, 9105, 13316, 18360, 7896, 55609, 198, 1058, 8859, 8995, 24029, 13269, 53852, 9105, 13316, 18360, 7896, 4163, 11, 836, 25, 610, 11, 4096, 25, 610, 11, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 13105, 54514, 25, 12536, 681, 12430, 18360, 663, 284, 2290, 11, 3393, 54514, 25, 12536, 681, 6662, 18360, 663, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 7896, 198, 4066, 538, 369, 7074, 7526, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 3393, 54514, 25, 12536, 681, 6662, 18360, 663, 284, 2290, 55609, 198, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 510, 8327, 60, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 510, 8327, 60, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.playwright.base.BaseBrowserTool.html
ec06f5ece71b-1
Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param sync_browser: Optional['SyncBrowser'] = None¶ param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_browser(sync_browser: Optional[SyncBrowser] = None, async_browser: Optional[AsyncBrowser] = None) → BaseBrowserTool[source]¶ Instantiate the tool. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. validator validate_browser_provided  »  all fields[source]¶ Check that the arguments are valid. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 13105, 54514, 25, 12536, 681, 12430, 18360, 663, 284, 2290, 55609, 198, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 27853, 505, 54514, 98333, 54514, 25, 12536, 58, 12430, 18360, 60, 284, 2290, 11, 3393, 54514, 25, 12536, 58, 6662, 18360, 60, 284, 2290, 8, 11651, 5464, 18360, 7896, 76747, 60, 55609, 198, 81651, 279, 5507, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 16503, 9788, 54514, 2602, 44057, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 4061, 430, 279, 6105, 527, 2764, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.playwright.base.BaseBrowserTool.html
31177abb145a-0
langchain.tools.openweathermap.tool.OpenWeatherMapQueryRun¶ class langchain.tools.openweathermap.tool.OpenWeatherMapQueryRun(*, name: str = 'OpenWeatherMap', description: str = 'A wrapper around OpenWeatherMap API. Useful for fetching current weather information for a specified location. Input should be a location string (e.g. London,GB).', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: OpenWeatherMapAPIWrapper = None)[source]¶ Bases: BaseTool Tool that adds the capability to query using the OpenWeatherMap API. 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 api_wrapper: langchain.utilities.openweathermap.OpenWeatherMapAPIWrapper [Optional]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A wrapper around OpenWeatherMap API. Useful for fetching current weather information for a specified location. Input should be a location string (e.g. London,GB).'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
[ 5317, 8995, 24029, 5949, 91962, 21966, 13250, 30081, 2276, 2929, 6869, 55609, 198, 1058, 8859, 8995, 24029, 5949, 91962, 21966, 13250, 30081, 2276, 2929, 6869, 4163, 11, 836, 25, 610, 284, 364, 5109, 30081, 2276, 518, 4096, 25, 610, 284, 364, 32, 13564, 2212, 5377, 30081, 2276, 5446, 13, 51612, 369, 45334, 1510, 9282, 2038, 369, 264, 5300, 3813, 13, 5688, 1288, 387, 264, 3813, 925, 320, 68, 1326, 13, 7295, 11, 5494, 570, 518, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 6464, 24474, 25, 5377, 30081, 2276, 7227, 11803, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 7896, 198, 7896, 430, 11621, 279, 23099, 311, 3319, 1701, 279, 5377, 30081, 2276, 5446, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 6464, 24474, 25, 8859, 8995, 63795, 5949, 91962, 13250, 30081, 2276, 7227, 11803, 510, 15669, 60, 55609, 198, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 32, 13564, 2212, 5377, 30081, 2276, 5446, 13, 51612, 369, 45334, 1510, 9282, 2038, 369, 264, 5300, 3813, 13, 5688, 1288, 387, 264, 3813, 925, 320, 68, 1326, 13, 7295, 11, 5494, 50522, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.openweathermap.tool.OpenWeatherMapQueryRun.html
31177abb145a-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'OpenWeatherMap'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 5109, 30081, 2276, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.openweathermap.tool.OpenWeatherMapQueryRun.html
5e0f0c1832ee-0
langchain.tools.spark_sql.tool.ListSparkSQLTool¶ class langchain.tools.spark_sql.tool.ListSparkSQLTool(*, name: str = 'list_tables_sql_db', description: str = 'Input is an empty string, output is a comma separated list of tables in the Spark SQL.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, db: SparkSQL)[source]¶ Bases: BaseSparkSQLTool, BaseTool Tool for getting tables names. 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 args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param db: langchain.utilities.spark_sql.SparkSQL [Required]¶ param description: str = 'Input is an empty string, output is a comma separated list of tables in the Spark SQL.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'list_tables_sql_db'¶
[ 5317, 8995, 24029, 33646, 18554, 21966, 5937, 68583, 6827, 7896, 55609, 198, 1058, 8859, 8995, 24029, 33646, 18554, 21966, 5937, 68583, 6827, 7896, 4163, 11, 836, 25, 610, 284, 364, 1638, 36732, 18554, 8856, 518, 4096, 25, 610, 284, 364, 2566, 374, 459, 4384, 925, 11, 2612, 374, 264, 32783, 19180, 1160, 315, 12920, 304, 279, 27565, 8029, 16045, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 3000, 25, 27565, 6827, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 68583, 6827, 7896, 11, 5464, 7896, 198, 7896, 369, 3794, 12920, 5144, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 3000, 25, 8859, 8995, 63795, 33646, 18554, 815, 29836, 6827, 510, 8327, 60, 55609, 198, 913, 4096, 25, 610, 284, 364, 2566, 374, 459, 4384, 925, 11, 2612, 374, 264, 32783, 19180, 1160, 315, 12920, 304, 279, 27565, 8029, 3238, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 1638, 36732, 18554, 8856, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.spark_sql.tool.ListSparkSQLTool.html
5e0f0c1832ee-1
param name: str = 'list_tables_sql_db'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: Config Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 913, 836, 25, 610, 284, 364, 1638, 36732, 18554, 8856, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 5649, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.spark_sql.tool.ListSparkSQLTool.html
67530443b75a-0
langchain.tools.gmail.utils.get_gmail_credentials¶ langchain.tools.gmail.utils.get_gmail_credentials(token_file: Optional[str] = None, client_secrets_file: Optional[str] = None, scopes: Optional[List[str]] = None) → Credentials[source]¶ Get credentials.
[ 5317, 8995, 24029, 73054, 8576, 673, 1928, 3796, 48496, 55609, 198, 5317, 8995, 24029, 73054, 8576, 673, 1928, 3796, 48496, 13577, 2517, 25, 12536, 17752, 60, 284, 2290, 11, 3016, 3537, 53810, 2517, 25, 12536, 17752, 60, 284, 2290, 11, 51698, 25, 12536, 53094, 17752, 5163, 284, 2290, 8, 11651, 62360, 76747, 60, 55609, 198, 1991, 16792, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.utils.get_gmail_credentials.html
a503fc8ae8a0-0
langchain.tools.plugin.ApiConfig¶ class langchain.tools.plugin.ApiConfig(*, type: str, url: str, has_user_authentication: Optional[bool] = False)[source]¶ Bases: BaseModel 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 has_user_authentication: Optional[bool] = False¶ param type: str [Required]¶ param url: str [Required]¶
[ 5317, 8995, 24029, 28067, 21721, 2714, 55609, 198, 1058, 8859, 8995, 24029, 28067, 21721, 2714, 4163, 11, 955, 25, 610, 11, 2576, 25, 610, 11, 706, 3398, 90565, 25, 12536, 58, 2707, 60, 284, 3641, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 706, 3398, 90565, 25, 12536, 58, 2707, 60, 284, 3641, 55609, 198, 913, 955, 25, 610, 510, 8327, 60, 55609, 198, 913, 2576, 25, 610, 510, 8327, 60, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.plugin.ApiConfig.html
d9ff2412c041-0
langchain.tools.requests.tool.RequestsDeleteTool¶ class langchain.tools.requests.tool.RequestsDeleteTool(*, name: str = 'requests_delete', description: str = 'A portal to the internet. Use this when you need to make a DELETE request to a URL. Input should be a specific url, and the output will be the text response of the DELETE request.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, requests_wrapper: TextRequestsWrapper)[source]¶ Bases: BaseRequestsTool, BaseTool Tool for making a DELETE request to an API endpoint. 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 args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A portal to the internet. Use this when you need to make a DELETE request to a URL. Input should be a specific url, and the output will be the text response of the DELETE request.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
[ 5317, 8995, 24029, 68771, 21966, 9856, 82, 6571, 7896, 55609, 198, 1058, 8859, 8995, 24029, 68771, 21966, 9856, 82, 6571, 7896, 4163, 11, 836, 25, 610, 284, 364, 37342, 11607, 518, 4096, 25, 610, 284, 364, 32, 24007, 311, 279, 7757, 13, 5560, 420, 994, 499, 1205, 311, 1304, 264, 17640, 1715, 311, 264, 5665, 13, 5688, 1288, 387, 264, 3230, 2576, 11, 323, 279, 2612, 690, 387, 279, 1495, 2077, 315, 279, 17640, 1715, 16045, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 7540, 24474, 25, 2991, 36395, 11803, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 36395, 7896, 11, 5464, 7896, 198, 7896, 369, 3339, 264, 17640, 1715, 311, 459, 5446, 15233, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 32, 24007, 311, 279, 7757, 13, 5560, 420, 994, 499, 1205, 311, 1304, 264, 17640, 1715, 311, 264, 5665, 13, 5688, 1288, 387, 264, 3230, 2576, 11, 323, 279, 2612, 690, 387, 279, 1495, 2077, 315, 279, 17640, 1715, 3238, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.requests.tool.RequestsDeleteTool.html
d9ff2412c041-1
Handle the content of the ToolException thrown. param name: str = 'requests_delete'¶ The unique name of the tool that clearly communicates its purpose. param requests_wrapper: langchain.requests.TextRequestsWrapper [Required]¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 37342, 11607, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 7540, 24474, 25, 8859, 8995, 68771, 2021, 36395, 11803, 510, 8327, 60, 55609, 198, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.requests.tool.RequestsDeleteTool.html
d5c4209a9d88-0
langchain.tools.searx_search.tool.SearxSearchResults¶ class langchain.tools.searx_search.tool.SearxSearchResults(*, name: str = 'Searx Search Results', description: str = 'A meta search engine.Useful for when you need to answer questions about current events.Input should be a search query. Output is a JSON array of the query results', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, wrapper: SearxSearchWrapper, num_results: int = 4, kwargs: dict = None, **extra_data: Any)[source]¶ Bases: BaseTool Tool that has the capability to query a Searx instance and get back json. 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 args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A meta search engine.Useful for when you need to answer questions about current events.Input should be a search query. Output is a JSON array of the query results'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
[ 5317, 8995, 24029, 4624, 277, 87, 10947, 21966, 815, 686, 87, 6014, 10001, 55609, 198, 1058, 8859, 8995, 24029, 4624, 277, 87, 10947, 21966, 815, 686, 87, 6014, 10001, 4163, 11, 836, 25, 610, 284, 364, 50, 686, 87, 7694, 18591, 518, 4096, 25, 610, 284, 364, 32, 8999, 2778, 4817, 9223, 1285, 369, 994, 499, 1205, 311, 4320, 4860, 922, 1510, 4455, 16521, 1288, 387, 264, 2778, 3319, 13, 9442, 374, 264, 4823, 1358, 315, 279, 3319, 3135, 518, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 13564, 25, 328, 686, 87, 6014, 11803, 11, 1661, 13888, 25, 528, 284, 220, 19, 11, 16901, 25, 6587, 284, 2290, 11, 3146, 15824, 1807, 25, 5884, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 7896, 198, 7896, 430, 706, 279, 23099, 311, 3319, 264, 328, 686, 87, 2937, 323, 636, 1203, 3024, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 32, 8999, 2778, 4817, 9223, 1285, 369, 994, 499, 1205, 311, 4320, 4860, 922, 1510, 4455, 16521, 1288, 387, 264, 2778, 3319, 13, 9442, 374, 264, 4823, 1358, 315, 279, 3319, 3135, 6, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.searx_search.tool.SearxSearchResults.html
d5c4209a9d88-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param kwargs: dict [Optional]¶ param name: str = 'Searx Search Results'¶ The unique name of the tool that clearly communicates its purpose. param num_results: int = 4¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. param wrapper: langchain.utilities.searx_search.SearxSearchWrapper [Required]¶ __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config[source]¶
[ 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 16901, 25, 6587, 510, 15669, 60, 55609, 198, 913, 836, 25, 610, 284, 364, 50, 686, 87, 7694, 18591, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 1661, 13888, 25, 528, 284, 220, 19, 55609, 198, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 913, 13564, 25, 8859, 8995, 63795, 4624, 277, 87, 10947, 815, 686, 87, 6014, 11803, 510, 8327, 60, 55609, 198, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 76747, 60, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.searx_search.tool.SearxSearchResults.html
d5c4209a9d88-2
Whether the tool only accepts a single input. model Config[source]¶ Bases: object Pydantic config. extra = 'allow'¶
[ 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 14149, 67, 8322, 2242, 627, 15824, 284, 364, 7331, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.searx_search.tool.SearxSearchResults.html
d401fda5bb82-0
langchain.tools.file_management.utils.BaseFileToolMixin¶ class langchain.tools.file_management.utils.BaseFileToolMixin(*, root_dir: Optional[str] = None)[source]¶ Bases: BaseModel Mixin for file system tools. 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 root_dir: Optional[str] = None¶ The final path will be chosen relative to root_dir if specified. get_relative_path(file_path: str) → Path[source]¶ Get the relative path, returning an error if unsupported.
[ 5317, 8995, 24029, 9914, 46463, 8576, 13316, 1738, 7896, 39556, 55609, 198, 1058, 8859, 8995, 24029, 9914, 46463, 8576, 13316, 1738, 7896, 39556, 4163, 11, 3789, 4432, 25, 12536, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 198, 39556, 369, 1052, 1887, 7526, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 3789, 4432, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 1620, 1853, 690, 387, 12146, 8844, 311, 3789, 4432, 422, 5300, 627, 456, 30386, 2703, 4971, 2703, 25, 610, 8, 11651, 8092, 76747, 60, 55609, 198, 1991, 279, 8844, 1853, 11, 13758, 459, 1493, 422, 41509, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.utils.BaseFileToolMixin.html
5292fb78cfa7-0
langchain.tools.bing_search.tool.BingSearchResults¶ class langchain.tools.bing_search.tool.BingSearchResults(*, name: str = 'Bing Search Results JSON', description: str = 'A wrapper around Bing Search. Useful for when you need to answer questions about current events. Input should be a search query. Output is a JSON array of the query results', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, num_results: int = 4, api_wrapper: BingSearchAPIWrapper)[source]¶ Bases: BaseTool Tool that has capability to query the Bing Search API and get back json. 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 api_wrapper: langchain.utilities.bing_search.BingSearchAPIWrapper [Required]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A wrapper around Bing Search. Useful for when you need to answer questions about current events. Input should be a search query. Output is a JSON array of the query results'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
[ 5317, 8995, 24029, 960, 287, 10947, 21966, 1823, 287, 6014, 10001, 55609, 198, 1058, 8859, 8995, 24029, 960, 287, 10947, 21966, 1823, 287, 6014, 10001, 4163, 11, 836, 25, 610, 284, 364, 33, 287, 7694, 18591, 4823, 518, 4096, 25, 610, 284, 364, 32, 13564, 2212, 54587, 7694, 13, 51612, 369, 994, 499, 1205, 311, 4320, 4860, 922, 1510, 4455, 13, 5688, 1288, 387, 264, 2778, 3319, 13, 9442, 374, 264, 4823, 1358, 315, 279, 3319, 3135, 518, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 1661, 13888, 25, 528, 284, 220, 19, 11, 6464, 24474, 25, 54587, 6014, 7227, 11803, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 7896, 198, 7896, 430, 706, 23099, 311, 3319, 279, 54587, 7694, 5446, 323, 636, 1203, 3024, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 6464, 24474, 25, 8859, 8995, 63795, 960, 287, 10947, 1823, 287, 6014, 7227, 11803, 510, 8327, 60, 55609, 198, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 32, 13564, 2212, 54587, 7694, 13, 51612, 369, 994, 499, 1205, 311, 4320, 4860, 922, 1510, 4455, 13, 5688, 1288, 387, 264, 2778, 3319, 13, 9442, 374, 264, 4823, 1358, 315, 279, 3319, 3135, 6, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.bing_search.tool.BingSearchResults.html
5292fb78cfa7-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'Bing Search Results JSON'¶ The unique name of the tool that clearly communicates its purpose. param num_results: int = 4¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 33, 287, 7694, 18591, 4823, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 1661, 13888, 25, 528, 284, 220, 19, 55609, 198, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.bing_search.tool.BingSearchResults.html
00ccbd6c7337-0
langchain.tools.file_management.file_search.FileSearchTool¶ class langchain.tools.file_management.file_search.FileSearchTool(*, name: str = 'file_search', description: str = 'Recursively search for files in a subdirectory that match the regex pattern', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.file_management.file_search.FileSearchInput'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, root_dir: ~typing.Optional[str] = None)[source]¶ Bases: BaseFileToolMixin, BaseTool 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 args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.file_management.file_search.FileSearchInput'>¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Recursively search for files in a subdirectory that match the regex pattern'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
[ 5317, 8995, 24029, 9914, 46463, 9914, 10947, 8744, 6014, 7896, 55609, 198, 1058, 8859, 8995, 24029, 9914, 46463, 9914, 10947, 8744, 6014, 7896, 4163, 11, 836, 25, 610, 284, 364, 1213, 10947, 518, 4096, 25, 610, 284, 364, 3905, 80837, 2778, 369, 3626, 304, 264, 1207, 23905, 430, 2489, 279, 20791, 5497, 518, 2897, 26443, 25, 4056, 90902, 10394, 58, 93, 3368, 67, 8322, 9056, 13316, 1747, 60, 284, 366, 1058, 364, 5317, 8995, 24029, 9914, 46463, 9914, 10947, 8744, 6014, 2566, 6404, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 4056, 90902, 37464, 58, 93, 90902, 10840, 290, 58, 93, 90902, 5937, 58, 93, 5317, 8995, 72134, 9105, 13316, 7646, 3126, 1145, 4056, 5317, 8995, 72134, 9105, 13316, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 4056, 90902, 37464, 58, 93, 5317, 8995, 72134, 9105, 13316, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 4056, 90902, 37464, 58, 93, 90902, 10840, 290, 58, 2707, 11, 610, 11, 4056, 90902, 28115, 481, 15873, 93, 5317, 8995, 24029, 9105, 25443, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 3789, 4432, 25, 4056, 90902, 37464, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 1738, 7896, 39556, 11, 5464, 7896, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2897, 26443, 25, 4078, 58, 3368, 67, 8322, 9056, 13316, 1747, 60, 284, 366, 1058, 364, 5317, 8995, 24029, 9914, 46463, 9914, 10947, 8744, 6014, 2566, 6404, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 3905, 80837, 2778, 369, 3626, 304, 264, 1207, 23905, 430, 2489, 279, 20791, 5497, 6, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
00ccbd6c7337-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'file_search'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param root_dir: Optional[str] = None¶ The final path will be chosen relative to root_dir if specified. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. get_relative_path(file_path: str) → Path¶ Get the relative path, returning an error if unsupported. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input.
[ 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 1213, 10947, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 3789, 4432, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 1620, 1853, 690, 387, 12146, 8844, 311, 3789, 4432, 422, 5300, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 456, 30386, 2703, 4971, 2703, 25, 610, 8, 11651, 8092, 55609, 198, 1991, 279, 8844, 1853, 11, 13758, 459, 1493, 422, 41509, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
00ccbd6c7337-2
property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
4c4c087d65a3-0
langchain.tools.scenexplain.tool.SceneXplainTool¶ class langchain.tools.scenexplain.tool.SceneXplainTool(*, name: str = 'image_explainer', description: str = 'An Image Captioning Tool: Use this tool to generate a detailed caption for an image. The input can be an image file of any format, and the output will be a text description that covers every detail of the image.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: SceneXplainAPIWrapper = None)[source]¶ Bases: BaseTool Tool that adds the capability to explain images. 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 api_wrapper: langchain.utilities.scenexplain.SceneXplainAPIWrapper [Optional]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'An Image Captioning Tool: Use this tool to generate a detailed caption for an image. The input can be an image file of any format, and the output will be a text description that covers every detail of the image.'¶ Used to tell the model how/when/why to use the tool.
[ 5317, 8995, 24029, 7840, 268, 95444, 21966, 37127, 55, 21435, 7896, 55609, 198, 1058, 8859, 8995, 24029, 7840, 268, 95444, 21966, 37127, 55, 21435, 7896, 4163, 11, 836, 25, 610, 284, 364, 1843, 2769, 501, 1780, 518, 4096, 25, 610, 284, 364, 2127, 4758, 38700, 287, 13782, 25, 5560, 420, 5507, 311, 7068, 264, 11944, 17703, 369, 459, 2217, 13, 578, 1988, 649, 387, 459, 2217, 1052, 315, 904, 3645, 11, 323, 279, 2612, 690, 387, 264, 1495, 4096, 430, 14861, 1475, 7872, 315, 279, 2217, 16045, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 6464, 24474, 25, 17952, 55, 21435, 7227, 11803, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 7896, 198, 7896, 430, 11621, 279, 23099, 311, 10552, 5448, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 6464, 24474, 25, 8859, 8995, 63795, 7840, 268, 95444, 37127, 55, 21435, 7227, 11803, 510, 15669, 60, 55609, 198, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 2127, 4758, 38700, 287, 13782, 25, 5560, 420, 5507, 311, 7068, 264, 11944, 17703, 369, 459, 2217, 13, 578, 1988, 649, 387, 459, 2217, 1052, 315, 904, 3645, 11, 323, 279, 2612, 690, 387, 264, 1495, 4096, 430, 14861, 1475, 7872, 315, 279, 2217, 3238, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.scenexplain.tool.SceneXplainTool.html
4c4c087d65a3-1
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'image_explainer'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶
[ 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 1843, 2769, 501, 1780, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.scenexplain.tool.SceneXplainTool.html
4c4c087d65a3-2
Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.scenexplain.tool.SceneXplainTool.html
73bb4596917b-0
langchain.tools.gmail.get_message.GmailGetMessage¶ class langchain.tools.gmail.get_message.GmailGetMessage(*, name: str = 'get_gmail_message', description: str = 'Use this tool to fetch an email by message ID. Returns the thread ID, snipet, body, subject, and sender.', args_schema: ~typing.Type[~langchain.tools.gmail.get_message.SearchArgsSchema] = <class 'langchain.tools.gmail.get_message.SearchArgsSchema'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, api_resource: Resource = None)[source]¶ Bases: GmailBaseTool 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 api_resource: Resource [Optional]¶ param args_schema: Type[langchain.tools.gmail.get_message.SearchArgsSchema] = <class 'langchain.tools.gmail.get_message.SearchArgsSchema'>¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Use this tool to fetch an email by message ID. Returns the thread ID, snipet, body, subject, and sender.'¶
[ 5317, 8995, 24029, 73054, 673, 6598, 1246, 3796, 1991, 2097, 55609, 198, 1058, 8859, 8995, 24029, 73054, 673, 6598, 1246, 3796, 1991, 2097, 4163, 11, 836, 25, 610, 284, 364, 456, 1928, 3796, 6598, 518, 4096, 25, 610, 284, 364, 10464, 420, 5507, 311, 7963, 459, 2613, 555, 1984, 3110, 13, 5295, 279, 4617, 3110, 11, 4224, 575, 295, 11, 2547, 11, 3917, 11, 323, 4750, 16045, 2897, 26443, 25, 4056, 90902, 10394, 58, 93, 5317, 8995, 24029, 73054, 673, 6598, 33003, 4209, 8802, 60, 284, 366, 1058, 364, 5317, 8995, 24029, 73054, 673, 6598, 33003, 4209, 8802, 6404, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 4056, 90902, 37464, 58, 93, 90902, 10840, 290, 58, 93, 90902, 5937, 58, 93, 5317, 8995, 72134, 9105, 13316, 7646, 3126, 1145, 4056, 5317, 8995, 72134, 9105, 13316, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 4056, 90902, 37464, 58, 93, 5317, 8995, 72134, 9105, 13316, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 4056, 90902, 37464, 58, 93, 90902, 10840, 290, 58, 2707, 11, 610, 11, 4056, 90902, 28115, 481, 15873, 93, 5317, 8995, 24029, 9105, 25443, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 6464, 18446, 25, 12027, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 62046, 4066, 7896, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 6464, 18446, 25, 12027, 510, 15669, 60, 55609, 198, 913, 2897, 26443, 25, 4078, 58, 5317, 8995, 24029, 73054, 673, 6598, 33003, 4209, 8802, 60, 284, 366, 1058, 364, 5317, 8995, 24029, 73054, 673, 6598, 33003, 4209, 8802, 6404, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 10464, 420, 5507, 311, 7963, 459, 2613, 555, 1984, 3110, 13, 5295, 279, 4617, 3110, 11, 4224, 575, 295, 11, 2547, 11, 3917, 11, 323, 4750, 3238, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.get_message.GmailGetMessage.html
73bb4596917b-1
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'get_gmail_message'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_api_resource(api_resource: Resource) → GmailBaseTool¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object
[ 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 456, 1928, 3796, 6598, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 27853, 505, 11959, 18446, 25865, 18446, 25, 12027, 8, 11651, 62046, 4066, 7896, 55609, 198, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.get_message.GmailGetMessage.html
73bb4596917b-2
Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.get_message.GmailGetMessage.html
6d6b5e62aa06-0
langchain.tools.base.ToolException¶ class langchain.tools.base.ToolException[source]¶ Bases: Exception An optional exception that tool throws when execution error occurs. When this exception is thrown, the agent will not stop working, but will handle the exception according to the handle_tool_error variable of the tool, and the processing result will be returned to the agent as observation, and printed in red on the console. add_note()¶ Exception.add_note(note) – add a note to the exception with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self. args¶
[ 5317, 8995, 24029, 9105, 25443, 1378, 55609, 198, 1058, 8859, 8995, 24029, 9105, 25443, 1378, 76747, 60, 55609, 198, 33, 2315, 25, 4204, 198, 2127, 10309, 4788, 430, 5507, 3872, 994, 11572, 1493, 13980, 627, 4599, 420, 4788, 374, 15338, 11, 279, 8479, 690, 539, 3009, 3318, 345, 8248, 690, 3790, 279, 4788, 4184, 311, 279, 3790, 23627, 4188, 198, 10014, 315, 279, 5507, 11, 323, 279, 8863, 1121, 690, 387, 6052, 198, 998, 279, 8479, 439, 22695, 11, 323, 17124, 304, 2579, 389, 279, 2393, 627, 723, 28306, 368, 55609, 198, 1378, 1388, 28306, 45151, 8, 1389, 198, 723, 264, 5296, 311, 279, 4788, 198, 4291, 24489, 1445, 368, 55609, 198, 1378, 18662, 24489, 1445, 62514, 8, 1389, 198, 751, 659, 4952, 15417, 1445, 565, 311, 16767, 323, 471, 659, 627, 2164, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.base.ToolException.html
108f5705ada7-0
langchain.tools.scenexplain.tool.SceneXplainInput¶ class langchain.tools.scenexplain.tool.SceneXplainInput(*, query: str)[source]¶ Bases: BaseModel Input for SceneXplain. 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 query: str [Required]¶ The link to the image to explain
[ 5317, 8995, 24029, 7840, 268, 95444, 21966, 37127, 55, 21435, 2566, 55609, 198, 1058, 8859, 8995, 24029, 7840, 268, 95444, 21966, 37127, 55, 21435, 2566, 4163, 11, 3319, 25, 610, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 198, 2566, 369, 17952, 55, 21435, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 3319, 25, 610, 510, 8327, 60, 55609, 198, 791, 2723, 311, 279, 2217, 311, 10552 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.scenexplain.tool.SceneXplainInput.html
284c50a10029-0
langchain.tools.requests.tool.RequestsGetTool¶ class langchain.tools.requests.tool.RequestsGetTool(*, name: str = 'requests_get', description: str = 'A portal to the internet. Use this when you need to get specific content from a website. Input should be a  url (i.e. https://www.google.com). The output will be the text response of the GET request.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, requests_wrapper: TextRequestsWrapper)[source]¶ Bases: BaseRequestsTool, BaseTool Tool for making a GET request to an API endpoint. 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 args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A portal to the internet. Use this when you need to get specific content from a website. Input should be a  url (i.e. https://www.google.com). The output will be the text response of the GET request.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
[ 5317, 8995, 24029, 68771, 21966, 9856, 82, 1991, 7896, 55609, 198, 1058, 8859, 8995, 24029, 68771, 21966, 9856, 82, 1991, 7896, 4163, 11, 836, 25, 610, 284, 364, 37342, 3138, 518, 4096, 25, 610, 284, 364, 32, 24007, 311, 279, 7757, 13, 5560, 420, 994, 499, 1205, 311, 636, 3230, 2262, 505, 264, 3997, 13, 5688, 1288, 387, 264, 4194, 2576, 320, 72, 1770, 13, 3788, 1129, 2185, 5831, 916, 570, 578, 2612, 690, 387, 279, 1495, 2077, 315, 279, 8049, 1715, 16045, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 7540, 24474, 25, 2991, 36395, 11803, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 36395, 7896, 11, 5464, 7896, 198, 7896, 369, 3339, 264, 8049, 1715, 311, 459, 5446, 15233, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 32, 24007, 311, 279, 7757, 13, 5560, 420, 994, 499, 1205, 311, 636, 3230, 2262, 505, 264, 3997, 13, 5688, 1288, 387, 264, 4194, 2576, 320, 72, 1770, 13, 3788, 1129, 2185, 5831, 916, 570, 578, 2612, 690, 387, 279, 1495, 2077, 315, 279, 8049, 1715, 3238, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.requests.tool.RequestsGetTool.html
284c50a10029-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'requests_get'¶ The unique name of the tool that clearly communicates its purpose. param requests_wrapper: langchain.requests.TextRequestsWrapper [Required]¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 37342, 3138, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 7540, 24474, 25, 8859, 8995, 68771, 2021, 36395, 11803, 510, 8327, 60, 55609, 198, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.requests.tool.RequestsGetTool.html
284c50a10029-2
arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.requests.tool.RequestsGetTool.html
6ddf02b42449-0
langchain.tools.gmail.base.GmailBaseTool¶ class langchain.tools.gmail.base.GmailBaseTool(*, name: str, description: str, args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_resource: Resource = None)[source]¶ Bases: BaseTool 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 api_resource: Resource [Optional]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str [Required]¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str [Required]¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress.
[ 5317, 8995, 24029, 73054, 9105, 1246, 3796, 4066, 7896, 55609, 198, 1058, 8859, 8995, 24029, 73054, 9105, 1246, 3796, 4066, 7896, 4163, 11, 836, 25, 610, 11, 4096, 25, 610, 11, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 6464, 18446, 25, 12027, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 7896, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 6464, 18446, 25, 12027, 510, 15669, 60, 55609, 198, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 510, 8327, 60, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 510, 8327, 60, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
6ddf02b42449-1
param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_api_resource(api_resource: Resource) → GmailBaseTool[source]¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 27853, 505, 11959, 18446, 25865, 18446, 25, 12027, 8, 11651, 62046, 4066, 7896, 76747, 60, 55609, 198, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
047a0182fba6-0
langchain.tools.google_serper.tool.GoogleSerperResults¶ class langchain.tools.google_serper.tool.GoogleSerperResults(*, name: str = 'Google Serrper Results JSON', description: str = 'A low-cost Google Search API.Useful for when you need to answer questions about current events.Input should be a search query. Output is a JSON object of the query results', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: GoogleSerperAPIWrapper = None)[source]¶ Bases: BaseTool Tool that has capability to query the Serper.dev Google Search API and get back json. 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 api_wrapper: langchain.utilities.google_serper.GoogleSerperAPIWrapper [Optional]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A low-cost Google Search API.Useful for when you need to answer questions about current events.Input should be a search query. Output is a JSON object of the query results'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
[ 5317, 8995, 24029, 5831, 76961, 716, 21966, 61493, 32845, 716, 10001, 55609, 198, 1058, 8859, 8995, 24029, 5831, 76961, 716, 21966, 61493, 32845, 716, 10001, 4163, 11, 836, 25, 610, 284, 364, 14783, 328, 618, 716, 18591, 4823, 518, 4096, 25, 610, 284, 364, 32, 3428, 41238, 5195, 7694, 5446, 9223, 1285, 369, 994, 499, 1205, 311, 4320, 4860, 922, 1510, 4455, 16521, 1288, 387, 264, 2778, 3319, 13, 9442, 374, 264, 4823, 1665, 315, 279, 3319, 3135, 518, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 6464, 24474, 25, 5195, 32845, 716, 7227, 11803, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 7896, 198, 7896, 430, 706, 23099, 311, 3319, 279, 8409, 716, 22247, 5195, 7694, 5446, 198, 438, 636, 1203, 3024, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 6464, 24474, 25, 8859, 8995, 63795, 5831, 76961, 716, 61493, 32845, 716, 7227, 11803, 510, 15669, 60, 55609, 198, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 32, 3428, 41238, 5195, 7694, 5446, 9223, 1285, 369, 994, 499, 1205, 311, 4320, 4860, 922, 1510, 4455, 16521, 1288, 387, 264, 2778, 3319, 13, 9442, 374, 264, 4823, 1665, 315, 279, 3319, 3135, 6, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperResults.html
047a0182fba6-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'Google Serrper Results JSON'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 14783, 328, 618, 716, 18591, 4823, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperResults.html
85fb9d2d215f-0
langchain.tools.gmail.utils.build_resource_service¶ langchain.tools.gmail.utils.build_resource_service(credentials: Optional[Credentials] = None, service_name: str = 'gmail', service_version: str = 'v1') → Resource[source]¶ Build a Gmail service.
[ 5317, 8995, 24029, 73054, 8576, 13542, 18446, 12547, 55609, 198, 5317, 8995, 24029, 73054, 8576, 13542, 18446, 12547, 86565, 25, 12536, 58, 28123, 60, 284, 2290, 11, 2532, 1292, 25, 610, 284, 364, 77309, 518, 2532, 9625, 25, 610, 284, 364, 85, 16, 873, 11651, 12027, 76747, 60, 55609, 198, 11313, 264, 62046, 2532, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.utils.build_resource_service.html
4a4d1208379f-0
langchain.tools.youtube.search.YouTubeSearchTool¶ class langchain.tools.youtube.search.YouTubeSearchTool(*, name: str = 'youtube_search', description: str = 'search for youtube videos associated with a person. the input to this tool should be a comma separated list, the first part contains a person name and the second a number that is the maximum number of video results to return aka num_results. the second part is optional', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False)[source]¶ Bases: BaseTool 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 args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'search for youtube videos associated with a person. the input to this tool should be a comma separated list, the first part contains a person name and the second a number that is the maximum number of video results to return aka num_results. the second part is optional'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
[ 5317, 8995, 24029, 20751, 9472, 39537, 12115, 6014, 7896, 55609, 198, 1058, 8859, 8995, 24029, 20751, 9472, 39537, 12115, 6014, 7896, 4163, 11, 836, 25, 610, 284, 364, 45078, 10947, 518, 4096, 25, 610, 284, 364, 1874, 369, 28277, 6946, 5938, 449, 264, 1732, 13, 279, 1988, 311, 420, 5507, 1288, 387, 264, 32783, 19180, 1160, 11, 279, 1176, 961, 5727, 264, 1732, 836, 323, 279, 2132, 264, 1396, 430, 374, 279, 7340, 1396, 315, 2835, 3135, 311, 471, 38241, 1661, 13888, 13, 279, 2132, 961, 374, 10309, 518, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 7896, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 1874, 369, 28277, 6946, 5938, 449, 264, 1732, 13, 279, 1988, 311, 420, 5507, 1288, 387, 264, 32783, 19180, 1160, 11, 279, 1176, 961, 5727, 264, 1732, 836, 323, 279, 2132, 264, 1396, 430, 374, 279, 7340, 1396, 315, 2835, 3135, 311, 471, 38241, 1661, 13888, 13, 279, 2132, 961, 374, 10309, 6, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.youtube.search.YouTubeSearchTool.html
4a4d1208379f-1
Handle the content of the ToolException thrown. param name: str = 'youtube_search'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 45078, 10947, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.youtube.search.YouTubeSearchTool.html
d2cce3f3db03-0
langchain.tools.gmail.search.SearchArgsSchema¶ class langchain.tools.gmail.search.SearchArgsSchema(*, query: str, resource: Resource = Resource.MESSAGES, max_results: int = 10)[source]¶ Bases: BaseModel 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 max_results: int = 10¶ The maximum number of results to return. param query: str [Required]¶ The Gmail query. Example filters include from:sender, to:recipient, subject:subject, -filtered_term, in:folder, is:important|read|starred, after:year/mo/date, before:year/mo/date, label:label_name “exact phrase”. Search newer/older than using d (day), m (month), and y (year): newer_than:2d, older_than:1y. Attachments with extension example: filename:pdf. Multiple term matching example: from:amy OR from:david. param resource: langchain.tools.gmail.search.Resource = Resource.MESSAGES¶ Whether to search for threads or messages.
[ 5317, 8995, 24029, 73054, 9472, 33003, 4209, 8802, 55609, 198, 1058, 8859, 8995, 24029, 73054, 9472, 33003, 4209, 8802, 4163, 11, 3319, 25, 610, 11, 5211, 25, 12027, 284, 12027, 1345, 55113, 11, 1973, 13888, 25, 528, 284, 220, 605, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 1973, 13888, 25, 528, 284, 220, 605, 55609, 198, 791, 7340, 1396, 315, 3135, 311, 471, 627, 913, 3319, 25, 610, 510, 8327, 60, 55609, 198, 791, 62046, 3319, 13, 13688, 13711, 2997, 505, 25, 11905, 11, 311, 25, 43710, 11, 3917, 25, 11760, 11, 482, 42231, 17922, 11, 304, 25, 18135, 11, 374, 25, 15693, 91, 888, 91, 12134, 1171, 11, 1306, 25, 3236, 3262, 78, 75664, 11, 1603, 25, 3236, 3262, 78, 75664, 11, 2440, 25, 1530, 1292, 1054, 47485, 17571, 11453, 7694, 26627, 14, 2061, 1109, 1701, 294, 320, 1316, 705, 296, 320, 10460, 705, 323, 379, 320, 3236, 1680, 26627, 52713, 25, 17, 67, 11, 9191, 52713, 25, 16, 88, 13, 49484, 1392, 449, 9070, 3187, 25, 3986, 25, 12091, 13, 29911, 4751, 12864, 3187, 25, 505, 25, 27322, 2794, 505, 41522, 15567, 627, 913, 5211, 25, 8859, 8995, 24029, 73054, 9472, 21429, 284, 12027, 1345, 55113, 55609, 198, 25729, 311, 2778, 369, 14906, 477, 6743, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.search.SearchArgsSchema.html
285e441e380f-0
langchain.tools.openapi.utils.api_models.APIRequestBody¶ class langchain.tools.openapi.utils.api_models.APIRequestBody(*, description: Optional[str] = None, properties: List[APIRequestBodyProperty], media_type: str)[source]¶ Bases: BaseModel A model for a request body. 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 description: Optional[str] = None¶ The description of the request body. param media_type: str [Required]¶ The media type of the request body. param properties: List[langchain.tools.openapi.utils.api_models.APIRequestBodyProperty] [Required]¶ classmethod from_request_body(request_body: RequestBody, spec: OpenAPISpec) → APIRequestBody[source]¶ Instantiate from an OpenAPI RequestBody.
[ 5317, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 34434, 55609, 198, 1058, 8859, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 34434, 4163, 11, 4096, 25, 12536, 17752, 60, 284, 2290, 11, 6012, 25, 1796, 58, 7227, 34434, 3128, 1145, 3772, 1857, 25, 610, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 198, 32, 1646, 369, 264, 1715, 2547, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 4096, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 4096, 315, 279, 1715, 2547, 627, 913, 3772, 1857, 25, 610, 510, 8327, 60, 55609, 198, 791, 3772, 955, 315, 279, 1715, 2547, 627, 913, 6012, 25, 1796, 58, 5317, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 34434, 3128, 60, 510, 8327, 60, 55609, 198, 27853, 505, 8052, 14446, 4980, 14446, 25, 6274, 5561, 11, 1424, 25, 5377, 2599, 1669, 1007, 8, 11651, 5446, 34434, 76747, 60, 55609, 198, 81651, 505, 459, 5377, 7227, 6274, 5561, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.openapi.utils.api_models.APIRequestBody.html
3b40107768ea-0
langchain.tools.openapi.utils.api_models.APIOperation¶ class langchain.tools.openapi.utils.api_models.APIOperation(*, operation_id: str, description: Optional[str] = None, base_url: str, path: str, method: HTTPVerb, properties: Sequence[APIProperty], request_body: Optional[APIRequestBody] = None)[source]¶ Bases: BaseModel A model for a single API operation. 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 base_url: str [Required]¶ The base URL of the operation. param description: Optional[str] = None¶ The description of the operation. param method: langchain.utilities.openapi.HTTPVerb [Required]¶ The HTTP method of the operation. param operation_id: str [Required]¶ The unique identifier of the operation. param path: str [Required]¶ The path of the operation. param properties: Sequence[langchain.tools.openapi.utils.api_models.APIProperty] [Required]¶ param request_body: Optional[langchain.tools.openapi.utils.api_models.APIRequestBody] = None¶ The request body of the operation. classmethod from_openapi_spec(spec: OpenAPISpec, path: str, method: str) → APIOperation[source]¶ Create an APIOperation from an OpenAPI spec. classmethod from_openapi_url(spec_url: str, path: str, method: str) → APIOperation[source]¶ Create an APIOperation from an OpenAPI URL. to_typescript() → str[source]¶ Get typescript string representation of the operation. static ts_type_from_python(type_: Union[str, Type, tuple, None, Enum]) → str[source]¶ property body_params: List[str]¶ property path_params: List[str]¶
[ 5317, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 8598, 55609, 198, 1058, 8859, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 8598, 4163, 11, 5784, 851, 25, 610, 11, 4096, 25, 12536, 17752, 60, 284, 2290, 11, 2385, 2975, 25, 610, 11, 1853, 25, 610, 11, 1749, 25, 10339, 68046, 11, 6012, 25, 29971, 58, 7227, 3128, 1145, 1715, 14446, 25, 12536, 58, 7227, 34434, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 198, 32, 1646, 369, 264, 3254, 5446, 5784, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2385, 2975, 25, 610, 510, 8327, 60, 55609, 198, 791, 2385, 5665, 315, 279, 5784, 627, 913, 4096, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 4096, 315, 279, 5784, 627, 913, 1749, 25, 8859, 8995, 63795, 59920, 28458, 68046, 510, 8327, 60, 55609, 198, 791, 10339, 1749, 315, 279, 5784, 627, 913, 5784, 851, 25, 610, 510, 8327, 60, 55609, 198, 791, 5016, 13110, 315, 279, 5784, 627, 913, 1853, 25, 610, 510, 8327, 60, 55609, 198, 791, 1853, 315, 279, 5784, 627, 913, 6012, 25, 29971, 58, 5317, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 3128, 60, 510, 8327, 60, 55609, 198, 913, 1715, 14446, 25, 12536, 58, 5317, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 34434, 60, 284, 2290, 55609, 198, 791, 1715, 2547, 315, 279, 5784, 627, 27853, 505, 11563, 2113, 13908, 39309, 25, 5377, 2599, 1669, 1007, 11, 1853, 25, 610, 11, 1749, 25, 610, 8, 11651, 5446, 8598, 76747, 60, 55609, 198, 4110, 459, 5446, 8598, 505, 459, 5377, 7227, 1424, 627, 27853, 505, 11563, 2113, 2975, 39309, 2975, 25, 610, 11, 1853, 25, 610, 11, 1749, 25, 610, 8, 11651, 5446, 8598, 76747, 60, 55609, 198, 4110, 459, 5446, 8598, 505, 459, 5377, 7227, 5665, 627, 998, 9962, 1250, 368, 11651, 610, 76747, 60, 55609, 198, 1991, 4595, 1250, 925, 13340, 315, 279, 5784, 627, 2020, 10814, 1857, 5791, 56969, 5930, 24089, 9323, 17752, 11, 4078, 11, 14743, 11, 2290, 11, 14416, 2526, 11651, 610, 76747, 60, 55609, 198, 3784, 2547, 6887, 25, 1796, 17752, 60, 55609, 198, 3784, 1853, 6887, 25, 1796, 17752, 60, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.openapi.utils.api_models.APIOperation.html
3b40107768ea-1
property body_params: List[str]¶ property path_params: List[str]¶ property query_params: List[str]¶
[ 3784, 2547, 6887, 25, 1796, 17752, 60, 55609, 198, 3784, 1853, 6887, 25, 1796, 17752, 60, 55609, 198, 3784, 3319, 6887, 25, 1796, 17752, 60, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.openapi.utils.api_models.APIOperation.html
0230ab15c792-0
langchain.tools.spark_sql.tool.InfoSparkSQLTool¶ class langchain.tools.spark_sql.tool.InfoSparkSQLTool(*, name: str = 'schema_sql_db', description: str = '\n    Input to this tool is a comma-separated list of tables, output is the schema and sample rows for those tables.\n    Be sure that the tables actually exist by calling list_tables_sql_db first!\n\n    Example Input: "table1, table2, table3"\n    ', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, db: SparkSQL)[source]¶ Bases: BaseSparkSQLTool, BaseTool Tool for getting metadata about a Spark SQL. 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 args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param db: langchain.utilities.spark_sql.SparkSQL [Required]¶ param description: str = '\n    Input to this tool is a comma-separated list of tables, output is the schema and sample rows for those tables.\n    Be sure that the tables actually exist by calling list_tables_sql_db first!\n\n    Example Input: "table1, table2, table3"\n    '¶
[ 5317, 8995, 24029, 33646, 18554, 21966, 20736, 68583, 6827, 7896, 55609, 198, 1058, 8859, 8995, 24029, 33646, 18554, 21966, 20736, 68583, 6827, 7896, 4163, 11, 836, 25, 610, 284, 364, 17801, 18554, 8856, 518, 4096, 25, 610, 284, 5307, 77, 46493, 5688, 311, 420, 5507, 374, 264, 32783, 73792, 1160, 315, 12920, 11, 2612, 374, 279, 11036, 323, 6205, 7123, 369, 1884, 12920, 7255, 77, 46493, 2893, 2771, 430, 279, 12920, 3604, 3073, 555, 8260, 1160, 36732, 18554, 8856, 1176, 15114, 77, 1734, 46493, 13688, 5688, 25, 330, 2048, 16, 11, 2007, 17, 11, 2007, 18, 12200, 77, 46493, 6752, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 3000, 25, 27565, 6827, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 68583, 6827, 7896, 11, 5464, 7896, 198, 7896, 369, 3794, 11408, 922, 264, 27565, 8029, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2897, 26443, 25, 12536, 58, 941, 58, 4066, 1747, 5163, 284, 2290, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 3000, 25, 8859, 8995, 63795, 33646, 18554, 815, 29836, 6827, 510, 8327, 60, 55609, 198, 913, 4096, 25, 610, 284, 5307, 77, 46493, 5688, 311, 420, 5507, 374, 264, 32783, 73792, 1160, 315, 12920, 11, 2612, 374, 279, 11036, 323, 6205, 7123, 369, 1884, 12920, 7255, 77, 46493, 2893, 2771, 430, 279, 12920, 3604, 3073, 555, 8260, 1160, 36732, 18554, 8856, 1176, 15114, 77, 1734, 46493, 13688, 5688, 25, 330, 2048, 16, 11, 2007, 17, 11, 2007, 18, 12200, 77, 46493, 364, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.spark_sql.tool.InfoSparkSQLTool.html
0230ab15c792-1
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'schema_sql_db'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: Config Configuration for this pydantic object. arbitrary_types_allowed = True¶
[ 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 17801, 18554, 8856, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 5649, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.spark_sql.tool.InfoSparkSQLTool.html
0230ab15c792-2
Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.spark_sql.tool.InfoSparkSQLTool.html
1a2a652c479e-0
langchain.tools.openapi.utils.api_models.APIProperty¶ class langchain.tools.openapi.utils.api_models.APIProperty(*, name: str, required: bool, type: Union[str, Type, tuple, None, Enum] = None, default: Optional[Any] = None, description: Optional[str] = None, location: APIPropertyLocation)[source]¶ Bases: APIPropertyBase A model for a property in the query, path, header, or cookie params. 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 default: Optional[Any] = None¶ The default value of the property. param description: Optional[str] = None¶ The description of the property. param location: langchain.tools.openapi.utils.api_models.APIPropertyLocation [Required]¶ The path/how it’s being passed to the endpoint. param name: str [Required]¶ The name of the property. param required: bool [Required]¶ Whether the property is required. param type: Union[str, Type, tuple, None, enum.Enum] = None¶ The type of the property. Either a primitive type, a component/parameter type, or an array or ‘object’ (dict) of the above. classmethod from_parameter(parameter: Parameter, spec: OpenAPISpec) → APIProperty[source]¶ Instantiate from an OpenAPI Parameter. static is_supported_location(location: str) → bool[source]¶ Return whether the provided location is supported.
[ 5317, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 3128, 55609, 198, 1058, 8859, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 3128, 4163, 11, 836, 25, 610, 11, 2631, 25, 1845, 11, 955, 25, 9323, 17752, 11, 4078, 11, 14743, 11, 2290, 11, 14416, 60, 284, 2290, 11, 1670, 25, 12536, 71401, 60, 284, 2290, 11, 4096, 25, 12536, 17752, 60, 284, 2290, 11, 3813, 25, 5446, 3128, 4812, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5446, 3128, 4066, 198, 32, 1646, 369, 264, 3424, 304, 279, 3319, 11, 1853, 11, 4342, 11, 477, 12829, 3712, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 1670, 25, 12536, 71401, 60, 284, 2290, 55609, 198, 791, 1670, 907, 315, 279, 3424, 627, 913, 4096, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 4096, 315, 279, 3424, 627, 913, 3813, 25, 8859, 8995, 24029, 59920, 8576, 6314, 31892, 25967, 3128, 4812, 510, 8327, 60, 55609, 198, 791, 1853, 51426, 433, 753, 1694, 5946, 311, 279, 15233, 627, 913, 836, 25, 610, 510, 8327, 60, 55609, 198, 791, 836, 315, 279, 3424, 627, 913, 2631, 25, 1845, 510, 8327, 60, 55609, 198, 25729, 279, 3424, 374, 2631, 627, 913, 955, 25, 9323, 17752, 11, 4078, 11, 14743, 11, 2290, 11, 7773, 44325, 60, 284, 2290, 55609, 198, 791, 955, 315, 279, 3424, 627, 50344, 264, 28694, 955, 11, 264, 3777, 14, 16577, 955, 345, 269, 459, 1358, 477, 3451, 1735, 529, 320, 8644, 8, 315, 279, 3485, 627, 27853, 505, 25943, 42794, 25, 15521, 11, 1424, 25, 5377, 2599, 1669, 1007, 8, 11651, 5446, 3128, 76747, 60, 55609, 198, 81651, 505, 459, 5377, 7227, 15521, 627, 2020, 374, 58985, 13427, 23509, 25, 610, 8, 11651, 1845, 76747, 60, 55609, 198, 5715, 3508, 279, 3984, 3813, 374, 7396, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.openapi.utils.api_models.APIProperty.html
57f291cbc748-0
langchain.tools.gmail.utils.import_google¶ langchain.tools.gmail.utils.import_google() → Tuple[Request, Credentials][source]¶ Import google libraries. Returns Request and Credentials classes. Return type Tuple[Request, Credentials]
[ 5317, 8995, 24029, 73054, 8576, 35997, 48255, 55609, 198, 5317, 8995, 24029, 73054, 8576, 35997, 48255, 368, 11651, 25645, 58, 1939, 11, 62360, 1483, 2484, 60, 55609, 198, 11772, 11819, 20797, 627, 16851, 198, 1939, 323, 62360, 6989, 627, 5715, 955, 198, 29781, 58, 1939, 11, 62360, 60 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.utils.import_google.html
221626699a78-0
langchain.tools.file_management.read.ReadFileTool¶ class langchain.tools.file_management.read.ReadFileTool(*, name: str = 'read_file', description: str = 'Read file from disk', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.file_management.read.ReadFileInput'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, root_dir: ~typing.Optional[str] = None)[source]¶ Bases: BaseFileToolMixin, BaseTool 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 args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.file_management.read.ReadFileInput'>¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Read file from disk'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown.
[ 5317, 8995, 24029, 9914, 46463, 4217, 80076, 7896, 55609, 198, 1058, 8859, 8995, 24029, 9914, 46463, 4217, 80076, 7896, 4163, 11, 836, 25, 610, 284, 364, 888, 2517, 518, 4096, 25, 610, 284, 364, 4518, 1052, 505, 13668, 518, 2897, 26443, 25, 4056, 90902, 10394, 58, 93, 3368, 67, 8322, 9056, 13316, 1747, 60, 284, 366, 1058, 364, 5317, 8995, 24029, 9914, 46463, 4217, 80076, 2566, 6404, 11, 471, 33971, 25, 1845, 284, 3641, 11, 14008, 25, 1845, 284, 3641, 11, 27777, 25, 4056, 90902, 37464, 58, 93, 90902, 10840, 290, 58, 93, 90902, 5937, 58, 93, 5317, 8995, 72134, 9105, 13316, 7646, 3126, 1145, 4056, 5317, 8995, 72134, 9105, 13316, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 4056, 90902, 37464, 58, 93, 5317, 8995, 72134, 9105, 13316, 7646, 2087, 60, 284, 2290, 11, 3790, 23627, 4188, 25, 4056, 90902, 37464, 58, 93, 90902, 10840, 290, 58, 2707, 11, 610, 11, 4056, 90902, 28115, 481, 15873, 93, 5317, 8995, 24029, 9105, 25443, 1378, 1145, 610, 5163, 60, 284, 3641, 11, 3789, 4432, 25, 4056, 90902, 37464, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 5464, 1738, 7896, 39556, 11, 5464, 7896, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2897, 26443, 25, 4078, 58, 3368, 67, 8322, 9056, 13316, 1747, 60, 284, 366, 1058, 364, 5317, 8995, 24029, 9914, 46463, 4217, 80076, 2566, 6404, 55609, 198, 14149, 67, 8322, 1646, 538, 311, 9788, 323, 4820, 279, 5507, 753, 1988, 6105, 627, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 52444, 13, 5321, 1005, 27777, 4619, 627, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 45561, 311, 387, 2663, 2391, 5507, 11572, 627, 913, 4096, 25, 610, 284, 364, 4518, 1052, 505, 13668, 6, 55609, 198, 23580, 311, 3371, 279, 1646, 1268, 14, 9493, 14, 35734, 311, 1005, 279, 5507, 627, 2675, 649, 3493, 2478, 64630, 10507, 439, 264, 961, 315, 279, 4096, 627, 913, 3790, 23627, 4188, 25, 12536, 58, 33758, 58, 2707, 11, 610, 11, 54223, 15873, 7896, 1378, 1145, 610, 5163, 60, 284, 3641, 55609, 198, 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
221626699a78-1
Handle the content of the ToolException thrown. param name: str = 'read_file'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param root_dir: Optional[str] = None¶ The final path will be chosen relative to root_dir if specified. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. get_relative_path(file_path: str) → Path¶ Get the relative path, returning an error if unsupported. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 7144, 279, 2262, 315, 279, 13782, 1378, 15338, 627, 913, 836, 25, 610, 284, 364, 888, 2517, 6, 55609, 198, 791, 5016, 836, 315, 279, 5507, 430, 9539, 92606, 1202, 7580, 627, 913, 471, 33971, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 471, 279, 5507, 753, 2612, 6089, 13, 20638, 420, 311, 3082, 3445, 198, 9210, 1306, 279, 5507, 374, 2663, 11, 279, 21372, 26321, 690, 3009, 63687, 627, 913, 3789, 4432, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 1620, 1853, 690, 387, 12146, 8844, 311, 3789, 4432, 422, 5300, 627, 913, 14008, 25, 1845, 284, 3641, 55609, 198, 25729, 311, 1515, 279, 5507, 753, 5208, 627, 565, 6797, 3889, 14506, 6022, 25, 610, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 8, 11651, 610, 55609, 198, 8238, 5507, 42022, 627, 7847, 802, 359, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 68881, 627, 456, 30386, 2703, 4971, 2703, 25, 610, 8, 11651, 8092, 55609, 198, 1991, 279, 8844, 1853, 11, 13758, 459, 1493, 422, 41509, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6236, 50050, 6022, 25, 9323, 17752, 11, 30226, 1145, 14008, 25, 12536, 58, 2707, 60, 284, 2290, 11, 1212, 6855, 25, 12536, 17752, 60, 284, 364, 13553, 518, 1933, 25, 12536, 17752, 60, 284, 364, 13553, 518, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 55609, 198, 6869, 279, 5507, 627, 3784, 2897, 25, 6587, 55609, 198, 3784, 374, 20052, 6022, 25, 1845, 55609, 198, 25729, 279, 5507, 1193, 27441, 264, 3254, 1988, 627, 2590, 5649, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
bbe6ccd95d5e-0
langchain.tools.google_places.tool.GooglePlacesSchema¶ class langchain.tools.google_places.tool.GooglePlacesSchema(*, query: str)[source]¶ Bases: BaseModel 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 query: str [Required]¶ Query for google maps
[ 5317, 8995, 24029, 5831, 58546, 21966, 61493, 59925, 8802, 55609, 198, 1058, 8859, 8995, 24029, 5831, 58546, 21966, 61493, 59925, 8802, 4163, 11, 3319, 25, 610, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 3319, 25, 610, 510, 8327, 60, 55609, 198, 2929, 369, 11819, 14370 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.google_places.tool.GooglePlacesSchema.html
812fb017c069-0
langchain.tools.steamship_image_generation.utils.make_image_public¶ langchain.tools.steamship_image_generation.utils.make_image_public(client: Steamship, block: Block) → str[source]¶ Upload a block to a signed URL and return the public URL.
[ 5317, 8995, 24029, 1258, 14922, 5383, 5060, 65291, 8576, 10325, 5060, 28173, 55609, 198, 5317, 8995, 24029, 1258, 14922, 5383, 5060, 65291, 8576, 10325, 5060, 28173, 13097, 25, 22578, 5383, 11, 2565, 25, 8527, 8, 11651, 610, 76747, 60, 55609, 198, 14165, 264, 2565, 311, 264, 8667, 5665, 323, 471, 279, 586, 5665, 13 ]
https://langchain.readthedocs.io/en/latest/tools/langchain.tools.steamship_image_generation.utils.make_image_public.html
6f7e5339f32b-0
langchain.embeddings.cohere.CohereEmbeddings¶ class langchain.embeddings.cohere.CohereEmbeddings(*, client: Any = None, model: str = 'embed-english-v2.0', truncate: Optional[str] = None, cohere_api_key: Optional[str] = None)[source]¶ Bases: BaseModel, Embeddings Wrapper around Cohere embedding models. To use, you should have the cohere python package installed, and the environment variable COHERE_API_KEY set with your API key or pass it as a named parameter to the constructor. Example from langchain.embeddings import CohereEmbeddings cohere = CohereEmbeddings( model="embed-english-light-v2.0", cohere_api_key="my-api-key" ) 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 cohere_api_key: Optional[str] = None¶ param model: str = 'embed-english-v2.0'¶ Model name to use. param truncate: Optional[str] = None¶ Truncate embeddings that are too long from start or end (“NONE”|”START”|”END”) embed_documents(texts: List[str]) → List[List[float]][source]¶ Call out to Cohere’s embedding endpoint. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Call out to Cohere’s embedding endpoint. Parameters text – The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields[source]¶ Validate that api key and python package exists in environment. model Config[source]¶
[ 5317, 8995, 41541, 25624, 522, 2319, 486, 732, 2319, 486, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 522, 2319, 486, 732, 2319, 486, 26566, 25624, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 1646, 25, 610, 284, 364, 12529, 12, 30220, 8437, 17, 13, 15, 518, 57872, 25, 12536, 17752, 60, 284, 2290, 11, 1080, 6881, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 84675, 486, 40188, 4211, 627, 1271, 1005, 11, 499, 1288, 617, 279, 1080, 6881, 10344, 6462, 10487, 11, 323, 279, 198, 24175, 3977, 7432, 4678, 11669, 6738, 743, 449, 701, 5446, 1401, 477, 1522, 433, 198, 300, 264, 7086, 5852, 311, 279, 4797, 627, 13617, 198, 1527, 8859, 8995, 41541, 25624, 1179, 84675, 486, 26566, 25624, 198, 1030, 6881, 284, 84675, 486, 26566, 25624, 1021, 262, 1646, 429, 12529, 12, 30220, 18179, 8437, 17, 13, 15, 498, 1080, 6881, 11959, 3173, 429, 2465, 24851, 16569, 702, 340, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 1080, 6881, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 913, 1646, 25, 610, 284, 364, 12529, 12, 30220, 8437, 17, 13, 15, 6, 55609, 198, 1747, 836, 311, 1005, 627, 913, 57872, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 1305, 27998, 71647, 430, 527, 2288, 1317, 505, 1212, 477, 842, 27179, 46525, 863, 91, 863, 23380, 863, 91, 863, 4794, 863, 340, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 7368, 704, 311, 84675, 486, 753, 40188, 15233, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 7368, 704, 311, 84675, 486, 753, 40188, 15233, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 6464, 1401, 323, 10344, 6462, 6866, 304, 4676, 627, 2590, 5649, 76747, 60, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.cohere.CohereEmbeddings.html
6f7e5339f32b-1
Validate that api key and python package exists in environment. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 18409, 430, 6464, 1401, 323, 10344, 6462, 6866, 304, 4676, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.cohere.CohereEmbeddings.html
8da93e4c2c8b-0
langchain.embeddings.aleph_alpha.AlephAlphaSymmetricSemanticEmbedding¶ class langchain.embeddings.aleph_alpha.AlephAlphaSymmetricSemanticEmbedding(*, client: Any = None, model: Optional[str] = 'luminous-base', hosting: Optional[str] = 'https://api.aleph-alpha.com', normalize: Optional[bool] = True, compress_to_size: Optional[int] = 128, contextual_control_threshold: Optional[int] = None, control_log_additive: Optional[bool] = True, aleph_alpha_api_key: Optional[str] = None)[source]¶ Bases: AlephAlphaAsymmetricSemanticEmbedding The symmetric version of the Aleph Alpha’s semantic embeddings. The main difference is that here, both the documents and queries are embedded with a SemanticRepresentation.Symmetric .. rubric:: Example from aleph_alpha import AlephAlphaSymmetricSemanticEmbedding embeddings = AlephAlphaAsymmetricSemanticEmbedding() text = "This is a test text" doc_result = embeddings.embed_documents([text]) query_result = embeddings.embed_query(text) 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 aleph_alpha_api_key: Optional[str] = None¶ API key for Aleph Alpha API. param client: Any = None¶ param compress_to_size: Optional[int] = 128¶ Should the returned embeddings come back as an original 5120-dim vector, or should it be compressed to 128-dim. param contextual_control_threshold: Optional[int] = None¶ Attention control parameters only apply to those tokens that have explicitly been set in the request. param control_log_additive: Optional[bool] = True¶
[ 5317, 8995, 41541, 25624, 13, 1604, 764, 27731, 885, 273, 764, 19947, 29012, 16282, 99031, 26566, 7113, 55609, 198, 1058, 8859, 8995, 41541, 25624, 13, 1604, 764, 27731, 885, 273, 764, 19947, 29012, 16282, 99031, 26566, 7113, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 1646, 25, 12536, 17752, 60, 284, 364, 75, 10318, 788, 31113, 518, 20256, 25, 12536, 17752, 60, 284, 364, 2485, 1129, 2113, 13, 1604, 764, 65638, 916, 518, 22436, 25, 12536, 58, 2707, 60, 284, 3082, 11, 25633, 2401, 2424, 25, 12536, 19155, 60, 284, 220, 4386, 11, 66251, 13742, 22616, 25, 12536, 19155, 60, 284, 2290, 11, 2585, 5337, 2962, 3486, 25, 12536, 58, 2707, 60, 284, 3082, 11, 22180, 764, 27731, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 19623, 764, 19947, 2170, 30559, 99031, 26566, 7113, 198, 791, 55443, 2373, 315, 279, 19623, 764, 25737, 753, 42833, 71647, 627, 791, 1925, 6811, 374, 430, 1618, 11, 2225, 279, 9477, 323, 198, 43935, 527, 23711, 449, 264, 75433, 57003, 815, 30559, 198, 497, 10485, 2265, 487, 13688, 198, 1527, 22180, 764, 27731, 1179, 19623, 764, 19947, 29012, 16282, 99031, 26566, 7113, 198, 12529, 25624, 284, 19623, 764, 19947, 2170, 30559, 99031, 26566, 7113, 746, 1342, 284, 330, 2028, 374, 264, 1296, 1495, 702, 5349, 5400, 284, 71647, 41541, 77027, 2625, 1342, 2608, 1663, 5400, 284, 71647, 41541, 5857, 7383, 340, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 22180, 764, 27731, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 7227, 1401, 369, 19623, 764, 25737, 5446, 627, 913, 3016, 25, 5884, 284, 2290, 55609, 198, 913, 25633, 2401, 2424, 25, 12536, 19155, 60, 284, 220, 4386, 55609, 198, 15346, 279, 6052, 71647, 2586, 1203, 439, 459, 4113, 220, 8358, 15, 1773, 318, 4724, 345, 269, 1288, 433, 387, 31749, 311, 220, 4386, 1773, 318, 627, 913, 66251, 13742, 22616, 25, 12536, 19155, 60, 284, 2290, 55609, 198, 70429, 2585, 5137, 1193, 3881, 311, 1884, 11460, 430, 617, 198, 94732, 398, 1027, 743, 304, 279, 1715, 627, 913, 2585, 5337, 2962, 3486, 25, 12536, 58, 2707, 60, 284, 3082, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.aleph_alpha.AlephAlphaSymmetricSemanticEmbedding.html
8da93e4c2c8b-1
param control_log_additive: Optional[bool] = True¶ Apply controls on prompt items by adding the log(control_factor) to attention scores. param hosting: Optional[str] = 'https://api.aleph-alpha.com'¶ Optional parameter that specifies which datacenters may process the request. param model: Optional[str] = 'luminous-base'¶ Model name to use. param normalize: Optional[bool] = True¶ Should returned embeddings be normalized embed_documents(texts: List[str]) → List[List[float]][source]¶ Call out to Aleph Alpha’s Document endpoint. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Call out to Aleph Alpha’s asymmetric, query embedding endpoint :param text: The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields¶ Validate that api key and python package exists in environment.
[ 913, 2585, 5337, 2962, 3486, 25, 12536, 58, 2707, 60, 284, 3082, 55609, 198, 29597, 11835, 389, 10137, 3673, 555, 7999, 279, 1515, 46073, 19100, 340, 998, 6666, 12483, 627, 913, 20256, 25, 12536, 17752, 60, 284, 364, 2485, 1129, 2113, 13, 1604, 764, 65638, 916, 6, 55609, 198, 15669, 5852, 430, 30202, 902, 828, 86541, 1253, 1920, 279, 1715, 627, 913, 1646, 25, 12536, 17752, 60, 284, 364, 75, 10318, 788, 31113, 6, 55609, 198, 1747, 836, 311, 1005, 627, 913, 22436, 25, 12536, 58, 2707, 60, 284, 3082, 55609, 198, 15346, 6052, 71647, 387, 30510, 198, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 7368, 704, 311, 19623, 764, 25737, 753, 12051, 15233, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 7368, 704, 311, 19623, 764, 25737, 753, 97929, 11, 3319, 40188, 15233, 198, 68416, 1495, 25, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 55609, 198, 18409, 430, 6464, 1401, 323, 10344, 6462, 6866, 304, 4676, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.aleph_alpha.AlephAlphaSymmetricSemanticEmbedding.html
b0e73c6ab490-0
langchain.embeddings.dashscope.DashScopeEmbeddings¶ class langchain.embeddings.dashscope.DashScopeEmbeddings(*, client: Any = None, model: str = 'text-embedding-v1', dashscope_api_key: Optional[str] = None, max_retries: int = 5)[source]¶ Bases: BaseModel, Embeddings Wrapper around DashScope embedding models. To use, you should have the dashscope python package installed, and the environment variable DASHSCOPE_API_KEY set with your API key or pass it as a named parameter to the constructor. Example from langchain.embeddings import DashScopeEmbeddings embeddings = DashScopeEmbeddings(dashscope_api_key="my-api-key") Example import os os.environ["DASHSCOPE_API_KEY"] = "your DashScope API KEY" from langchain.embeddings.dashscope import DashScopeEmbeddings embeddings = DashScopeEmbeddings( model="text-embedding-v1", ) text = "This is a test query." query_result = embeddings.embed_query(text) 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 dashscope_api_key: Optional[str] = None¶ Maximum number of retries to make when generating. param max_retries: int = 5¶ param model: str = 'text-embedding-v1'¶ embed_documents(texts: List[str]) → List[List[float]][source]¶ Call out to DashScope’s embedding endpoint for embedding search docs. Parameters texts – The list of texts to embed. chunk_size – The chunk size of embeddings. If None, will use the chunk size specified by the class. Returns List of embeddings, one for each text.
[ 5317, 8995, 41541, 25624, 962, 1003, 4280, 920, 1003, 11037, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 962, 1003, 4280, 920, 1003, 11037, 26566, 25624, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 1646, 25, 610, 284, 364, 1342, 12, 95711, 8437, 16, 518, 24858, 4280, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 11, 1973, 1311, 4646, 25, 528, 284, 220, 20, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 37770, 11037, 40188, 4211, 627, 1271, 1005, 11, 499, 1288, 617, 279, 24858, 4280, 10344, 6462, 10487, 11, 323, 279, 198, 24175, 3977, 423, 9729, 77465, 1777, 11669, 6738, 743, 449, 701, 5446, 1401, 477, 1522, 433, 198, 300, 264, 7086, 5852, 311, 279, 4797, 627, 13617, 198, 1527, 8859, 8995, 41541, 25624, 1179, 37770, 11037, 26566, 25624, 198, 12529, 25624, 284, 37770, 11037, 26566, 25624, 1528, 1003, 4280, 11959, 3173, 429, 2465, 24851, 16569, 1158, 13617, 198, 475, 2709, 198, 437, 24656, 1204, 35, 9729, 77465, 1777, 11669, 6738, 1365, 284, 330, 22479, 37770, 11037, 5446, 12282, 702, 1527, 8859, 8995, 41541, 25624, 962, 1003, 4280, 1179, 37770, 11037, 26566, 25624, 198, 12529, 25624, 284, 37770, 11037, 26566, 25624, 1021, 262, 1646, 429, 1342, 12, 95711, 8437, 16, 761, 340, 1342, 284, 330, 2028, 374, 264, 1296, 3319, 10246, 1663, 5400, 284, 71647, 41541, 5857, 7383, 340, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 24858, 4280, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 28409, 1396, 315, 61701, 311, 1304, 994, 24038, 627, 913, 1973, 1311, 4646, 25, 528, 284, 220, 20, 55609, 198, 913, 1646, 25, 610, 284, 364, 1342, 12, 95711, 8437, 16, 6, 55609, 198, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 7368, 704, 311, 37770, 11037, 753, 40188, 15233, 369, 40188, 2778, 27437, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 27069, 2424, 1389, 578, 12143, 1404, 315, 71647, 13, 1442, 2290, 11, 690, 1005, 279, 12143, 1404, 198, 54534, 555, 279, 538, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.dashscope.DashScopeEmbeddings.html
b0e73c6ab490-1
specified by the class. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Call out to DashScope’s embedding endpoint for embedding query text. Parameters text – The text to embed. Returns Embedding for the text. validator validate_environment  »  all fields[source]¶ model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 54534, 555, 279, 538, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 7368, 704, 311, 37770, 11037, 753, 40188, 15233, 369, 40188, 3319, 1495, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 7113, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.dashscope.DashScopeEmbeddings.html
dfa777cc376a-0
langchain.embeddings.bedrock.BedrockEmbeddings¶ class langchain.embeddings.bedrock.BedrockEmbeddings(*, client: Any = None, region_name: Optional[str] = None, credentials_profile_name: Optional[str] = None, model_id: str = 'amazon.titan-e1t-medium', model_kwargs: Optional[Dict] = None)[source]¶ Bases: BaseModel, Embeddings Embeddings provider to invoke Bedrock embedding models. To authenticate, the AWS client uses the following methods to automatically load credentials: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html If a specific credential profile should be used, you must pass the name of the profile from the ~/.aws/credentials file that is to be used. Make sure the credentials / roles used have the required policies to access the Bedrock service. 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 credentials_profile_name: Optional[str] = None¶ The name of the profile in the ~/.aws/credentials or ~/.aws/config files, which has either access keys or role information specified. If not specified, the default credential profile or, if on an EC2 instance, credentials from IMDS will be used. See: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html param model_id: str = 'amazon.titan-e1t-medium'¶ Id of the model to call, e.g., amazon.titan-e1t-medium, this is equivalent to the modelId property in the list-foundation-models api param model_kwargs: Optional[Dict] = None¶ Key word arguments to pass to the model. param region_name: Optional[str] = None¶
[ 5317, 8995, 41541, 25624, 91446, 21161, 1823, 291, 21161, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 91446, 21161, 1823, 291, 21161, 26566, 25624, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 5654, 1292, 25, 12536, 17752, 60, 284, 2290, 11, 16792, 14108, 1292, 25, 12536, 17752, 60, 284, 2290, 11, 1646, 851, 25, 610, 284, 364, 73853, 739, 13145, 5773, 16, 83, 46917, 518, 1646, 37335, 25, 12536, 58, 13755, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 26566, 25624, 9287, 311, 20466, 13394, 21161, 40188, 4211, 627, 1271, 34289, 11, 279, 24124, 3016, 5829, 279, 2768, 5528, 311, 198, 28172, 7167, 2865, 16792, 512, 2485, 1129, 65, 2117, 18, 29871, 916, 5574, 16, 86686, 10729, 34249, 4951, 35805, 14, 33453, 2628, 198, 2746, 264, 3230, 41307, 5643, 1288, 387, 1511, 11, 499, 2011, 1522, 198, 1820, 836, 315, 279, 5643, 505, 279, 41058, 8805, 14, 33453, 1052, 430, 374, 311, 387, 1511, 627, 8238, 2771, 279, 16792, 611, 13073, 1511, 617, 279, 2631, 10396, 311, 198, 5323, 279, 13394, 21161, 2532, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 16792, 14108, 1292, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 836, 315, 279, 5643, 304, 279, 41058, 8805, 14, 33453, 477, 41058, 8805, 15072, 3626, 11, 902, 198, 4752, 3060, 2680, 7039, 477, 3560, 2038, 5300, 627, 2746, 539, 5300, 11, 279, 1670, 41307, 5643, 477, 11, 422, 389, 459, 21283, 17, 2937, 345, 33453, 505, 6654, 6061, 690, 387, 1511, 627, 10031, 25, 3788, 1129, 65, 2117, 18, 29871, 916, 5574, 16, 86686, 10729, 34249, 4951, 35805, 14, 33453, 2628, 198, 913, 1646, 851, 25, 610, 284, 364, 73853, 739, 13145, 5773, 16, 83, 46917, 6, 55609, 198, 769, 315, 279, 1646, 311, 1650, 11, 384, 1326, 2637, 39516, 739, 13145, 5773, 16, 83, 46917, 11, 420, 374, 198, 26378, 12031, 311, 279, 1646, 769, 3424, 304, 279, 1160, 2269, 4159, 29344, 82, 6464, 198, 913, 1646, 37335, 25, 12536, 58, 13755, 60, 284, 2290, 55609, 198, 1622, 3492, 6105, 311, 1522, 311, 279, 1646, 627, 913, 5654, 1292, 25, 12536, 17752, 60, 284, 2290, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.bedrock.BedrockEmbeddings.html
dfa777cc376a-1
param region_name: Optional[str] = None¶ The aws region e.g., us-west-2. Fallsback to AWS_DEFAULT_REGION env variable or region specified in ~/.aws/config in case it is not provided here. embed_documents(texts: List[str], chunk_size: int = 1) → List[List[float]][source]¶ Compute doc embeddings using a Bedrock model. Parameters texts – The list of texts to embed. chunk_size – Bedrock currently only allows single string inputs, so chunk size is always 1. This input is here only for compatibility with the embeddings interface. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Compute query embeddings using a Bedrock model. Parameters text – The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields[source]¶ Validate that AWS credentials to and python package exists in environment. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 913, 5654, 1292, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 32621, 5654, 384, 1326, 2637, 603, 38702, 12, 17, 13, 30743, 1445, 311, 24124, 14131, 40279, 6233, 3977, 198, 269, 5654, 5300, 304, 41058, 8805, 15072, 304, 1162, 433, 374, 539, 3984, 1618, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 1145, 12143, 2424, 25, 528, 284, 220, 16, 8, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 47354, 4733, 71647, 1701, 264, 13394, 21161, 1646, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 27069, 2424, 1389, 13394, 21161, 5131, 1193, 6276, 3254, 925, 198, 25986, 11, 779, 12143, 1404, 374, 2744, 220, 16, 13, 1115, 1988, 374, 1618, 198, 3323, 369, 25780, 449, 279, 71647, 3834, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 47354, 3319, 71647, 1701, 264, 13394, 21161, 1646, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 24124, 16792, 311, 323, 10344, 6462, 6866, 304, 4676, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.bedrock.BedrockEmbeddings.html
d6c267ed5413-0
langchain.embeddings.base.Embeddings¶ class langchain.embeddings.base.Embeddings[source]¶ Bases: ABC Interface for embedding models. Methods __init__() aembed_documents(texts) Embed search docs. aembed_query(text) Embed query text. embed_documents(texts) Embed search docs. embed_query(text) Embed query text. async aembed_documents(texts: List[str]) → List[List[float]][source]¶ Embed search docs. async aembed_query(text: str) → List[float][source]¶ Embed query text. abstract embed_documents(texts: List[str]) → List[List[float]][source]¶ Embed search docs. abstract embed_query(text: str) → List[float][source]¶ Embed query text.
[ 5317, 8995, 41541, 25624, 9105, 58955, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 9105, 58955, 25624, 76747, 60, 55609, 198, 33, 2315, 25, 19921, 198, 5160, 369, 40188, 4211, 627, 18337, 198, 565, 2381, 33716, 64, 12529, 77027, 7383, 82, 340, 26566, 2778, 27437, 627, 64, 12529, 5857, 7383, 340, 26566, 3319, 1495, 627, 12529, 77027, 7383, 82, 340, 26566, 2778, 27437, 627, 12529, 5857, 7383, 340, 26566, 3319, 1495, 627, 7847, 264, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 26566, 2778, 27437, 627, 7847, 264, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 26566, 3319, 1495, 627, 16647, 11840, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 26566, 2778, 27437, 627, 16647, 11840, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 26566, 3319, 1495, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.base.Embeddings.html
887ce79c3a24-0
langchain.embeddings.self_hosted.SelfHostedEmbeddings¶ class langchain.embeddings.self_hosted.SelfHostedEmbeddings(*, cache: ~typing.Optional[bool] = None, verbose: bool = None, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, tags: ~typing.Optional[~typing.List[str]] = None, pipeline_ref: ~typing.Any = None, client: ~typing.Any = None, inference_fn: ~typing.Callable = <function _embed_documents>, hardware: ~typing.Any = None, model_load_fn: ~typing.Callable, load_fn_kwargs: ~typing.Optional[dict] = None, model_reqs: ~typing.List[str] = ['./', 'torch'], inference_kwargs: ~typing.Any = None)[source]¶ Bases: SelfHostedPipeline, Embeddings Runs custom embedding models on self-hosted remote hardware. Supported hardware includes auto-launched instances on AWS, GCP, Azure, and Lambda, as well as servers specified by IP address and SSH credentials (such as on-prem, or another cloud like Paperspace, Coreweave, etc.). To use, you should have the runhouse python package installed. Example using a model load function:from langchain.embeddings import SelfHostedEmbeddings from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline import runhouse as rh gpu = rh.cluster(name="rh-a10x", instance_type="A100:1") def get_pipeline(): model_id = "facebook/bart-large" tokenizer = AutoTokenizer.from_pretrained(model_id)
[ 5317, 8995, 41541, 25624, 28248, 13144, 291, 815, 491, 9480, 291, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 28248, 13144, 291, 815, 491, 9480, 291, 26566, 25624, 4163, 11, 6636, 25, 4056, 90902, 37464, 58, 2707, 60, 284, 2290, 11, 14008, 25, 1845, 284, 2290, 11, 27777, 25, 4056, 90902, 37464, 58, 93, 90902, 10840, 290, 58, 93, 90902, 5937, 58, 93, 5317, 8995, 72134, 9105, 13316, 7646, 3126, 1145, 4056, 5317, 8995, 72134, 9105, 13316, 7646, 2087, 5163, 284, 2290, 11, 4927, 12418, 25, 4056, 90902, 37464, 58, 93, 5317, 8995, 72134, 9105, 13316, 7646, 2087, 60, 284, 2290, 11, 9681, 25, 4056, 90902, 37464, 58, 93, 90902, 5937, 17752, 5163, 284, 2290, 11, 15660, 7949, 25, 4056, 90902, 13614, 284, 2290, 11, 3016, 25, 4056, 90902, 13614, 284, 2290, 11, 45478, 15604, 25, 4056, 90902, 28115, 481, 284, 366, 1723, 721, 12529, 77027, 8226, 12035, 25, 4056, 90902, 13614, 284, 2290, 11, 1646, 12693, 15604, 25, 4056, 90902, 28115, 481, 11, 2865, 15604, 37335, 25, 4056, 90902, 37464, 58, 8644, 60, 284, 2290, 11, 1646, 18110, 82, 25, 4056, 90902, 5937, 17752, 60, 284, 18701, 518, 364, 28514, 4181, 45478, 37335, 25, 4056, 90902, 13614, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 10323, 9480, 291, 35756, 11, 38168, 25624, 198, 75020, 2587, 40188, 4211, 389, 659, 39689, 291, 8870, 12035, 627, 35736, 12035, 5764, 3313, 53926, 10880, 13422, 389, 24124, 11, 480, 7269, 11, 35219, 345, 438, 45621, 11, 439, 1664, 439, 16692, 5300, 198, 1729, 6933, 2686, 323, 41563, 16792, 320, 21470, 439, 389, 22041, 76, 11, 477, 2500, 198, 12641, 1093, 45231, 1330, 11, 9708, 906, 525, 11, 5099, 13, 4390, 1271, 1005, 11, 499, 1288, 617, 279, 1629, 7830, 10344, 6462, 10487, 627, 13617, 1701, 264, 1646, 2865, 734, 25, 1527, 8859, 8995, 41541, 25624, 1179, 10323, 9480, 291, 26566, 25624, 198, 1527, 87970, 1179, 9156, 1747, 2520, 34, 80174, 11237, 11, 9156, 38534, 11, 15660, 198, 475, 1629, 7830, 439, 22408, 198, 43694, 284, 22408, 41601, 3232, 429, 41196, 7561, 605, 87, 498, 2937, 1857, 429, 32, 1041, 25, 16, 1158, 755, 636, 46287, 4019, 262, 1646, 851, 284, 330, 21617, 3554, 472, 40248, 702, 262, 47058, 284, 9156, 38534, 6521, 10659, 36822, 7790, 851, 8 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.self_hosted.SelfHostedEmbeddings.html
887ce79c3a24-1
tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained(model_id) return pipeline("feature-extraction", model=model, tokenizer=tokenizer) embeddings = SelfHostedEmbeddings( model_load_fn=get_pipeline, hardware=gpu model_reqs=["./", "torch", "transformers"], ) Example passing in a pipeline path:from langchain.embeddings import SelfHostedHFEmbeddings import runhouse as rh from transformers import pipeline gpu = rh.cluster(name="rh-a10x", instance_type="A100:1") pipeline = pipeline(model="bert-base-uncased", task="feature-extraction") rh.blob(pickle.dumps(pipeline), path="models/pipeline.pkl").save().to(gpu, path="models") embeddings = SelfHostedHFEmbeddings.from_pipeline( pipeline="models/pipeline.pkl", hardware=gpu, model_reqs=["./", "torch", "transformers"], ) Init the pipeline with an auxiliary function. The load function must be in global scope to be imported and run on the server, i.e. in a module and not a REPL or closure. Then, initialize the remote inference function. param cache: Optional[bool] = None¶ param callback_manager: Optional[BaseCallbackManager] = None¶ param callbacks: Callbacks = None¶ param hardware: Any = None¶ Remote hardware to send the inference function to. param inference_fn: Callable = <function _embed_documents>¶ Inference function to extract the embeddings on the remote hardware. param inference_kwargs: Any = None¶ Any kwargs to pass to the model’s inference function. param load_fn_kwargs: Optional[dict] = None¶
[ 86693, 284, 9156, 38534, 6521, 10659, 36822, 7790, 851, 340, 262, 1646, 284, 9156, 1747, 2520, 34, 80174, 11237, 6521, 10659, 36822, 7790, 851, 340, 262, 471, 15660, 446, 13043, 10397, 27523, 498, 1646, 63596, 11, 47058, 28, 86693, 340, 12529, 25624, 284, 10323, 9480, 291, 26566, 25624, 1021, 262, 1646, 12693, 15604, 29380, 46287, 345, 262, 12035, 38262, 5701, 198, 262, 1646, 18110, 82, 29065, 1761, 498, 330, 28514, 498, 330, 4806, 388, 8257, 340, 13617, 12579, 304, 264, 15660, 1853, 25, 1527, 8859, 8995, 41541, 25624, 1179, 10323, 9480, 291, 50816, 26566, 25624, 198, 475, 1629, 7830, 439, 22408, 198, 1527, 87970, 1179, 15660, 198, 43694, 284, 22408, 41601, 3232, 429, 41196, 7561, 605, 87, 498, 2937, 1857, 429, 32, 1041, 25, 16, 1158, 52358, 284, 15660, 7790, 429, 9339, 31113, 12, 1371, 1503, 498, 3465, 429, 13043, 10397, 27523, 1158, 41196, 97381, 1319, 26688, 22252, 1319, 8966, 1350, 262, 1853, 429, 6644, 4420, 8966, 50578, 1865, 6766, 1020, 998, 3348, 5701, 11, 1853, 429, 6644, 1158, 12529, 25624, 284, 10323, 9480, 291, 50816, 26566, 25624, 6521, 46287, 1021, 262, 15660, 429, 6644, 4420, 8966, 50578, 761, 262, 12035, 38262, 5701, 345, 262, 1646, 18110, 82, 29065, 1761, 498, 330, 28514, 498, 330, 4806, 388, 8257, 340, 3888, 279, 15660, 449, 459, 54558, 734, 627, 791, 2865, 734, 2011, 387, 304, 3728, 7036, 311, 387, 25973, 198, 438, 1629, 389, 279, 3622, 11, 602, 1770, 13, 304, 264, 4793, 323, 539, 264, 93680, 477, 22722, 627, 12487, 11, 9656, 279, 8870, 45478, 734, 627, 913, 6636, 25, 12536, 58, 2707, 60, 284, 2290, 55609, 198, 913, 4927, 12418, 25, 12536, 58, 4066, 7646, 2087, 60, 284, 2290, 55609, 198, 913, 27777, 25, 23499, 82, 284, 2290, 55609, 198, 913, 12035, 25, 5884, 284, 2290, 55609, 198, 25732, 12035, 311, 3708, 279, 45478, 734, 311, 627, 913, 45478, 15604, 25, 54223, 284, 366, 1723, 721, 12529, 77027, 29, 55609, 198, 644, 2251, 734, 311, 8819, 279, 71647, 389, 279, 8870, 12035, 627, 913, 45478, 37335, 25, 5884, 284, 2290, 55609, 198, 8780, 16901, 311, 1522, 311, 279, 1646, 753, 45478, 734, 627, 913, 2865, 15604, 37335, 25, 12536, 58, 8644, 60, 284, 2290, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.self_hosted.SelfHostedEmbeddings.html
887ce79c3a24-2
param load_fn_kwargs: Optional[dict] = None¶ Key word arguments to pass to the model load function. param model_load_fn: Callable [Required]¶ Function to load the model remotely on the server. param model_reqs: List[str] = ['./', 'torch']¶ Requirements to install on hardware to inference the model. param tags: Optional[List[str]] = None¶ Tags to add to the run trace. param verbose: bool [Optional]¶ Whether to print out response text. __call__(prompt: str, stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → str¶ Check Cache and run the LLM on the given prompt and input. async agenerate(prompts: List[str], stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, **kwargs: Any) → LLMResult¶ Run the LLM on the given prompt and input. async agenerate_prompt(prompts: List[PromptValue], stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → LLMResult¶ Take in a list of prompt values and return an LLMResult. classmethod all_required_field_names() → Set¶ async apredict(text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any) → str¶ Predict text from text. async apredict_messages(messages: List[BaseMessage], *, stop: Optional[Sequence[str]] = None, **kwargs: Any) → BaseMessage¶ Predict message from messages. dict(**kwargs: Any) → Dict¶
[ 913, 2865, 15604, 37335, 25, 12536, 58, 8644, 60, 284, 2290, 55609, 198, 1622, 3492, 6105, 311, 1522, 311, 279, 1646, 2865, 734, 627, 913, 1646, 12693, 15604, 25, 54223, 510, 8327, 60, 55609, 198, 5263, 311, 2865, 279, 1646, 39529, 389, 279, 3622, 627, 913, 1646, 18110, 82, 25, 1796, 17752, 60, 284, 18701, 518, 364, 28514, 663, 55609, 198, 60302, 311, 4685, 389, 12035, 311, 45478, 279, 1646, 627, 913, 9681, 25, 12536, 53094, 17752, 5163, 284, 2290, 55609, 198, 16309, 311, 923, 311, 279, 1629, 11917, 627, 913, 14008, 25, 1845, 510, 15669, 60, 55609, 198, 25729, 311, 1194, 704, 2077, 1495, 627, 565, 6797, 3889, 41681, 25, 610, 11, 3009, 25, 12536, 53094, 17752, 5163, 284, 2290, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 610, 55609, 198, 4061, 20044, 323, 1629, 279, 445, 11237, 389, 279, 2728, 10137, 323, 1988, 627, 7847, 945, 13523, 84432, 13044, 25, 1796, 17752, 1145, 3009, 25, 12536, 53094, 17752, 5163, 284, 2290, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 12039, 9681, 25, 12536, 53094, 17752, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 445, 11237, 2122, 55609, 198, 6869, 279, 445, 11237, 389, 279, 2728, 10137, 323, 1988, 627, 7847, 945, 13523, 62521, 84432, 13044, 25, 1796, 43447, 15091, 1150, 1145, 3009, 25, 12536, 53094, 17752, 5163, 284, 2290, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 445, 11237, 2122, 55609, 198, 18293, 304, 264, 1160, 315, 10137, 2819, 323, 471, 459, 445, 11237, 2122, 627, 27853, 682, 19265, 5121, 9366, 368, 11651, 2638, 55609, 198, 7847, 1469, 9037, 7383, 25, 610, 11, 12039, 3009, 25, 12536, 58, 14405, 17752, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 610, 55609, 198, 54644, 1495, 505, 1495, 627, 7847, 1469, 9037, 24321, 56805, 25, 1796, 58, 4066, 2097, 1145, 12039, 3009, 25, 12536, 58, 14405, 17752, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5464, 2097, 55609, 198, 54644, 1984, 505, 6743, 627, 8644, 22551, 9872, 25, 5884, 8, 11651, 30226, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.self_hosted.SelfHostedEmbeddings.html
887ce79c3a24-3
Predict message from messages. dict(**kwargs: Any) → Dict¶ Return a dictionary of the LLM. embed_documents(texts: List[str]) → List[List[float]][source]¶ Compute doc embeddings using a HuggingFace transformer model. Parameters texts – The list of texts to embed.s Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Compute query embeddings using a HuggingFace transformer model. Parameters text – The text to embed. Returns Embeddings for the text. classmethod from_pipeline(pipeline: Any, hardware: Any, model_reqs: Optional[List[str]] = None, device: int = 0, **kwargs: Any) → LLM¶ Init the SelfHostedPipeline from a pipeline object or string. generate(prompts: List[str], stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, **kwargs: Any) → LLMResult¶ Run the LLM on the given prompt and input. generate_prompt(prompts: List[PromptValue], stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → LLMResult¶ Take in a list of prompt values and return an LLMResult. get_num_tokens(text: str) → int¶ Get the number of tokens present in the text. get_num_tokens_from_messages(messages: List[BaseMessage]) → int¶ Get the number of tokens in the message. get_token_ids(text: str) → List[int]¶ Get the token present in the text.
[ 54644, 1984, 505, 6743, 627, 8644, 22551, 9872, 25, 5884, 8, 11651, 30226, 55609, 198, 5715, 264, 11240, 315, 279, 445, 11237, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 47354, 4733, 71647, 1701, 264, 473, 36368, 16680, 43678, 1646, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 516, 198, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 47354, 3319, 71647, 1701, 264, 473, 36368, 16680, 43678, 1646, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 27853, 505, 46287, 1319, 8966, 25, 5884, 11, 12035, 25, 5884, 11, 1646, 18110, 82, 25, 12536, 53094, 17752, 5163, 284, 2290, 11, 3756, 25, 528, 284, 220, 15, 11, 3146, 9872, 25, 5884, 8, 11651, 445, 11237, 55609, 198, 3888, 279, 10323, 9480, 291, 35756, 505, 264, 15660, 1665, 477, 925, 627, 19927, 84432, 13044, 25, 1796, 17752, 1145, 3009, 25, 12536, 53094, 17752, 5163, 284, 2290, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 12039, 9681, 25, 12536, 53094, 17752, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 445, 11237, 2122, 55609, 198, 6869, 279, 445, 11237, 389, 279, 2728, 10137, 323, 1988, 627, 19927, 62521, 84432, 13044, 25, 1796, 43447, 15091, 1150, 1145, 3009, 25, 12536, 53094, 17752, 5163, 284, 2290, 11, 27777, 25, 12536, 58, 33758, 53094, 58, 4066, 7646, 3126, 1145, 5464, 7646, 2087, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 445, 11237, 2122, 55609, 198, 18293, 304, 264, 1160, 315, 10137, 2819, 323, 471, 459, 445, 11237, 2122, 627, 456, 4369, 29938, 7383, 25, 610, 8, 11651, 528, 55609, 198, 1991, 279, 1396, 315, 11460, 3118, 304, 279, 1495, 627, 456, 4369, 29938, 5791, 24321, 56805, 25, 1796, 58, 4066, 2097, 2526, 11651, 528, 55609, 198, 1991, 279, 1396, 315, 11460, 304, 279, 1984, 627, 456, 6594, 8237, 7383, 25, 610, 8, 11651, 1796, 19155, 60, 55609, 198, 1991, 279, 4037, 3118, 304, 279, 1495, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.self_hosted.SelfHostedEmbeddings.html
887ce79c3a24-4
Get the token present in the text. predict(text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any) → str¶ Predict text from text. predict_messages(messages: List[BaseMessage], *, stop: Optional[Sequence[str]] = None, **kwargs: Any) → BaseMessage¶ Predict message from messages. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. save(file_path: Union[Path, str]) → None¶ Save the LLM. Parameters file_path – Path to file to save the LLM to. Example: .. code-block:: python llm.save(file_path=”path/llm.yaml”) validator set_verbose  »  verbose¶ If verbose is None, set it. This allows users to pass in None as verbose to access the global setting. to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶ to_json_not_implemented() → SerializedNotImplemented¶ property lc_attributes: Dict¶ Return a list of attribute names that should be included in the serialized kwargs. These attributes must be accepted by the constructor. property lc_namespace: List[str]¶ Return the namespace of the langchain object. eg. [“langchain”, “llms”, “openai”] property lc_secrets: Dict[str, str]¶ Return a map of constructor argument names to secret ids. eg. {“openai_api_key”: “OPENAI_API_KEY”} property lc_serializable: bool¶ Return whether or not the class is serializable. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 1991, 279, 4037, 3118, 304, 279, 1495, 627, 35798, 7383, 25, 610, 11, 12039, 3009, 25, 12536, 58, 14405, 17752, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 610, 55609, 198, 54644, 1495, 505, 1495, 627, 35798, 24321, 56805, 25, 1796, 58, 4066, 2097, 1145, 12039, 3009, 25, 12536, 58, 14405, 17752, 5163, 284, 2290, 11, 3146, 9872, 25, 5884, 8, 11651, 5464, 2097, 55609, 198, 54644, 1984, 505, 6743, 627, 16503, 4933, 2310, 70693, 4194, 8345, 4194, 682, 5151, 55609, 198, 94201, 409, 70693, 10163, 422, 4927, 12418, 374, 1511, 627, 6766, 4971, 2703, 25, 9323, 58, 1858, 11, 610, 2526, 11651, 2290, 55609, 198, 8960, 279, 445, 11237, 627, 9905, 198, 1213, 2703, 1389, 8092, 311, 1052, 311, 3665, 279, 445, 11237, 311, 627, 13617, 512, 497, 2082, 9612, 487, 10344, 198, 657, 76, 5799, 4971, 2703, 45221, 2398, 14, 657, 76, 34506, 863, 340, 16503, 743, 69021, 4194, 8345, 4194, 14008, 55609, 198, 2746, 14008, 374, 2290, 11, 743, 433, 627, 2028, 6276, 3932, 311, 1522, 304, 2290, 439, 14008, 311, 2680, 279, 3728, 6376, 627, 998, 9643, 368, 11651, 9323, 58, 78621, 13591, 11, 92572, 2688, 18804, 60, 55609, 198, 998, 9643, 8072, 18377, 14565, 368, 11651, 92572, 2688, 18804, 55609, 198, 3784, 37313, 18741, 25, 30226, 55609, 198, 5715, 264, 1160, 315, 7180, 5144, 430, 1288, 387, 5343, 304, 279, 198, 76377, 16901, 13, 4314, 8365, 2011, 387, 11928, 555, 279, 198, 22602, 627, 3784, 37313, 42671, 25, 1796, 17752, 60, 55609, 198, 5715, 279, 4573, 315, 279, 8859, 8995, 1665, 627, 797, 13, 510, 2118, 5317, 8995, 9520, 1054, 657, 1026, 9520, 1054, 2569, 2192, 863, 933, 3784, 37313, 3537, 53810, 25, 30226, 17752, 11, 610, 60, 55609, 198, 5715, 264, 2472, 315, 4797, 5811, 5144, 311, 6367, 14483, 627, 797, 13, 314, 2118, 2569, 2192, 11959, 3173, 57633, 1054, 32033, 15836, 11669, 6738, 863, 534, 3784, 37313, 26684, 8499, 25, 1845, 55609, 198, 5715, 3508, 477, 539, 279, 538, 374, 6275, 8499, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.self_hosted.SelfHostedEmbeddings.html
e8c1033960ac-0
langchain.embeddings.embaas.EmbaasEmbeddings¶ class langchain.embeddings.embaas.EmbaasEmbeddings(*, model: str = 'e5-large-v2', instruction: Optional[str] = None, api_url: str = 'https://api.embaas.io/v1/embeddings/', embaas_api_key: Optional[str] = None)[source]¶ Bases: BaseModel, Embeddings Wrapper around embaas’s embedding service. To use, you should have the environment variable EMBAAS_API_KEY set with your API key, or pass it as a named parameter to the constructor. Example # Initialise with default model and instruction from langchain.embeddings import EmbaasEmbeddings emb = EmbaasEmbeddings() # Initialise with custom model and instruction from langchain.embeddings import EmbaasEmbeddings emb_model = "instructor-large" emb_inst = "Represent the Wikipedia document for retrieval" emb = EmbaasEmbeddings( model=emb_model, instruction=emb_inst ) 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 api_url: str = 'https://api.embaas.io/v1/embeddings/'¶ The URL for the embaas embeddings API. param embaas_api_key: Optional[str] = None¶ param instruction: Optional[str] = None¶ Instruction used for domain-specific embeddings. param model: str = 'e5-large-v2'¶ The model used for embeddings. embed_documents(texts: List[str]) → List[List[float]][source]¶ Get embeddings for a list of texts. Parameters texts – The list of texts to get embeddings for. Returns
[ 5317, 8995, 41541, 25624, 9485, 4749, 300, 13, 2321, 4749, 300, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 9485, 4749, 300, 13, 2321, 4749, 300, 26566, 25624, 4163, 11, 1646, 25, 610, 284, 364, 68, 20, 40248, 8437, 17, 518, 7754, 25, 12536, 17752, 60, 284, 2290, 11, 6464, 2975, 25, 610, 284, 364, 2485, 1129, 2113, 9485, 4749, 300, 4340, 5574, 16, 59753, 25624, 14688, 991, 4749, 300, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 991, 4749, 300, 753, 40188, 2532, 627, 1271, 1005, 11, 499, 1288, 617, 279, 198, 24175, 3977, 17329, 7209, 1950, 11669, 6738, 743, 449, 701, 5446, 1401, 11, 477, 1522, 198, 275, 439, 264, 7086, 5852, 311, 279, 4797, 627, 13617, 198, 2, 72440, 449, 1670, 1646, 323, 7754, 198, 1527, 8859, 8995, 41541, 25624, 1179, 30227, 64, 300, 26566, 25624, 198, 9034, 284, 30227, 64, 300, 26566, 25624, 746, 2, 72440, 449, 2587, 1646, 323, 7754, 198, 1527, 8859, 8995, 41541, 25624, 1179, 30227, 64, 300, 26566, 25624, 198, 9034, 5156, 284, 330, 258, 3162, 40248, 702, 9034, 18212, 284, 330, 66843, 279, 27685, 2246, 369, 57470, 702, 9034, 284, 30227, 64, 300, 26566, 25624, 1021, 262, 1646, 28, 9034, 5156, 345, 262, 7754, 28, 9034, 18212, 198, 340, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 6464, 2975, 25, 610, 284, 364, 2485, 1129, 2113, 9485, 4749, 300, 4340, 5574, 16, 59753, 25624, 11576, 55609, 198, 791, 5665, 369, 279, 991, 4749, 300, 71647, 5446, 627, 913, 991, 4749, 300, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 913, 7754, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 17077, 1511, 369, 8106, 19440, 71647, 627, 913, 1646, 25, 610, 284, 364, 68, 20, 40248, 8437, 17, 6, 55609, 198, 791, 1646, 1511, 369, 71647, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 1991, 71647, 369, 264, 1160, 315, 22755, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 636, 71647, 369, 627, 16851 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.embaas.EmbaasEmbeddings.html
e8c1033960ac-1
Parameters texts – The list of texts to get embeddings for. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Get embeddings for a single text. Parameters text – The text to get embeddings for. Returns List of embeddings. validator validate_environment  »  all fields[source]¶ Validate that api key and python package exists in environment. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 636, 71647, 369, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 1991, 71647, 369, 264, 3254, 1495, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 636, 71647, 369, 627, 16851, 198, 861, 315, 71647, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 6464, 1401, 323, 10344, 6462, 6866, 304, 4676, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.embaas.EmbaasEmbeddings.html
b815a4dd005f-0
langchain.embeddings.deepinfra.DeepInfraEmbeddings¶ class langchain.embeddings.deepinfra.DeepInfraEmbeddings(*, model_id: str = 'sentence-transformers/clip-ViT-B-32', normalize: bool = False, embed_instruction: str = 'passage: ', query_instruction: str = 'query: ', model_kwargs: Optional[dict] = None, deepinfra_api_token: Optional[str] = None)[source]¶ Bases: BaseModel, Embeddings Wrapper around Deep Infra’s embedding inference service. To use, you should have the environment variable DEEPINFRA_API_TOKEN set with your API token, or pass it as a named parameter to the constructor. There are multiple embeddings models available, see https://deepinfra.com/models?type=embeddings. Example from langchain.embeddings import DeepInfraEmbeddings deepinfra_emb = DeepInfraEmbeddings( model_id="sentence-transformers/clip-ViT-B-32", deepinfra_api_token="my-api-key" ) r1 = deepinfra_emb.embed_documents( [ "Alpha is the first letter of Greek alphabet", "Beta is the second letter of Greek alphabet", ] ) r2 = deepinfra_emb.embed_query( "What is the second letter of Greek alphabet" ) 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 deepinfra_api_token: Optional[str] = None¶ param embed_instruction: str = 'passage: '¶ Instruction used to embed documents. param model_id: str = 'sentence-transformers/clip-ViT-B-32'¶ Embeddings model to use. param model_kwargs: Optional[dict] = None¶ Other model keyword args
[ 5317, 8995, 41541, 25624, 22597, 93417, 56702, 19998, 969, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 22597, 93417, 56702, 19998, 969, 26566, 25624, 4163, 11, 1646, 851, 25, 610, 284, 364, 52989, 33952, 388, 14, 8133, 20198, 84689, 7826, 12, 843, 518, 22436, 25, 1845, 284, 3641, 11, 11840, 56023, 25, 610, 284, 364, 6519, 425, 25, 6752, 3319, 56023, 25, 610, 284, 364, 1663, 25, 6752, 1646, 37335, 25, 12536, 58, 8644, 60, 284, 2290, 11, 5655, 93417, 11959, 6594, 25, 12536, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 18682, 15268, 969, 753, 40188, 45478, 2532, 627, 1271, 1005, 11, 499, 1288, 617, 279, 198, 24175, 3977, 3467, 9377, 37509, 5726, 11669, 19199, 743, 449, 701, 5446, 4037, 11, 477, 1522, 198, 275, 439, 264, 7086, 5852, 311, 279, 4797, 627, 3947, 527, 5361, 71647, 4211, 2561, 345, 4151, 3788, 1129, 33980, 93417, 916, 20883, 87250, 28, 12529, 25624, 627, 13617, 198, 1527, 8859, 8995, 41541, 25624, 1179, 18682, 19998, 969, 26566, 25624, 198, 33980, 93417, 57964, 284, 18682, 19998, 969, 26566, 25624, 1021, 262, 1646, 851, 429, 52989, 33952, 388, 14, 8133, 20198, 84689, 7826, 12, 843, 761, 262, 5655, 93417, 11959, 6594, 429, 2465, 24851, 16569, 702, 340, 81, 16, 284, 5655, 93417, 57964, 41541, 77027, 1021, 262, 2330, 286, 330, 19947, 374, 279, 1176, 6661, 315, 18341, 28890, 761, 286, 330, 65911, 374, 279, 2132, 6661, 315, 18341, 28890, 761, 262, 5243, 340, 81, 17, 284, 5655, 93417, 57964, 41541, 5857, 1021, 262, 330, 3923, 374, 279, 2132, 6661, 315, 18341, 28890, 702, 340, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 5655, 93417, 11959, 6594, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 913, 11840, 56023, 25, 610, 284, 364, 6519, 425, 25, 364, 55609, 198, 17077, 1511, 311, 11840, 9477, 627, 913, 1646, 851, 25, 610, 284, 364, 52989, 33952, 388, 14, 8133, 20198, 84689, 7826, 12, 843, 6, 55609, 198, 26566, 25624, 1646, 311, 1005, 627, 913, 1646, 37335, 25, 12536, 58, 8644, 60, 284, 2290, 55609, 198, 11663, 1646, 16570, 2897 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.deepinfra.DeepInfraEmbeddings.html
b815a4dd005f-1
param model_kwargs: Optional[dict] = None¶ Other model keyword args param normalize: bool = False¶ whether to normalize the computed embeddings param query_instruction: str = 'query: '¶ Instruction used to embed the query. embed_documents(texts: List[str]) → List[List[float]][source]¶ Embed documents using a Deep Infra deployed embedding model. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Embed a query using a Deep Infra deployed embedding model. Parameters text – The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields[source]¶ Validate that api key and python package exists in environment. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 913, 1646, 37335, 25, 12536, 58, 8644, 60, 284, 2290, 55609, 198, 11663, 1646, 16570, 2897, 198, 913, 22436, 25, 1845, 284, 3641, 55609, 198, 49864, 311, 22436, 279, 25157, 71647, 198, 913, 3319, 56023, 25, 610, 284, 364, 1663, 25, 364, 55609, 198, 17077, 1511, 311, 11840, 279, 3319, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 26566, 9477, 1701, 264, 18682, 15268, 969, 27167, 40188, 1646, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 26566, 264, 3319, 1701, 264, 18682, 15268, 969, 27167, 40188, 1646, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 6464, 1401, 323, 10344, 6462, 6866, 304, 4676, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.deepinfra.DeepInfraEmbeddings.html
489aad624a36-0
langchain.embeddings.minimax.embed_with_retry¶ langchain.embeddings.minimax.embed_with_retry(embeddings: MiniMaxEmbeddings, *args: Any, **kwargs: Any) → Any[source]¶ Use tenacity to retry the completion call.
[ 5317, 8995, 41541, 25624, 4456, 76209, 41541, 6753, 63845, 55609, 198, 5317, 8995, 41541, 25624, 4456, 76209, 41541, 6753, 63845, 50825, 25624, 25, 20217, 6102, 26566, 25624, 11, 353, 2164, 25, 5884, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 76747, 60, 55609, 198, 10464, 5899, 4107, 311, 23515, 279, 9954, 1650, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.minimax.embed_with_retry.html
5c6c95f1dfe8-0
langchain.embeddings.vertexai.VertexAIEmbeddings¶ class langchain.embeddings.vertexai.VertexAIEmbeddings(*, client: _LanguageModel = None, model_name: str = 'textembedding-gecko', temperature: float = 0.0, max_output_tokens: int = 128, top_p: float = 0.95, top_k: int = 40, stop: Optional[List[str]] = None, project: Optional[str] = None, location: str = 'us-central1', credentials: Any = None, request_parallelism: int = 5)[source]¶ Bases: _VertexAICommon, Embeddings 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 credentials: Any = None¶ The default custom credentials (google.auth.credentials.Credentials) to use param location: str = 'us-central1'¶ The default location to use when making API calls. param max_output_tokens: int = 128¶ Token limit determines the maximum amount of text output from one prompt. param model_name: str = 'textembedding-gecko'¶ Model name to use. param project: Optional[str] = None¶ The default GCP project to use when making Vertex API calls. param request_parallelism: int = 5¶ The amount of parallelism allowed for requests issued to VertexAI models. param stop: Optional[List[str]] = None¶ Optional list of stop words to use when generating. param temperature: float = 0.0¶ Sampling temperature, it controls the degree of randomness in token selection. param top_k: int = 40¶ How the model selects tokens for output, the next token is selected from param top_p: float = 0.95¶
[ 5317, 8995, 41541, 25624, 48375, 2192, 73694, 15836, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 48375, 2192, 73694, 15836, 26566, 25624, 4163, 11, 3016, 25, 721, 14126, 1747, 284, 2290, 11, 1646, 1292, 25, 610, 284, 364, 1342, 95711, 12, 713, 32563, 518, 9499, 25, 2273, 284, 220, 15, 13, 15, 11, 1973, 7800, 29938, 25, 528, 284, 220, 4386, 11, 1948, 623, 25, 2273, 284, 220, 15, 13, 2721, 11, 1948, 4803, 25, 528, 284, 220, 1272, 11, 3009, 25, 12536, 53094, 17752, 5163, 284, 2290, 11, 2447, 25, 12536, 17752, 60, 284, 2290, 11, 3813, 25, 610, 284, 364, 355, 85181, 16, 518, 16792, 25, 5884, 284, 2290, 11, 1715, 61725, 2191, 25, 528, 284, 220, 20, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 721, 8484, 15836, 11076, 11, 38168, 25624, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 16792, 25, 5884, 284, 2290, 55609, 198, 791, 1670, 2587, 16792, 320, 17943, 9144, 75854, 732, 16112, 8, 311, 1005, 198, 913, 3813, 25, 610, 284, 364, 355, 85181, 16, 6, 55609, 198, 791, 1670, 3813, 311, 1005, 994, 3339, 5446, 6880, 627, 913, 1973, 7800, 29938, 25, 528, 284, 220, 4386, 55609, 198, 3404, 4017, 27667, 279, 7340, 3392, 315, 1495, 2612, 505, 832, 10137, 627, 913, 1646, 1292, 25, 610, 284, 364, 1342, 95711, 12, 713, 32563, 6, 55609, 198, 1747, 836, 311, 1005, 627, 913, 2447, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 1670, 480, 7269, 2447, 311, 1005, 994, 3339, 24103, 5446, 6880, 627, 913, 1715, 61725, 2191, 25, 528, 284, 220, 20, 55609, 198, 791, 3392, 315, 15638, 2191, 5535, 369, 7540, 11136, 311, 24103, 15836, 4211, 627, 913, 3009, 25, 12536, 53094, 17752, 5163, 284, 2290, 55609, 198, 15669, 1160, 315, 3009, 4339, 311, 1005, 994, 24038, 627, 913, 9499, 25, 2273, 284, 220, 15, 13, 15, 55609, 198, 99722, 9499, 11, 433, 11835, 279, 8547, 315, 87790, 304, 4037, 6727, 627, 913, 1948, 4803, 25, 528, 284, 220, 1272, 55609, 198, 4438, 279, 1646, 50243, 11460, 369, 2612, 11, 279, 1828, 4037, 374, 4183, 505, 198, 913, 1948, 623, 25, 2273, 284, 220, 15, 13, 2721, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.vertexai.VertexAIEmbeddings.html
5c6c95f1dfe8-1
param top_p: float = 0.95¶ Tokens are selected from most probable to least until the sum of their embed_documents(texts: List[str], batch_size: int = 5) → List[List[float]][source]¶ Embed a list of strings. Vertex AI currently sets a max batch size of 5 strings. Parameters texts – List[str] The list of strings to embed. batch_size – [int] The batch size of embeddings to send to the model Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Embed a text. Parameters text – The text to embed. Returns Embedding for the text. validator validate_environment  »  all fields[source]¶ Validates that the python package exists in environment. property is_codey_model: bool¶ task_executor: ClassVar[Optional[Executor]] = None¶
[ 913, 1948, 623, 25, 2273, 284, 220, 15, 13, 2721, 55609, 198, 30400, 527, 4183, 505, 1455, 35977, 311, 3325, 3156, 279, 2694, 315, 872, 198, 12529, 77027, 7383, 82, 25, 1796, 17752, 1145, 7309, 2424, 25, 528, 284, 220, 20, 8, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 26566, 264, 1160, 315, 9246, 13, 24103, 15592, 5131, 198, 5022, 264, 1973, 7309, 1404, 315, 220, 20, 9246, 627, 9905, 198, 87042, 1389, 1796, 17752, 60, 578, 1160, 315, 9246, 311, 11840, 627, 14377, 2424, 1389, 510, 396, 60, 578, 7309, 1404, 315, 71647, 311, 3708, 311, 279, 1646, 198, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 26566, 264, 1495, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 7113, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 4180, 988, 430, 279, 10344, 6462, 6866, 304, 4676, 627, 3784, 374, 4229, 88, 5156, 25, 1845, 55609, 198, 8366, 82307, 25, 3308, 4050, 58, 15669, 58, 26321, 5163, 284, 2290, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.vertexai.VertexAIEmbeddings.html
7a9a20ea0a9f-0
langchain.embeddings.google_palm.GooglePalmEmbeddings¶ class langchain.embeddings.google_palm.GooglePalmEmbeddings(*, client: Any = None, google_api_key: Optional[str] = None, model_name: str = 'models/embedding-gecko-001')[source]¶ Bases: BaseModel, Embeddings 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 client: Any = None¶ param google_api_key: Optional[str] = None¶ param model_name: str = 'models/embedding-gecko-001'¶ Model name to use. embed_documents(texts: List[str]) → List[List[float]][source]¶ Embed search docs. embed_query(text: str) → List[float][source]¶ Embed query text. validator validate_environment  »  all fields[source]¶ Validate api key, python package exists.
[ 5317, 8995, 41541, 25624, 5831, 623, 7828, 61493, 47, 7828, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 5831, 623, 7828, 61493, 47, 7828, 26566, 25624, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 11819, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 11, 1646, 1292, 25, 610, 284, 364, 6644, 59753, 7113, 12, 713, 32563, 12, 4119, 13588, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 3016, 25, 5884, 284, 2290, 55609, 198, 913, 11819, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 913, 1646, 1292, 25, 610, 284, 364, 6644, 59753, 7113, 12, 713, 32563, 12, 4119, 6, 55609, 198, 1747, 836, 311, 1005, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 26566, 2778, 27437, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 26566, 3319, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 6464, 1401, 11, 10344, 6462, 6866, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.google_palm.GooglePalmEmbeddings.html
4bde3e3be5fe-0
langchain.embeddings.llamacpp.LlamaCppEmbeddings¶ class langchain.embeddings.llamacpp.LlamaCppEmbeddings(*, client: Any = None, model_path: str, n_ctx: int = 512, n_parts: int = - 1, seed: int = - 1, f16_kv: bool = False, logits_all: bool = False, vocab_only: bool = False, use_mlock: bool = False, n_threads: Optional[int] = None, n_batch: Optional[int] = 8, n_gpu_layers: Optional[int] = None)[source]¶ Bases: BaseModel, Embeddings Wrapper around llama.cpp embedding models. To use, you should have the llama-cpp-python library installed, and provide the path to the Llama model as a named parameter to the constructor. Check out: https://github.com/abetlen/llama-cpp-python Example from langchain.embeddings import LlamaCppEmbeddings llama = LlamaCppEmbeddings(model_path="/path/to/model.bin") 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 f16_kv: bool = False¶ Use half-precision for key/value cache. param logits_all: bool = False¶ Return logits for all tokens, not just the last token. param model_path: str [Required]¶ param n_batch: Optional[int] = 8¶ Number of tokens to process in parallel. Should be a number between 1 and n_ctx. param n_ctx: int = 512¶ Token context window. param n_gpu_layers: Optional[int] = None¶ Number of layers to be loaded into gpu memory. Default None. param n_parts: int = -1¶
[ 5317, 8995, 41541, 25624, 60098, 33707, 604, 1236, 81101, 10091, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 60098, 33707, 604, 1236, 81101, 10091, 26566, 25624, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 1646, 2703, 25, 610, 11, 308, 15498, 25, 528, 284, 220, 8358, 11, 308, 34317, 25, 528, 284, 482, 220, 16, 11, 10533, 25, 528, 284, 482, 220, 16, 11, 282, 845, 98166, 25, 1845, 284, 3641, 11, 61888, 5823, 25, 1845, 284, 3641, 11, 24757, 18917, 25, 1845, 284, 3641, 11, 1005, 722, 1039, 25, 1845, 284, 3641, 11, 308, 30825, 25, 12536, 19155, 60, 284, 2290, 11, 308, 14876, 25, 12536, 19155, 60, 284, 220, 23, 11, 308, 36728, 27183, 25, 12536, 19155, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 94776, 7356, 40188, 4211, 627, 1271, 1005, 11, 499, 1288, 617, 279, 94776, 1824, 604, 73029, 6875, 10487, 11, 323, 3493, 279, 198, 2398, 311, 279, 445, 81101, 1646, 439, 264, 7086, 5852, 311, 279, 4797, 627, 4061, 704, 25, 3788, 1129, 5316, 916, 14, 10448, 2963, 14, 657, 3105, 1824, 604, 73029, 198, 13617, 198, 1527, 8859, 8995, 41541, 25624, 1179, 445, 81101, 10091, 26566, 25624, 198, 657, 3105, 284, 445, 81101, 10091, 26566, 25624, 7790, 2703, 6039, 2398, 33529, 25925, 30494, 1158, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 282, 845, 98166, 25, 1845, 284, 3641, 55609, 198, 10464, 4376, 12, 28281, 369, 1401, 58642, 6636, 627, 913, 61888, 5823, 25, 1845, 284, 3641, 55609, 198, 5715, 61888, 369, 682, 11460, 11, 539, 1120, 279, 1566, 4037, 627, 913, 1646, 2703, 25, 610, 510, 8327, 60, 55609, 198, 913, 308, 14876, 25, 12536, 19155, 60, 284, 220, 23, 55609, 198, 2903, 315, 11460, 311, 1920, 304, 15638, 627, 15346, 387, 264, 1396, 1990, 220, 16, 323, 308, 15498, 627, 913, 308, 15498, 25, 528, 284, 220, 8358, 55609, 198, 3404, 2317, 3321, 627, 913, 308, 36728, 27183, 25, 12536, 19155, 60, 284, 2290, 55609, 198, 2903, 315, 13931, 311, 387, 6799, 1139, 39534, 5044, 13, 8058, 2290, 627, 913, 308, 34317, 25, 528, 284, 482, 16, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.llamacpp.LlamaCppEmbeddings.html
4bde3e3be5fe-1
param n_parts: int = -1¶ Number of parts to split the model into. If -1, the number of parts is automatically determined. param n_threads: Optional[int] = None¶ Number of threads to use. If None, the number of threads is automatically determined. param seed: int = -1¶ Seed. If -1, a random seed is used. param use_mlock: bool = False¶ Force system to keep model in RAM. param vocab_only: bool = False¶ Only load the vocabulary, no weights. embed_documents(texts: List[str]) → List[List[float]][source]¶ Embed a list of documents using the Llama model. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Embed a query using the Llama model. Parameters text – The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields[source]¶ Validate that llama-cpp-python library is installed. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 913, 308, 34317, 25, 528, 284, 482, 16, 55609, 198, 2903, 315, 5596, 311, 6859, 279, 1646, 1139, 627, 2746, 482, 16, 11, 279, 1396, 315, 5596, 374, 9651, 11075, 627, 913, 308, 30825, 25, 12536, 19155, 60, 284, 2290, 55609, 198, 2903, 315, 14906, 311, 1005, 13, 1442, 2290, 11, 279, 1396, 198, 1073, 14906, 374, 9651, 11075, 627, 913, 10533, 25, 528, 284, 482, 16, 55609, 198, 42571, 13, 1442, 482, 16, 11, 264, 4288, 10533, 374, 1511, 627, 913, 1005, 722, 1039, 25, 1845, 284, 3641, 55609, 198, 19085, 1887, 311, 2567, 1646, 304, 22813, 627, 913, 24757, 18917, 25, 1845, 284, 3641, 55609, 198, 7456, 2865, 279, 36018, 11, 912, 14661, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 26566, 264, 1160, 315, 9477, 1701, 279, 445, 81101, 1646, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 26566, 264, 3319, 1701, 279, 445, 81101, 1646, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 94776, 1824, 604, 73029, 6875, 374, 10487, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.llamacpp.LlamaCppEmbeddings.html
54c8ad5d35e2-0
langchain.embeddings.self_hosted_hugging_face.load_embedding_model¶ langchain.embeddings.self_hosted_hugging_face.load_embedding_model(model_id: str, instruct: bool = False, device: int = 0) → Any[source]¶ Load the embedding model.
[ 5317, 8995, 41541, 25624, 28248, 13144, 291, 1552, 36368, 32085, 5214, 52602, 5156, 55609, 198, 5317, 8995, 41541, 25624, 28248, 13144, 291, 1552, 36368, 32085, 5214, 52602, 5156, 7790, 851, 25, 610, 11, 21745, 25, 1845, 284, 3641, 11, 3756, 25, 528, 284, 220, 15, 8, 11651, 5884, 76747, 60, 55609, 198, 6003, 279, 40188, 1646, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.self_hosted_hugging_face.load_embedding_model.html
2200dba1e160-0
langchain.embeddings.aleph_alpha.AlephAlphaAsymmetricSemanticEmbedding¶ class langchain.embeddings.aleph_alpha.AlephAlphaAsymmetricSemanticEmbedding(*, client: Any = None, model: Optional[str] = 'luminous-base', hosting: Optional[str] = 'https://api.aleph-alpha.com', normalize: Optional[bool] = True, compress_to_size: Optional[int] = 128, contextual_control_threshold: Optional[int] = None, control_log_additive: Optional[bool] = True, aleph_alpha_api_key: Optional[str] = None)[source]¶ Bases: BaseModel, Embeddings Wrapper for Aleph Alpha’s Asymmetric Embeddings AA provides you with an endpoint to embed a document and a query. The models were optimized to make the embeddings of documents and the query for a document as similar as possible. To learn more, check out: https://docs.aleph-alpha.com/docs/tasks/semantic_embed/ Example from aleph_alpha import AlephAlphaAsymmetricSemanticEmbedding embeddings = AlephAlphaSymmetricSemanticEmbedding() document = "This is a content of the document" query = "What is the content of the document?" doc_result = embeddings.embed_documents([document]) query_result = embeddings.embed_query(query) 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 aleph_alpha_api_key: Optional[str] = None¶ API key for Aleph Alpha API. param compress_to_size: Optional[int] = 128¶ Should the returned embeddings come back as an original 5120-dim vector, or should it be compressed to 128-dim. param contextual_control_threshold: Optional[int] = None¶
[ 5317, 8995, 41541, 25624, 13, 1604, 764, 27731, 885, 273, 764, 19947, 2170, 30559, 99031, 26566, 7113, 55609, 198, 1058, 8859, 8995, 41541, 25624, 13, 1604, 764, 27731, 885, 273, 764, 19947, 2170, 30559, 99031, 26566, 7113, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 1646, 25, 12536, 17752, 60, 284, 364, 75, 10318, 788, 31113, 518, 20256, 25, 12536, 17752, 60, 284, 364, 2485, 1129, 2113, 13, 1604, 764, 65638, 916, 518, 22436, 25, 12536, 58, 2707, 60, 284, 3082, 11, 25633, 2401, 2424, 25, 12536, 19155, 60, 284, 220, 4386, 11, 66251, 13742, 22616, 25, 12536, 19155, 60, 284, 2290, 11, 2585, 5337, 2962, 3486, 25, 12536, 58, 2707, 60, 284, 3082, 11, 22180, 764, 27731, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 369, 19623, 764, 25737, 753, 1666, 30559, 38168, 25624, 198, 6157, 5825, 499, 449, 459, 15233, 311, 11840, 264, 2246, 323, 264, 3319, 627, 791, 4211, 1051, 34440, 311, 1304, 279, 71647, 315, 9477, 323, 198, 1820, 3319, 369, 264, 2246, 439, 4528, 439, 3284, 627, 1271, 4048, 810, 11, 1817, 704, 25, 3788, 1129, 14452, 13, 1604, 764, 65638, 916, 27057, 82437, 14, 48958, 24967, 6018, 13617, 198, 1527, 22180, 764, 27731, 1179, 19623, 764, 19947, 2170, 30559, 99031, 26566, 7113, 198, 12529, 25624, 284, 19623, 764, 19947, 29012, 16282, 99031, 26566, 7113, 746, 6190, 284, 330, 2028, 374, 264, 2262, 315, 279, 2246, 702, 1663, 284, 330, 3923, 374, 279, 2262, 315, 279, 2246, 48469, 5349, 5400, 284, 71647, 41541, 77027, 2625, 6190, 2608, 1663, 5400, 284, 71647, 41541, 5857, 10974, 340, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 22180, 764, 27731, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 7227, 1401, 369, 19623, 764, 25737, 5446, 627, 913, 25633, 2401, 2424, 25, 12536, 19155, 60, 284, 220, 4386, 55609, 198, 15346, 279, 6052, 71647, 2586, 1203, 439, 459, 4113, 220, 8358, 15, 1773, 318, 4724, 345, 269, 1288, 433, 387, 31749, 311, 220, 4386, 1773, 318, 627, 913, 66251, 13742, 22616, 25, 12536, 19155, 60, 284, 2290, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.aleph_alpha.AlephAlphaAsymmetricSemanticEmbedding.html
2200dba1e160-1
param contextual_control_threshold: Optional[int] = None¶ Attention control parameters only apply to those tokens that have explicitly been set in the request. param control_log_additive: Optional[bool] = True¶ Apply controls on prompt items by adding the log(control_factor) to attention scores. param hosting: Optional[str] = 'https://api.aleph-alpha.com'¶ Optional parameter that specifies which datacenters may process the request. param model: Optional[str] = 'luminous-base'¶ Model name to use. param normalize: Optional[bool] = True¶ Should returned embeddings be normalized embed_documents(texts: List[str]) → List[List[float]][source]¶ Call out to Aleph Alpha’s asymmetric Document endpoint. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Call out to Aleph Alpha’s asymmetric, query embedding endpoint :param text: The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields[source]¶ Validate that api key and python package exists in environment.
[ 913, 66251, 13742, 22616, 25, 12536, 19155, 60, 284, 2290, 55609, 198, 70429, 2585, 5137, 1193, 3881, 311, 1884, 11460, 430, 617, 198, 94732, 398, 1027, 743, 304, 279, 1715, 627, 913, 2585, 5337, 2962, 3486, 25, 12536, 58, 2707, 60, 284, 3082, 55609, 198, 29597, 11835, 389, 10137, 3673, 555, 7999, 279, 1515, 46073, 19100, 340, 998, 6666, 12483, 627, 913, 20256, 25, 12536, 17752, 60, 284, 364, 2485, 1129, 2113, 13, 1604, 764, 65638, 916, 6, 55609, 198, 15669, 5852, 430, 30202, 902, 828, 86541, 1253, 1920, 279, 1715, 627, 913, 1646, 25, 12536, 17752, 60, 284, 364, 75, 10318, 788, 31113, 6, 55609, 198, 1747, 836, 311, 1005, 627, 913, 22436, 25, 12536, 58, 2707, 60, 284, 3082, 55609, 198, 15346, 6052, 71647, 387, 30510, 198, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 7368, 704, 311, 19623, 764, 25737, 753, 97929, 12051, 15233, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 7368, 704, 311, 19623, 764, 25737, 753, 97929, 11, 3319, 40188, 15233, 198, 68416, 1495, 25, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 6464, 1401, 323, 10344, 6462, 6866, 304, 4676, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.aleph_alpha.AlephAlphaAsymmetricSemanticEmbedding.html
160e18396a97-0
langchain.embeddings.sagemaker_endpoint.EmbeddingsContentHandler¶ class langchain.embeddings.sagemaker_endpoint.EmbeddingsContentHandler[source]¶ Bases: ContentHandlerBase[List[str], List[List[float]]] Content handler for LLM class. Methods __init__() transform_input(prompt, model_kwargs) Transforms the input to a format that model can accept as the request Body. transform_output(output) Transforms the output from the model to string that the LLM class expects. Attributes accepts The MIME type of the response data returned from endpoint content_type The MIME type of the input data passed to endpoint abstract transform_input(prompt: INPUT_TYPE, model_kwargs: Dict) → bytes¶ Transforms the input to a format that model can accept as the request Body. Should return bytes or seekable file like object in the format specified in the content_type request header. abstract transform_output(output: bytes) → OUTPUT_TYPE¶ Transforms the output from the model to string that the LLM class expects. accepts: Optional[str] = 'text/plain'¶ The MIME type of the response data returned from endpoint content_type: Optional[str] = 'text/plain'¶ The MIME type of the input data passed to endpoint
[ 5317, 8995, 41541, 25624, 516, 15003, 4506, 37799, 58955, 25624, 2831, 3126, 55609, 198, 1058, 8859, 8995, 41541, 25624, 516, 15003, 4506, 37799, 58955, 25624, 2831, 3126, 76747, 60, 55609, 198, 33, 2315, 25, 9059, 3126, 4066, 53094, 17752, 1145, 1796, 53094, 96481, 5163, 933, 2831, 7158, 369, 445, 11237, 538, 627, 18337, 198, 565, 2381, 33716, 4806, 6022, 73353, 11, 4194, 2590, 37335, 340, 9140, 82, 279, 1988, 311, 264, 3645, 430, 1646, 649, 4287, 439, 279, 1715, 14285, 627, 4806, 7800, 11304, 340, 9140, 82, 279, 2612, 505, 279, 1646, 311, 925, 430, 279, 445, 11237, 538, 25283, 627, 10738, 198, 10543, 82, 198, 791, 58577, 955, 315, 279, 2077, 828, 6052, 505, 15233, 198, 1834, 1857, 198, 791, 58577, 955, 315, 279, 1988, 828, 5946, 311, 15233, 198, 16647, 5276, 6022, 73353, 25, 27241, 4283, 11, 1646, 37335, 25, 30226, 8, 11651, 5943, 55609, 198, 9140, 82, 279, 1988, 311, 264, 3645, 430, 1646, 649, 4287, 198, 300, 279, 1715, 14285, 13, 12540, 471, 5943, 477, 6056, 481, 1052, 198, 4908, 1665, 304, 279, 3645, 5300, 304, 279, 2262, 1857, 198, 2079, 4342, 627, 16647, 5276, 7800, 11304, 25, 5943, 8, 11651, 32090, 4283, 55609, 198, 9140, 82, 279, 2612, 505, 279, 1646, 311, 925, 430, 198, 1820, 445, 11237, 538, 25283, 627, 10543, 82, 25, 12536, 17752, 60, 284, 364, 1342, 38071, 6, 55609, 198, 791, 58577, 955, 315, 279, 2077, 828, 6052, 505, 15233, 198, 1834, 1857, 25, 12536, 17752, 60, 284, 364, 1342, 38071, 6, 55609, 198, 791, 58577, 955, 315, 279, 1988, 828, 5946, 311, 15233 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.sagemaker_endpoint.EmbeddingsContentHandler.html
a546d5ff582b-0
langchain.embeddings.embaas.EmbaasEmbeddingsPayload¶ class langchain.embeddings.embaas.EmbaasEmbeddingsPayload[source]¶ Bases: TypedDict Payload for the embaas embeddings API. Methods __init__(*args, **kwargs) clear() copy() fromkeys([value]) Create a new dictionary with keys from iterable and values set to value. get(key[, default]) Return the value for key if key is in the dictionary, else default. items() keys() pop(k[,d]) If the key is not found, return the default if given; otherwise, raise a KeyError. popitem() Remove and return a (key, value) pair as a 2-tuple. setdefault(key[, default]) Insert key with a value of default if key is not in the dictionary. update([E, ]**F) If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] values() Attributes model texts instruction clear() → None.  Remove all items from D.¶ copy() → a shallow copy of D¶ fromkeys(value=None, /)¶ Create a new dictionary with keys from iterable and values set to value. get(key, default=None, /)¶ Return the value for key if key is in the dictionary, else default. items() → a set-like object providing a view on D's items¶ keys() → a set-like object providing a view on D's keys¶
[ 5317, 8995, 41541, 25624, 9485, 4749, 300, 13, 2321, 4749, 300, 26566, 25624, 30783, 55609, 198, 1058, 8859, 8995, 41541, 25624, 9485, 4749, 300, 13, 2321, 4749, 300, 26566, 25624, 30783, 76747, 60, 55609, 198, 33, 2315, 25, 51654, 13755, 198, 30783, 369, 279, 991, 4749, 300, 71647, 5446, 627, 18337, 198, 565, 2381, 69106, 2164, 11, 4194, 334, 9872, 340, 7574, 746, 8728, 746, 1527, 10786, 2625, 970, 2608, 4110, 264, 502, 11240, 449, 7039, 505, 51934, 323, 2819, 743, 311, 907, 627, 456, 4962, 38372, 4194, 2309, 2608, 5715, 279, 907, 369, 1401, 422, 1401, 374, 304, 279, 11240, 11, 775, 1670, 627, 3699, 746, 10786, 746, 8539, 6097, 38372, 67, 2608, 2746, 279, 1401, 374, 539, 1766, 11, 471, 279, 1670, 422, 2728, 26, 6062, 11, 4933, 264, 39194, 627, 8539, 1224, 746, 13319, 323, 471, 264, 320, 798, 11, 907, 8, 6857, 439, 264, 220, 17, 2442, 6189, 627, 751, 2309, 4962, 38372, 4194, 2309, 2608, 14099, 1401, 449, 264, 907, 315, 1670, 422, 1401, 374, 539, 304, 279, 11240, 627, 2443, 2625, 36, 11, 4194, 79441, 37, 340, 2746, 469, 374, 3118, 323, 706, 264, 662, 10786, 368, 1749, 11, 1243, 1587, 25, 220, 369, 597, 304, 469, 25, 423, 6874, 60, 284, 469, 6874, 60, 1442, 469, 374, 3118, 323, 37856, 264, 662, 10786, 368, 1749, 11, 1243, 1587, 25, 220, 369, 597, 11, 348, 304, 469, 25, 423, 6874, 60, 284, 348, 763, 3060, 1162, 11, 420, 374, 8272, 555, 25, 369, 597, 304, 435, 25, 220, 423, 6874, 60, 284, 435, 6874, 933, 3745, 746, 10738, 198, 2590, 198, 87042, 198, 56074, 198, 7574, 368, 11651, 2290, 13, 4194, 11016, 682, 3673, 505, 423, 13, 55609, 198, 8728, 368, 11651, 264, 26682, 3048, 315, 423, 55609, 198, 1527, 10786, 3764, 5980, 11, 611, 8, 55609, 198, 4110, 264, 502, 11240, 449, 7039, 505, 51934, 323, 2819, 743, 311, 907, 627, 456, 4962, 11, 1670, 5980, 11, 611, 8, 55609, 198, 5715, 279, 907, 369, 1401, 422, 1401, 374, 304, 279, 11240, 11, 775, 1670, 627, 3699, 368, 11651, 264, 743, 12970, 1665, 8405, 264, 1684, 389, 423, 596, 3673, 55609, 198, 10786, 368, 11651, 264, 743, 12970, 1665, 8405, 264, 1684, 389, 423, 596, 7039, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.embaas.EmbaasEmbeddingsPayload.html
a546d5ff582b-1
keys() → a set-like object providing a view on D's keys¶ pop(k[, d]) → v, remove specified key and return the corresponding value.¶ If the key is not found, return the default if given; otherwise, raise a KeyError. popitem()¶ Remove and return a (key, value) pair as a 2-tuple. Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty. setdefault(key, default=None, /)¶ Insert key with a value of default if key is not in the dictionary. Return the value for key if key is in the dictionary, else default. update([E, ]**F) → None.  Update D from dict/iterable E and F.¶ If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] values() → an object providing a view on D's values¶ instruction: str¶ model: str¶ texts: List[str]¶
[ 10786, 368, 11651, 264, 743, 12970, 1665, 8405, 264, 1684, 389, 423, 596, 7039, 55609, 198, 8539, 6097, 38372, 294, 2526, 11651, 348, 11, 4148, 5300, 1401, 323, 471, 279, 12435, 907, 13, 55609, 198, 2746, 279, 1401, 374, 539, 1766, 11, 471, 279, 1670, 422, 2728, 26, 6062, 345, 19223, 264, 39194, 627, 8539, 1224, 368, 55609, 198, 13319, 323, 471, 264, 320, 798, 11, 907, 8, 6857, 439, 264, 220, 17, 2442, 6189, 627, 55328, 527, 6052, 304, 445, 27088, 320, 4354, 3502, 11, 1176, 9994, 8, 2015, 627, 36120, 39194, 422, 279, 6587, 374, 4384, 627, 751, 2309, 4962, 11, 1670, 5980, 11, 611, 8, 55609, 198, 14099, 1401, 449, 264, 907, 315, 1670, 422, 1401, 374, 539, 304, 279, 11240, 627, 5715, 279, 907, 369, 1401, 422, 1401, 374, 304, 279, 11240, 11, 775, 1670, 627, 2443, 2625, 36, 11, 2331, 334, 37, 8, 11651, 2290, 13, 4194, 5666, 423, 505, 6587, 14, 2058, 481, 469, 323, 435, 13, 55609, 198, 2746, 469, 374, 3118, 323, 706, 264, 662, 10786, 368, 1749, 11, 1243, 1587, 25, 220, 369, 597, 304, 469, 25, 423, 6874, 60, 284, 469, 6874, 933, 2746, 469, 374, 3118, 323, 37856, 264, 662, 10786, 368, 1749, 11, 1243, 1587, 25, 220, 369, 597, 11, 348, 304, 469, 25, 423, 6874, 60, 284, 348, 198, 644, 3060, 1162, 11, 420, 374, 8272, 555, 25, 369, 597, 304, 435, 25, 220, 423, 6874, 60, 284, 435, 6874, 933, 3745, 368, 11651, 459, 1665, 8405, 264, 1684, 389, 423, 596, 2819, 55609, 198, 56074, 25, 610, 55609, 198, 2590, 25, 610, 55609, 198, 87042, 25, 1796, 17752, 60, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.embaas.EmbaasEmbeddingsPayload.html
12a4a478a97f-0
langchain.embeddings.elasticsearch.ElasticsearchEmbeddings¶ class langchain.embeddings.elasticsearch.ElasticsearchEmbeddings(client: MlClient, model_id: str, *, input_field: str = 'text_field')[source]¶ Bases: Embeddings Wrapper around Elasticsearch embedding models. This class provides an interface to generate embeddings using a model deployed in an Elasticsearch cluster. It requires an Elasticsearch connection object and the model_id of the model deployed in the cluster. In Elasticsearch you need to have an embedding model loaded and deployed. - https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model.html - https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-deploy-models.html Initialize the ElasticsearchEmbeddings instance. Parameters client (MlClient) – An Elasticsearch ML client object. model_id (str) – The model_id of the model deployed in the Elasticsearch cluster. input_field (str) – The name of the key for the input text field in the document. Defaults to ‘text_field’. Methods __init__(client, model_id, *[, input_field]) Initialize the ElasticsearchEmbeddings instance. aembed_documents(texts) Embed search docs. aembed_query(text) Embed query text. embed_documents(texts) Generate embeddings for a list of documents. embed_query(text) Generate an embedding for a single query text. from_credentials(model_id, *[, es_cloud_id, ...]) Instantiate embeddings from Elasticsearch credentials. from_es_connection(model_id, es_connection) Instantiate embeddings from an existing Elasticsearch connection. async aembed_documents(texts: List[str]) → List[List[float]]¶ Embed search docs. async aembed_query(text: str) → List[float]¶ Embed query text.
[ 5317, 8995, 41541, 25624, 54178, 5253, 52279, 1874, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 54178, 5253, 52279, 1874, 26566, 25624, 13097, 25, 386, 75, 3032, 11, 1646, 851, 25, 610, 11, 12039, 1988, 5121, 25, 610, 284, 364, 1342, 5121, 13588, 2484, 60, 55609, 198, 33, 2315, 25, 38168, 25624, 198, 11803, 2212, 59987, 40188, 4211, 627, 2028, 538, 5825, 459, 3834, 311, 7068, 71647, 1701, 264, 1646, 27167, 198, 258, 459, 59987, 10879, 13, 1102, 7612, 459, 59987, 3717, 1665, 198, 438, 279, 1646, 851, 315, 279, 1646, 27167, 304, 279, 10879, 627, 644, 59987, 499, 1205, 311, 617, 459, 40188, 1646, 6799, 323, 27167, 627, 12, 3788, 1129, 2185, 16230, 5174, 6973, 4951, 35805, 13920, 89758, 28891, 66880, 75153, 18480, 809, 70024, 29344, 2628, 198, 12, 3788, 1129, 2185, 16230, 5174, 6973, 4951, 35805, 13920, 3262, 3899, 71856, 75153, 60648, 5392, 13855, 6953, 2760, 29344, 82, 2628, 198, 10130, 279, 59987, 26566, 25624, 2937, 627, 9905, 198, 3045, 320, 44, 75, 3032, 8, 1389, 1556, 59987, 20187, 3016, 1665, 627, 2590, 851, 320, 496, 8, 1389, 578, 1646, 851, 315, 279, 1646, 27167, 304, 279, 59987, 198, 19386, 627, 1379, 5121, 320, 496, 8, 1389, 578, 836, 315, 279, 1401, 369, 279, 1988, 1495, 2115, 304, 279, 198, 6190, 13, 37090, 311, 3451, 1342, 5121, 529, 627, 18337, 198, 565, 2381, 3889, 3045, 11, 4194, 2590, 851, 11, 4194, 9, 38372, 4194, 1379, 5121, 2608, 10130, 279, 59987, 26566, 25624, 2937, 627, 64, 12529, 77027, 7383, 82, 340, 26566, 2778, 27437, 627, 64, 12529, 5857, 7383, 340, 26566, 3319, 1495, 627, 12529, 77027, 7383, 82, 340, 32215, 71647, 369, 264, 1160, 315, 9477, 627, 12529, 5857, 7383, 340, 32215, 459, 40188, 369, 264, 3254, 3319, 1495, 627, 1527, 48496, 7790, 851, 11, 4194, 9, 38372, 4194, 288, 38456, 851, 11, 4194, 1131, 2608, 81651, 71647, 505, 59987, 16792, 627, 1527, 34841, 16245, 7790, 851, 11, 4194, 288, 16245, 340, 81651, 71647, 505, 459, 6484, 59987, 3717, 627, 7847, 264, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 5163, 55609, 198, 26566, 2778, 27437, 627, 7847, 264, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 60, 55609, 198, 26566, 3319, 1495, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.elasticsearch.ElasticsearchEmbeddings.html
12a4a478a97f-1
async aembed_query(text: str) → List[float]¶ Embed query text. embed_documents(texts: List[str]) → List[List[float]][source]¶ Generate embeddings for a list of documents. Parameters texts (List[str]) – A list of document text strings to generate embeddings for. Returns A list of embeddings, one for each document in the inputlist. Return type List[List[float]] embed_query(text: str) → List[float][source]¶ Generate an embedding for a single query text. Parameters text (str) – The query text to generate an embedding for. Returns The embedding for the input query text. Return type List[float] classmethod from_credentials(model_id: str, *, es_cloud_id: Optional[str] = None, es_user: Optional[str] = None, es_password: Optional[str] = None, input_field: str = 'text_field') → ElasticsearchEmbeddings[source]¶ Instantiate embeddings from Elasticsearch credentials. Parameters model_id (str) – The model_id of the model deployed in the Elasticsearch cluster. input_field (str) – The name of the key for the input text field in the document. Defaults to ‘text_field’. es_cloud_id – (str, optional): The Elasticsearch cloud ID to connect to. es_user – (str, optional): Elasticsearch username. es_password – (str, optional): Elasticsearch password. Example from langchain.embeddings import ElasticsearchEmbeddings # Define the model ID and input field name (if different from default) model_id = "your_model_id" # Optional, only if different from 'text_field' input_field = "your_input_field" # Credentials can be passed in two ways. Either set the env vars # ES_CLOUD_ID, ES_USER, ES_PASSWORD and they will be automatically
[ 7847, 264, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 60, 55609, 198, 26566, 3319, 1495, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 32215, 71647, 369, 264, 1160, 315, 9477, 627, 9905, 198, 87042, 320, 861, 17752, 2526, 1389, 362, 1160, 315, 2246, 1495, 9246, 311, 7068, 71647, 198, 2000, 627, 16851, 198, 32, 1160, 315, 71647, 11, 832, 369, 1855, 2246, 304, 279, 1988, 1638, 627, 5715, 955, 198, 861, 53094, 96481, 14623, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 32215, 459, 40188, 369, 264, 3254, 3319, 1495, 627, 9905, 198, 1342, 320, 496, 8, 1389, 578, 3319, 1495, 311, 7068, 459, 40188, 369, 627, 16851, 198, 791, 40188, 369, 279, 1988, 3319, 1495, 627, 5715, 955, 198, 861, 96481, 933, 27853, 505, 48496, 7790, 851, 25, 610, 11, 12039, 1560, 38456, 851, 25, 12536, 17752, 60, 284, 2290, 11, 1560, 3398, 25, 12536, 17752, 60, 284, 2290, 11, 1560, 10330, 25, 12536, 17752, 60, 284, 2290, 11, 1988, 5121, 25, 610, 284, 364, 1342, 5121, 873, 11651, 59987, 26566, 25624, 76747, 60, 55609, 198, 81651, 71647, 505, 59987, 16792, 627, 9905, 198, 2590, 851, 320, 496, 8, 1389, 578, 1646, 851, 315, 279, 1646, 27167, 304, 279, 59987, 198, 19386, 627, 1379, 5121, 320, 496, 8, 1389, 578, 836, 315, 279, 1401, 369, 279, 1988, 1495, 2115, 304, 279, 198, 6190, 13, 37090, 311, 3451, 1342, 5121, 529, 627, 288, 38456, 851, 1389, 320, 496, 11, 10309, 1680, 578, 59987, 9624, 3110, 311, 4667, 311, 627, 288, 3398, 1389, 320, 496, 11, 10309, 1680, 59987, 6059, 627, 288, 10330, 1389, 320, 496, 11, 10309, 1680, 59987, 3636, 627, 13617, 198, 1527, 8859, 8995, 41541, 25624, 1179, 59987, 26566, 25624, 198, 2, 19127, 279, 1646, 3110, 323, 1988, 2115, 836, 320, 333, 2204, 505, 1670, 340, 2590, 851, 284, 330, 22479, 5156, 851, 702, 2, 12536, 11, 1193, 422, 2204, 505, 364, 1342, 5121, 1270, 1379, 5121, 284, 330, 22479, 6022, 5121, 702, 2, 62360, 649, 387, 5946, 304, 1403, 5627, 13, 21663, 743, 279, 6233, 20537, 198, 2, 19844, 932, 48745, 3533, 11, 19844, 9285, 11, 19844, 23928, 323, 814, 690, 387, 9651 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.elasticsearch.ElasticsearchEmbeddings.html
12a4a478a97f-2
# ES_CLOUD_ID, ES_USER, ES_PASSWORD and they will be automatically # pulled in, or pass them in directly as kwargs. embeddings = ElasticsearchEmbeddings.from_credentials( model_id, input_field=input_field, # es_cloud_id="foo", # es_user="bar", # es_password="baz", ) documents = [ "This is an example document.", "Another example document to generate embeddings for.", ] embeddings_generator.embed_documents(documents) classmethod from_es_connection(model_id: str, es_connection: Elasticsearch, input_field: str = 'text_field') → ElasticsearchEmbeddings[source]¶ Instantiate embeddings from an existing Elasticsearch connection. This method provides a way to create an instance of the ElasticsearchEmbeddings class using an existing Elasticsearch connection. The connection object is used to create an MlClient, which is then used to initialize the ElasticsearchEmbeddings instance. Args: model_id (str): The model_id of the model deployed in the Elasticsearch cluster. es_connection (elasticsearch.Elasticsearch): An existing Elasticsearch connection object. input_field (str, optional): The name of the key for the input text field in the document. Defaults to ‘text_field’. Returns: ElasticsearchEmbeddings: An instance of the ElasticsearchEmbeddings class. Example from elasticsearch import Elasticsearch from langchain.embeddings import ElasticsearchEmbeddings # Define the model ID and input field name (if different from default) model_id = "your_model_id" # Optional, only if different from 'text_field' input_field = "your_input_field" # Create Elasticsearch connection es_connection = Elasticsearch( hosts=["localhost:9200"], http_auth=("user", "password") ) # Instantiate ElasticsearchEmbeddings using the existing connection
[ 2, 19844, 932, 48745, 3533, 11, 19844, 9285, 11, 19844, 23928, 323, 814, 690, 387, 9651, 198, 2, 13541, 304, 11, 477, 1522, 1124, 304, 6089, 439, 16901, 627, 12529, 25624, 284, 59987, 26566, 25624, 6521, 48496, 1021, 262, 1646, 851, 345, 262, 1988, 5121, 40167, 5121, 345, 262, 674, 1560, 38456, 851, 429, 8134, 761, 262, 674, 1560, 3398, 429, 2308, 761, 262, 674, 1560, 10330, 429, 43673, 761, 340, 51878, 284, 2330, 262, 330, 2028, 374, 459, 3187, 2246, 10560, 262, 330, 14364, 3187, 2246, 311, 7068, 71647, 369, 10560, 933, 12529, 25624, 26898, 41541, 77027, 19702, 2901, 340, 27853, 505, 34841, 16245, 7790, 851, 25, 610, 11, 1560, 16245, 25, 59987, 11, 1988, 5121, 25, 610, 284, 364, 1342, 5121, 873, 11651, 59987, 26566, 25624, 76747, 60, 55609, 198, 81651, 71647, 505, 459, 6484, 59987, 3717, 627, 2028, 1749, 5825, 264, 1648, 311, 1893, 459, 2937, 315, 279, 59987, 26566, 25624, 198, 1058, 1701, 459, 6484, 59987, 3717, 13, 578, 3717, 1665, 374, 1511, 198, 998, 1893, 459, 386, 75, 3032, 11, 902, 374, 1243, 1511, 311, 9656, 279, 198, 36, 52279, 1874, 26566, 25624, 2937, 627, 4209, 512, 2590, 851, 320, 496, 1680, 578, 1646, 851, 315, 279, 1646, 27167, 304, 279, 59987, 10879, 627, 288, 16245, 320, 301, 28891, 5253, 52279, 1874, 1680, 1556, 6484, 59987, 198, 7898, 1665, 13, 1988, 5121, 320, 496, 11, 10309, 1680, 578, 836, 315, 279, 1401, 369, 279, 198, 1379, 1495, 2115, 304, 279, 2246, 13, 37090, 311, 3451, 1342, 5121, 529, 627, 16851, 512, 36, 52279, 1874, 26566, 25624, 25, 1556, 2937, 315, 279, 59987, 26566, 25624, 538, 627, 13617, 198, 1527, 658, 28891, 1179, 59987, 198, 1527, 8859, 8995, 41541, 25624, 1179, 59987, 26566, 25624, 198, 2, 19127, 279, 1646, 3110, 323, 1988, 2115, 836, 320, 333, 2204, 505, 1670, 340, 2590, 851, 284, 330, 22479, 5156, 851, 702, 2, 12536, 11, 1193, 422, 2204, 505, 364, 1342, 5121, 1270, 1379, 5121, 284, 330, 22479, 6022, 5121, 702, 2, 4324, 59987, 3717, 198, 288, 16245, 284, 59987, 1021, 262, 18939, 29065, 8465, 25, 18485, 15, 8073, 1795, 14341, 50097, 882, 498, 330, 3918, 1158, 340, 2, 33388, 59987, 26566, 25624, 1701, 279, 6484, 3717 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.elasticsearch.ElasticsearchEmbeddings.html
12a4a478a97f-3
) # Instantiate ElasticsearchEmbeddings using the existing connection embeddings = ElasticsearchEmbeddings.from_es_connection( model_id, es_connection, input_field=input_field, ) documents = [ "This is an example document.", "Another example document to generate embeddings for.", ] embeddings_generator.embed_documents(documents)
[ 340, 2, 33388, 59987, 26566, 25624, 1701, 279, 6484, 3717, 198, 12529, 25624, 284, 59987, 26566, 25624, 6521, 34841, 16245, 1021, 262, 1646, 851, 345, 262, 1560, 16245, 345, 262, 1988, 5121, 40167, 5121, 345, 340, 51878, 284, 2330, 262, 330, 2028, 374, 459, 3187, 2246, 10560, 262, 330, 14364, 3187, 2246, 311, 7068, 71647, 369, 10560, 933, 12529, 25624, 26898, 41541, 77027, 19702, 2901, 8 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.elasticsearch.ElasticsearchEmbeddings.html
774b0e4c59ea-0
langchain.embeddings.sagemaker_endpoint.SagemakerEndpointEmbeddings¶ class langchain.embeddings.sagemaker_endpoint.SagemakerEndpointEmbeddings(*, client: Any = None, endpoint_name: str = '', region_name: str = '', credentials_profile_name: Optional[str] = None, content_handler: EmbeddingsContentHandler, model_kwargs: Optional[Dict] = None, endpoint_kwargs: Optional[Dict] = None)[source]¶ Bases: BaseModel, Embeddings Wrapper around custom Sagemaker Inference Endpoints. To use, you must supply the endpoint name from your deployed Sagemaker model & the region where it is deployed. To authenticate, the AWS client uses the following methods to automatically load credentials: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html If a specific credential profile should be used, you must pass the name of the profile from the ~/.aws/credentials file that is to be used. Make sure the credentials / roles used have the required policies to access the Sagemaker endpoint. See: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html 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 content_handler: langchain.embeddings.sagemaker_endpoint.EmbeddingsContentHandler [Required]¶ The content handler class that provides an input and output transform functions to handle formats between LLM and the endpoint. param credentials_profile_name: Optional[str] = None¶ The name of the profile in the ~/.aws/credentials or ~/.aws/config files, which has either access keys or role information specified. If not specified, the default credential profile or, if on an EC2 instance, credentials from IMDS will be used.
[ 5317, 8995, 41541, 25624, 516, 15003, 4506, 37799, 815, 15003, 4506, 28480, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 516, 15003, 4506, 37799, 815, 15003, 4506, 28480, 26566, 25624, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 15233, 1292, 25, 610, 284, 9158, 5654, 1292, 25, 610, 284, 9158, 16792, 14108, 1292, 25, 12536, 17752, 60, 284, 2290, 11, 2262, 10393, 25, 38168, 25624, 2831, 3126, 11, 1646, 37335, 25, 12536, 58, 13755, 60, 284, 2290, 11, 15233, 37335, 25, 12536, 58, 13755, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 2587, 328, 15003, 4506, 763, 2251, 4060, 7862, 627, 1271, 1005, 11, 499, 2011, 8312, 279, 15233, 836, 505, 701, 27167, 198, 50, 15003, 4506, 1646, 612, 279, 5654, 1405, 433, 374, 27167, 627, 1271, 34289, 11, 279, 24124, 3016, 5829, 279, 2768, 5528, 311, 198, 28172, 7167, 2865, 16792, 512, 2485, 1129, 65, 2117, 18, 29871, 916, 5574, 16, 86686, 10729, 34249, 4951, 35805, 14, 33453, 2628, 198, 2746, 264, 3230, 41307, 5643, 1288, 387, 1511, 11, 499, 2011, 1522, 198, 1820, 836, 315, 279, 5643, 505, 279, 41058, 8805, 14, 33453, 1052, 430, 374, 311, 387, 1511, 627, 8238, 2771, 279, 16792, 611, 13073, 1511, 617, 279, 2631, 10396, 311, 198, 5323, 279, 328, 15003, 4506, 15233, 627, 10031, 25, 3788, 1129, 14452, 36266, 18771, 916, 39251, 1428, 34249, 34611, 42110, 73456, 623, 43138, 2628, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 2262, 10393, 25, 8859, 8995, 41541, 25624, 516, 15003, 4506, 37799, 58955, 25624, 2831, 3126, 510, 8327, 60, 55609, 198, 791, 2262, 7158, 538, 430, 5825, 459, 1988, 323, 198, 3081, 5276, 5865, 311, 3790, 20447, 1990, 445, 11237, 198, 438, 279, 15233, 627, 913, 16792, 14108, 1292, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 791, 836, 315, 279, 5643, 304, 279, 41058, 8805, 14, 33453, 477, 41058, 8805, 15072, 3626, 11, 902, 198, 4752, 3060, 2680, 7039, 477, 3560, 2038, 5300, 627, 2746, 539, 5300, 11, 279, 1670, 41307, 5643, 477, 11, 422, 389, 459, 21283, 17, 2937, 345, 33453, 505, 6654, 6061, 690, 387, 1511, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.sagemaker_endpoint.SagemakerEndpointEmbeddings.html
774b0e4c59ea-1
credentials from IMDS will be used. See: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html param endpoint_kwargs: Optional[Dict] = None¶ Optional attributes passed to the invoke_endpoint function. See `boto3`_. docs for more info. .. _boto3: <https://boto3.amazonaws.com/v1/documentation/api/latest/index.html> param endpoint_name: str = ''¶ The name of the endpoint from the deployed Sagemaker model. Must be unique within an AWS Region. param model_kwargs: Optional[Dict] = None¶ Key word arguments to pass to the model. param region_name: str = ''¶ The aws region where the Sagemaker model is deployed, eg. us-west-2. embed_documents(texts: List[str], chunk_size: int = 64) → List[List[float]][source]¶ Compute doc embeddings using a SageMaker Inference Endpoint. Parameters texts – The list of texts to embed. chunk_size – The chunk size defines how many input texts will be grouped together as request. If None, will use the chunk size specified by the class. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Compute query embeddings using a SageMaker inference endpoint. Parameters text – The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields[source]¶ Validate that AWS credentials to and python package exists in environment. model Config[source]¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
[ 33453, 505, 6654, 6061, 690, 387, 1511, 627, 10031, 25, 3788, 1129, 65, 2117, 18, 29871, 916, 5574, 16, 86686, 10729, 34249, 4951, 35805, 14, 33453, 2628, 198, 913, 15233, 37335, 25, 12536, 58, 13755, 60, 284, 2290, 55609, 198, 15669, 8365, 5946, 311, 279, 20466, 37799, 198, 1723, 13, 3580, 1595, 65, 2117, 18, 63, 5056, 27437, 369, 810, 3630, 627, 497, 721, 65, 2117, 18, 25, 366, 2485, 1129, 65, 2117, 18, 29871, 916, 5574, 16, 86686, 10729, 34249, 9199, 2628, 397, 913, 15233, 1292, 25, 610, 284, 3436, 55609, 198, 791, 836, 315, 279, 15233, 505, 279, 27167, 328, 15003, 4506, 1646, 627, 32876, 387, 5016, 2949, 459, 24124, 17593, 627, 913, 1646, 37335, 25, 12536, 58, 13755, 60, 284, 2290, 55609, 198, 1622, 3492, 6105, 311, 1522, 311, 279, 1646, 627, 913, 5654, 1292, 25, 610, 284, 3436, 55609, 198, 791, 32621, 5654, 1405, 279, 328, 15003, 4506, 1646, 374, 27167, 11, 8866, 13, 603, 38702, 12, 17, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 1145, 12143, 2424, 25, 528, 284, 220, 1227, 8, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 47354, 4733, 71647, 1701, 264, 54384, 34359, 763, 2251, 48369, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 27069, 2424, 1389, 578, 12143, 1404, 19170, 1268, 1690, 1988, 22755, 690, 198, 1395, 41141, 3871, 439, 1715, 13, 1442, 2290, 11, 690, 1005, 279, 198, 27069, 1404, 5300, 555, 279, 538, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 47354, 3319, 71647, 1701, 264, 54384, 34359, 45478, 15233, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 24124, 16792, 311, 323, 10344, 6462, 6866, 304, 4676, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 277, 88951, 9962, 43255, 284, 3082, 55609, 198, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.sagemaker_endpoint.SagemakerEndpointEmbeddings.html
4e34dee13b23-0
langchain.embeddings.fake.FakeEmbeddings¶ class langchain.embeddings.fake.FakeEmbeddings(*, size: int)[source]¶ Bases: Embeddings, BaseModel 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 size: int [Required]¶ async aembed_documents(texts: List[str]) → List[List[float]]¶ Embed search docs. async aembed_query(text: str) → List[float]¶ Embed query text. embed_documents(texts: List[str]) → List[List[float]][source]¶ Embed search docs. embed_query(text: str) → List[float][source]¶ Embed query text.
[ 5317, 8995, 41541, 25624, 95724, 1006, 731, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 95724, 1006, 731, 26566, 25624, 4163, 11, 1404, 25, 528, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 38168, 25624, 11, 65705, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 1404, 25, 528, 510, 8327, 60, 55609, 198, 7847, 264, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 5163, 55609, 198, 26566, 2778, 27437, 627, 7847, 264, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 60, 55609, 198, 26566, 3319, 1495, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 26566, 2778, 27437, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 26566, 3319, 1495, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.fake.FakeEmbeddings.html
51b035de3efa-0
langchain.embeddings.openai.embed_with_retry¶ langchain.embeddings.openai.embed_with_retry(embeddings: OpenAIEmbeddings, **kwargs: Any) → Any[source]¶ Use tenacity to retry the embedding call.
[ 5317, 8995, 41541, 25624, 5949, 2192, 41541, 6753, 63845, 55609, 198, 5317, 8995, 41541, 25624, 5949, 2192, 41541, 6753, 63845, 50825, 25624, 25, 5377, 15836, 26566, 25624, 11, 3146, 9872, 25, 5884, 8, 11651, 5884, 76747, 60, 55609, 198, 10464, 5899, 4107, 311, 23515, 279, 40188, 1650, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.openai.embed_with_retry.html
e694b81b1ce3-0
langchain.embeddings.octoai_embeddings.OctoAIEmbeddings¶ class langchain.embeddings.octoai_embeddings.OctoAIEmbeddings(*, endpoint_url: Optional[str] = None, model_kwargs: Optional[dict] = None, octoai_api_token: Optional[str] = None, embed_instruction: str = 'Represent this input: ', query_instruction: str = 'Represent the question for retrieving similar documents: ')[source]¶ Bases: BaseModel, Embeddings Wrapper around OctoAI Compute Service embedding models. The environment variable OCTOAI_API_TOKEN should be set with your API token, or it can be passed as a named parameter to the constructor. 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 embed_instruction: str = 'Represent this input: '¶ Instruction to use for embedding documents. param endpoint_url: Optional[str] = None¶ Endpoint URL to use. param model_kwargs: Optional[dict] = None¶ Keyword arguments to pass to the model. param octoai_api_token: Optional[str] = None¶ OCTOAI API Token param query_instruction: str = 'Represent the question for retrieving similar documents: '¶ Instruction to use for embedding query. embed_documents(texts: List[str]) → List[List[float]][source]¶ Compute document embeddings using an OctoAI instruct model. embed_query(text: str) → List[float][source]¶ Compute query embedding using an OctoAI instruct model. validator validate_environment  »  all fields[source]¶ Ensure that the API key and python package exist in environment. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 5317, 8995, 41541, 25624, 14778, 302, 78, 2192, 64872, 8548, 302, 78, 15836, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 14778, 302, 78, 2192, 64872, 8548, 302, 78, 15836, 26566, 25624, 4163, 11, 15233, 2975, 25, 12536, 17752, 60, 284, 2290, 11, 1646, 37335, 25, 12536, 58, 8644, 60, 284, 2290, 11, 18998, 78, 2192, 11959, 6594, 25, 12536, 17752, 60, 284, 2290, 11, 11840, 56023, 25, 610, 284, 364, 66843, 420, 1988, 25, 6752, 3319, 56023, 25, 610, 284, 364, 66843, 279, 3488, 369, 49324, 4528, 9477, 25, 64581, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 5020, 78, 15836, 23426, 5475, 40188, 4211, 627, 791, 4676, 3977, 67277, 46, 15836, 11669, 19199, 1288, 387, 743, 198, 4291, 701, 5446, 4037, 11, 477, 433, 649, 387, 5946, 198, 300, 264, 7086, 5852, 311, 279, 4797, 627, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 11840, 56023, 25, 610, 284, 364, 66843, 420, 1988, 25, 364, 55609, 198, 17077, 311, 1005, 369, 40188, 9477, 627, 913, 15233, 2975, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 28480, 5665, 311, 1005, 627, 913, 1646, 37335, 25, 12536, 58, 8644, 60, 284, 2290, 55609, 198, 35581, 6105, 311, 1522, 311, 279, 1646, 627, 913, 18998, 78, 2192, 11959, 6594, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 46, 1182, 46, 15836, 5446, 9857, 198, 913, 3319, 56023, 25, 610, 284, 364, 66843, 279, 3488, 369, 49324, 4528, 9477, 25, 364, 55609, 198, 17077, 311, 1005, 369, 40188, 3319, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 47354, 2246, 71647, 1701, 459, 5020, 78, 15836, 21745, 1646, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 47354, 3319, 40188, 1701, 459, 5020, 78, 15836, 21745, 1646, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 65539, 430, 279, 5446, 1401, 323, 10344, 6462, 3073, 304, 4676, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.octoai_embeddings.OctoAIEmbeddings.html
af8659f3f08c-0
langchain.embeddings.minimax.MiniMaxEmbeddings¶ class langchain.embeddings.minimax.MiniMaxEmbeddings(*, endpoint_url: str = 'https://api.minimax.chat/v1/embeddings', model: str = 'embo-01', embed_type_db: str = 'db', embed_type_query: str = 'query', minimax_group_id: Optional[str] = None, minimax_api_key: Optional[str] = None)[source]¶ Bases: BaseModel, Embeddings Wrapper around MiniMax’s embedding inference service. To use, you should have the environment variable MINIMAX_GROUP_ID and MINIMAX_API_KEY set with your API token, or pass it as a named parameter to the constructor. Example from langchain.embeddings import MiniMaxEmbeddings embeddings = MiniMaxEmbeddings() query_text = "This is a test query." query_result = embeddings.embed_query(query_text) document_text = "This is a test document." document_result = embeddings.embed_documents([document_text]) 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 embed_type_db: str = 'db'¶ For embed_documents param embed_type_query: str = 'query'¶ For embed_query param endpoint_url: str = 'https://api.minimax.chat/v1/embeddings'¶ Endpoint URL to use. param minimax_api_key: Optional[str] = None¶ API Key for MiniMax API. param minimax_group_id: Optional[str] = None¶ Group ID for MiniMax API. param model: str = 'embo-01'¶ Embeddings model name to use. embed(texts: List[str], embed_type: str) → List[List[float]][source]¶
[ 5317, 8995, 41541, 25624, 4456, 76209, 1345, 6729, 6102, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 4456, 76209, 1345, 6729, 6102, 26566, 25624, 4163, 11, 15233, 2975, 25, 610, 284, 364, 2485, 1129, 2113, 4456, 76209, 27215, 5574, 16, 59753, 25624, 518, 1646, 25, 610, 284, 364, 336, 754, 12, 1721, 518, 11840, 1857, 8856, 25, 610, 284, 364, 2042, 518, 11840, 1857, 5857, 25, 610, 284, 364, 1663, 518, 21877, 710, 6422, 851, 25, 12536, 17752, 60, 284, 2290, 11, 21877, 710, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 20217, 6102, 753, 40188, 45478, 2532, 627, 1271, 1005, 11, 499, 1288, 617, 279, 4676, 3977, 17116, 1829, 3027, 20734, 3533, 323, 198, 16818, 1829, 3027, 11669, 6738, 743, 449, 701, 5446, 4037, 11, 477, 1522, 433, 439, 264, 7086, 5852, 311, 198, 1820, 4797, 627, 13617, 198, 1527, 8859, 8995, 41541, 25624, 1179, 20217, 6102, 26566, 25624, 198, 12529, 25624, 284, 20217, 6102, 26566, 25624, 746, 1663, 4424, 284, 330, 2028, 374, 264, 1296, 3319, 10246, 1663, 5400, 284, 71647, 41541, 5857, 10974, 4424, 340, 6190, 4424, 284, 330, 2028, 374, 264, 1296, 2246, 10246, 6190, 5400, 284, 71647, 41541, 77027, 2625, 6190, 4424, 2608, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 11840, 1857, 8856, 25, 610, 284, 364, 2042, 6, 55609, 198, 2520, 11840, 77027, 198, 913, 11840, 1857, 5857, 25, 610, 284, 364, 1663, 6, 55609, 198, 2520, 11840, 5857, 198, 913, 15233, 2975, 25, 610, 284, 364, 2485, 1129, 2113, 4456, 76209, 27215, 5574, 16, 59753, 25624, 6, 55609, 198, 28480, 5665, 311, 1005, 627, 913, 21877, 710, 11959, 3173, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 7227, 5422, 369, 20217, 6102, 5446, 627, 913, 21877, 710, 6422, 851, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 2878, 3110, 369, 20217, 6102, 5446, 627, 913, 1646, 25, 610, 284, 364, 336, 754, 12, 1721, 6, 55609, 198, 26566, 25624, 1646, 836, 311, 1005, 627, 12529, 7383, 82, 25, 1796, 17752, 1145, 11840, 1857, 25, 610, 8, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.minimax.MiniMaxEmbeddings.html
af8659f3f08c-1
embed_documents(texts: List[str]) → List[List[float]][source]¶ Embed documents using a MiniMax embedding endpoint. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Embed a query using a MiniMax embedding endpoint. Parameters text – The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields[source]¶ Validate that group id and api key exists in environment. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 26566, 9477, 1701, 264, 20217, 6102, 40188, 15233, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 26566, 264, 3319, 1701, 264, 20217, 6102, 40188, 15233, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 1912, 887, 323, 6464, 1401, 6866, 304, 4676, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.minimax.MiniMaxEmbeddings.html
3bcd887b030d-0
langchain.embeddings.mosaicml.MosaicMLInstructorEmbeddings¶ class langchain.embeddings.mosaicml.MosaicMLInstructorEmbeddings(*, endpoint_url: str = 'https://models.hosted-on.mosaicml.hosting/instructor-xl/v1/predict', embed_instruction: str = 'Represent the document for retrieval: ', query_instruction: str = 'Represent the question for retrieving supporting documents: ', retry_sleep: float = 1.0, mosaicml_api_token: Optional[str] = None)[source]¶ Bases: BaseModel, Embeddings Wrapper around MosaicML’s embedding inference service. To use, you should have the environment variable MOSAICML_API_TOKEN set with your API token, or pass it as a named parameter to the constructor. Example from langchain.llms import MosaicMLInstructorEmbeddings endpoint_url = ( "https://models.hosted-on.mosaicml.hosting/instructor-large/v1/predict" ) mosaic_llm = MosaicMLInstructorEmbeddings( endpoint_url=endpoint_url, mosaicml_api_token="my-api-key" ) 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 embed_instruction: str = 'Represent the document for retrieval: '¶ Instruction used to embed documents. param endpoint_url: str = 'https://models.hosted-on.mosaicml.hosting/instructor-xl/v1/predict'¶ Endpoint URL to use. param mosaicml_api_token: Optional[str] = None¶ param query_instruction: str = 'Represent the question for retrieving supporting documents: '¶ Instruction used to embed the query. param retry_sleep: float = 1.0¶ How long to try sleeping for if a rate limit is encountered
[ 5317, 8995, 41541, 25624, 749, 45883, 1029, 1345, 45883, 2735, 644, 3162, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 749, 45883, 1029, 1345, 45883, 2735, 644, 3162, 26566, 25624, 4163, 11, 15233, 2975, 25, 610, 284, 364, 2485, 1129, 6644, 18320, 291, 10539, 749, 45883, 1029, 18320, 287, 18480, 3162, 32046, 5574, 16, 4420, 9037, 518, 11840, 56023, 25, 610, 284, 364, 66843, 279, 2246, 369, 57470, 25, 6752, 3319, 56023, 25, 610, 284, 364, 66843, 279, 3488, 369, 49324, 12899, 9477, 25, 6752, 23515, 50493, 25, 2273, 284, 220, 16, 13, 15, 11, 71624, 1029, 11959, 6594, 25, 12536, 17752, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 386, 45883, 2735, 753, 40188, 45478, 2532, 627, 1271, 1005, 11, 499, 1288, 617, 279, 198, 24175, 3977, 74174, 32, 1341, 2735, 11669, 19199, 743, 449, 701, 5446, 4037, 11, 477, 1522, 198, 275, 439, 264, 7086, 5852, 311, 279, 4797, 627, 13617, 198, 1527, 8859, 8995, 60098, 1026, 1179, 386, 45883, 2735, 644, 3162, 26566, 25624, 198, 33640, 2975, 284, 2456, 262, 330, 2485, 1129, 6644, 18320, 291, 10539, 749, 45883, 1029, 18320, 287, 18480, 3162, 40248, 5574, 16, 4420, 9037, 702, 340, 8801, 62488, 44095, 76, 284, 386, 45883, 2735, 644, 3162, 26566, 25624, 1021, 262, 15233, 2975, 28, 33640, 2975, 345, 262, 71624, 1029, 11959, 6594, 429, 2465, 24851, 16569, 702, 340, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 11840, 56023, 25, 610, 284, 364, 66843, 279, 2246, 369, 57470, 25, 364, 55609, 198, 17077, 1511, 311, 11840, 9477, 627, 913, 15233, 2975, 25, 610, 284, 364, 2485, 1129, 6644, 18320, 291, 10539, 749, 45883, 1029, 18320, 287, 18480, 3162, 32046, 5574, 16, 4420, 9037, 6, 55609, 198, 28480, 5665, 311, 1005, 627, 913, 71624, 1029, 11959, 6594, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 913, 3319, 56023, 25, 610, 284, 364, 66843, 279, 3488, 369, 49324, 12899, 9477, 25, 364, 55609, 198, 17077, 1511, 311, 11840, 279, 3319, 627, 913, 23515, 50493, 25, 2273, 284, 220, 16, 13, 15, 55609, 198, 4438, 1317, 311, 1456, 21811, 369, 422, 264, 4478, 4017, 374, 23926 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.mosaicml.MosaicMLInstructorEmbeddings.html
3bcd887b030d-1
How long to try sleeping for if a rate limit is encountered embed_documents(texts: List[str]) → List[List[float]][source]¶ Embed documents using a MosaicML deployed instructor embedding model. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Embed a query using a MosaicML deployed instructor embedding model. Parameters text – The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields[source]¶ Validate that api key and python package exists in environment. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 4438, 1317, 311, 1456, 21811, 369, 422, 264, 4478, 4017, 374, 23926, 198, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 26566, 9477, 1701, 264, 386, 45883, 2735, 27167, 33315, 40188, 1646, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 26566, 264, 3319, 1701, 264, 386, 45883, 2735, 27167, 33315, 40188, 1646, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 6464, 1401, 323, 10344, 6462, 6866, 304, 4676, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.mosaicml.MosaicMLInstructorEmbeddings.html
a24ad5df2d7e-0
langchain.embeddings.huggingface.HuggingFaceInstructEmbeddings¶ class langchain.embeddings.huggingface.HuggingFaceInstructEmbeddings(*, client: Any = None, model_name: str = 'hkunlp/instructor-large', cache_folder: Optional[str] = None, model_kwargs: Dict[str, Any] = None, encode_kwargs: Dict[str, Any] = None, embed_instruction: str = 'Represent the document for retrieval: ', query_instruction: str = 'Represent the question for retrieving supporting documents: ')[source]¶ Bases: BaseModel, Embeddings Wrapper around sentence_transformers embedding models. To use, you should have the sentence_transformers and InstructorEmbedding python packages installed. Example from langchain.embeddings import HuggingFaceInstructEmbeddings model_name = "hkunlp/instructor-large" model_kwargs = {'device': 'cpu'} encode_kwargs = {'normalize_embeddings': True} hf = HuggingFaceInstructEmbeddings( model_name=model_name, model_kwargs=model_kwargs, encode_kwargs=encode_kwargs ) Initialize the sentence_transformer. param cache_folder: Optional[str] = None¶ Path to store models. Can be also set by SENTENCE_TRANSFORMERS_HOME environment variable. param embed_instruction: str = 'Represent the document for retrieval: '¶ Instruction to use for embedding documents. param encode_kwargs: Dict[str, Any] [Optional]¶ Key word arguments to pass when calling the encode method of the model. param model_kwargs: Dict[str, Any] [Optional]¶ Key word arguments to pass to the model. param model_name: str = 'hkunlp/instructor-large'¶ Model name to use. param query_instruction: str = 'Represent the question for retrieving supporting documents: '¶ Instruction to use for embedding query.
[ 5317, 8995, 41541, 25624, 870, 36368, 1594, 3924, 36368, 16680, 644, 1257, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 870, 36368, 1594, 3924, 36368, 16680, 644, 1257, 26566, 25624, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 1646, 1292, 25, 610, 284, 364, 86611, 359, 13855, 18480, 3162, 40248, 518, 6636, 15626, 25, 12536, 17752, 60, 284, 2290, 11, 1646, 37335, 25, 30226, 17752, 11, 5884, 60, 284, 2290, 11, 16559, 37335, 25, 30226, 17752, 11, 5884, 60, 284, 2290, 11, 11840, 56023, 25, 610, 284, 364, 66843, 279, 2246, 369, 57470, 25, 6752, 3319, 56023, 25, 610, 284, 364, 66843, 279, 3488, 369, 49324, 12899, 9477, 25, 64581, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 11914, 18956, 388, 40188, 4211, 627, 1271, 1005, 11, 499, 1288, 617, 279, 11914, 18956, 388, 198, 438, 63462, 26566, 7113, 10344, 14519, 10487, 627, 13617, 198, 1527, 8859, 8995, 41541, 25624, 1179, 473, 36368, 16680, 644, 1257, 26566, 25624, 198, 2590, 1292, 284, 330, 86611, 359, 13855, 18480, 3162, 40248, 702, 2590, 37335, 284, 5473, 6239, 1232, 364, 16881, 16823, 6311, 37335, 284, 5473, 31690, 64872, 1232, 3082, 534, 45854, 284, 473, 36368, 16680, 644, 1257, 26566, 25624, 1021, 262, 1646, 1292, 63596, 1292, 345, 262, 1646, 37335, 63596, 37335, 345, 262, 16559, 37335, 28, 6311, 37335, 198, 340, 10130, 279, 11914, 18956, 261, 627, 913, 6636, 15626, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 1858, 311, 3637, 4211, 627, 6854, 387, 1101, 743, 555, 96851, 10360, 93721, 4419, 29566, 4676, 3977, 627, 913, 11840, 56023, 25, 610, 284, 364, 66843, 279, 2246, 369, 57470, 25, 364, 55609, 198, 17077, 311, 1005, 369, 40188, 9477, 627, 913, 16559, 37335, 25, 30226, 17752, 11, 5884, 60, 510, 15669, 60, 55609, 198, 1622, 3492, 6105, 311, 1522, 994, 8260, 279, 16559, 1749, 315, 279, 1646, 627, 913, 1646, 37335, 25, 30226, 17752, 11, 5884, 60, 510, 15669, 60, 55609, 198, 1622, 3492, 6105, 311, 1522, 311, 279, 1646, 627, 913, 1646, 1292, 25, 610, 284, 364, 86611, 359, 13855, 18480, 3162, 40248, 6, 55609, 198, 1747, 836, 311, 1005, 627, 913, 3319, 56023, 25, 610, 284, 364, 66843, 279, 3488, 369, 49324, 12899, 9477, 25, 364, 55609, 198, 17077, 311, 1005, 369, 40188, 3319, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.huggingface.HuggingFaceInstructEmbeddings.html
a24ad5df2d7e-1
Instruction to use for embedding query. embed_documents(texts: List[str]) → List[List[float]][source]¶ Compute doc embeddings using a HuggingFace instruct model. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Compute query embeddings using a HuggingFace instruct model. Parameters text – The text to embed. Returns Embeddings for the text. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 17077, 311, 1005, 369, 40188, 3319, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 47354, 4733, 71647, 1701, 264, 473, 36368, 16680, 21745, 1646, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 47354, 3319, 71647, 1701, 264, 473, 36368, 16680, 21745, 1646, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.huggingface.HuggingFaceInstructEmbeddings.html
01e659cf5962-0
langchain.embeddings.jina.JinaEmbeddings¶ class langchain.embeddings.jina.JinaEmbeddings(*, client: Any = None, model_name: str = 'ViT-B-32::openai', jina_auth_token: Optional[str] = None, jina_api_url: str = 'https://api.clip.jina.ai/api/v1/models/', request_headers: Optional[dict] = None)[source]¶ Bases: BaseModel, Embeddings 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 jina_api_url: str = 'https://api.clip.jina.ai/api/v1/models/'¶ param jina_auth_token: Optional[str] = None¶ param model_name: str = 'ViT-B-32::openai'¶ Model name to use. param request_headers: Optional[dict] = None¶ embed_documents(texts: List[str]) → List[List[float]][source]¶ Call out to Jina’s embedding endpoint. :param texts: The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Call out to Jina’s embedding endpoint. :param text: The text to embed. Returns Embeddings for the text. validator validate_environment  »  all fields[source]¶ Validate that auth token exists in environment.
[ 5317, 8995, 41541, 25624, 1190, 2259, 3587, 2259, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 1190, 2259, 3587, 2259, 26566, 25624, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 1646, 1292, 25, 610, 284, 364, 36644, 51, 7826, 12, 843, 487, 2569, 2192, 518, 503, 2259, 14341, 6594, 25, 12536, 17752, 60, 284, 2290, 11, 503, 2259, 11959, 2975, 25, 610, 284, 364, 2485, 1129, 2113, 39842, 1190, 2259, 41483, 10729, 5574, 16, 20883, 14688, 1715, 27817, 25, 12536, 58, 8644, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 4110, 264, 502, 1646, 555, 23115, 323, 69772, 1988, 828, 505, 16570, 6105, 627, 36120, 54129, 422, 279, 1988, 828, 4250, 387, 16051, 311, 1376, 264, 2764, 1646, 627, 913, 503, 2259, 11959, 2975, 25, 610, 284, 364, 2485, 1129, 2113, 39842, 1190, 2259, 41483, 10729, 5574, 16, 20883, 11576, 55609, 198, 913, 503, 2259, 14341, 6594, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 913, 1646, 1292, 25, 610, 284, 364, 36644, 51, 7826, 12, 843, 487, 2569, 2192, 6, 55609, 198, 1747, 836, 311, 1005, 627, 913, 1715, 27817, 25, 12536, 58, 8644, 60, 284, 2290, 55609, 198, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 7368, 704, 311, 622, 2259, 753, 40188, 15233, 627, 68416, 22755, 25, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 7368, 704, 311, 622, 2259, 753, 40188, 15233, 627, 68416, 1495, 25, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 16503, 9788, 52874, 4194, 8345, 4194, 682, 5151, 76747, 60, 55609, 198, 18409, 430, 4259, 4037, 6866, 304, 4676, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.jina.JinaEmbeddings.html
d1bbe9729fde-0
langchain.embeddings.huggingface.HuggingFaceEmbeddings¶ class langchain.embeddings.huggingface.HuggingFaceEmbeddings(*, client: Any = None, model_name: str = 'sentence-transformers/all-mpnet-base-v2', cache_folder: Optional[str] = None, model_kwargs: Dict[str, Any] = None, encode_kwargs: Dict[str, Any] = None)[source]¶ Bases: BaseModel, Embeddings Wrapper around sentence_transformers embedding models. To use, you should have the sentence_transformers python package installed. Example from langchain.embeddings import HuggingFaceEmbeddings model_name = "sentence-transformers/all-mpnet-base-v2" model_kwargs = {'device': 'cpu'} encode_kwargs = {'normalize_embeddings': False} hf = HuggingFaceEmbeddings( model_name=model_name, model_kwargs=model_kwargs, encode_kwargs=encode_kwargs ) Initialize the sentence_transformer. param cache_folder: Optional[str] = None¶ Path to store models. Can be also set by SENTENCE_TRANSFORMERS_HOME environment variable. param encode_kwargs: Dict[str, Any] [Optional]¶ Key word arguments to pass when calling the encode method of the model. param model_kwargs: Dict[str, Any] [Optional]¶ Key word arguments to pass to the model. param model_name: str = 'sentence-transformers/all-mpnet-base-v2'¶ Model name to use. embed_documents(texts: List[str]) → List[List[float]][source]¶ Compute doc embeddings using a HuggingFace transformer model. Parameters texts – The list of texts to embed. Returns List of embeddings, one for each text. embed_query(text: str) → List[float][source]¶ Compute query embeddings using a HuggingFace transformer model.
[ 5317, 8995, 41541, 25624, 870, 36368, 1594, 3924, 36368, 16680, 26566, 25624, 55609, 198, 1058, 8859, 8995, 41541, 25624, 870, 36368, 1594, 3924, 36368, 16680, 26566, 25624, 4163, 11, 3016, 25, 5884, 284, 2290, 11, 1646, 1292, 25, 610, 284, 364, 52989, 33952, 388, 32506, 12, 1331, 4816, 31113, 8437, 17, 518, 6636, 15626, 25, 12536, 17752, 60, 284, 2290, 11, 1646, 37335, 25, 30226, 17752, 11, 5884, 60, 284, 2290, 11, 16559, 37335, 25, 30226, 17752, 11, 5884, 60, 284, 2290, 6758, 2484, 60, 55609, 198, 33, 2315, 25, 65705, 11, 38168, 25624, 198, 11803, 2212, 11914, 18956, 388, 40188, 4211, 627, 1271, 1005, 11, 499, 1288, 617, 279, 11914, 18956, 388, 10344, 6462, 10487, 627, 13617, 198, 1527, 8859, 8995, 41541, 25624, 1179, 473, 36368, 16680, 26566, 25624, 198, 2590, 1292, 284, 330, 52989, 33952, 388, 32506, 12, 1331, 4816, 31113, 8437, 17, 702, 2590, 37335, 284, 5473, 6239, 1232, 364, 16881, 16823, 6311, 37335, 284, 5473, 31690, 64872, 1232, 3641, 534, 45854, 284, 473, 36368, 16680, 26566, 25624, 1021, 262, 1646, 1292, 63596, 1292, 345, 262, 1646, 37335, 63596, 37335, 345, 262, 16559, 37335, 28, 6311, 37335, 198, 340, 10130, 279, 11914, 18956, 261, 627, 913, 6636, 15626, 25, 12536, 17752, 60, 284, 2290, 55609, 198, 1858, 311, 3637, 4211, 627, 6854, 387, 1101, 743, 555, 96851, 10360, 93721, 4419, 29566, 4676, 3977, 627, 913, 16559, 37335, 25, 30226, 17752, 11, 5884, 60, 510, 15669, 60, 55609, 198, 1622, 3492, 6105, 311, 1522, 994, 8260, 279, 16559, 1749, 315, 279, 1646, 627, 913, 1646, 37335, 25, 30226, 17752, 11, 5884, 60, 510, 15669, 60, 55609, 198, 1622, 3492, 6105, 311, 1522, 311, 279, 1646, 627, 913, 1646, 1292, 25, 610, 284, 364, 52989, 33952, 388, 32506, 12, 1331, 4816, 31113, 8437, 17, 6, 55609, 198, 1747, 836, 311, 1005, 627, 12529, 77027, 7383, 82, 25, 1796, 17752, 2526, 11651, 1796, 53094, 96481, 28819, 2484, 60, 55609, 198, 47354, 4733, 71647, 1701, 264, 473, 36368, 16680, 43678, 1646, 627, 9905, 198, 87042, 1389, 578, 1160, 315, 22755, 311, 11840, 627, 16851, 198, 861, 315, 71647, 11, 832, 369, 1855, 1495, 627, 12529, 5857, 7383, 25, 610, 8, 11651, 1796, 96481, 1483, 2484, 60, 55609, 198, 47354, 3319, 71647, 1701, 264, 473, 36368, 16680, 43678, 1646, 13 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.huggingface.HuggingFaceEmbeddings.html
d1bbe9729fde-1
Compute query embeddings using a HuggingFace transformer model. Parameters text – The text to embed. Returns Embeddings for the text. model Config[source]¶ Bases: object Configuration for this pydantic object. extra = 'forbid'¶
[ 47354, 3319, 71647, 1701, 264, 473, 36368, 16680, 43678, 1646, 627, 9905, 198, 1342, 1389, 578, 1495, 311, 11840, 627, 16851, 198, 26566, 25624, 369, 279, 1495, 627, 2590, 5649, 76747, 60, 55609, 198, 33, 2315, 25, 1665, 198, 7843, 369, 420, 4611, 67, 8322, 1665, 627, 15824, 284, 364, 2000, 21301, 6, 55609 ]
https://langchain.readthedocs.io/en/latest/embeddings/langchain.embeddings.huggingface.HuggingFaceEmbeddings.html