| Copyright | (c) 2025 Tushar Adhatrao |
|---|---|
| License | MIT |
| Maintainer | Tushar Adhatrao <tusharadhatrao@gmail.com> |
| Stability | experimental |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Langchain.Tool.WikipediaTool
Description
Synopsis
- data WikipediaTool = WikipediaTool {
- topK :: Int
- docMaxChars :: Int
- languageCode :: Text
- defaultWikipediaTool :: WikipediaTool
- defaultTopK :: Int
- defaultDocMaxChars :: Int
- defaultLanguageCode :: Text
- data SearchQuery = SearchQuery {
- search :: [SearchResult]
- data SearchResponse = SearchResponse {
- query :: SearchQuery
- data Page = Page {}
- data SearchResult = SearchResult {}
- data Pages = Pages {}
- data PageResponse = PageResponse {}
Configuration
data WikipediaTool Source #
Wikipedia search tool configuration The tool uses Wikipedia's API to perform searches and retrieve page extracts.
Example configuration:
customTool = WikipediaTool
{ topK = 3
, docMaxChars = 1000
, languageCode = "es"
}Constructors
| WikipediaTool | |
Fields
| |
Instances
defaultWikipediaTool :: WikipediaTool Source #
Wikipedia search tool configuration The tool uses Wikipedia's API to perform searches and retrieve page extracts.
Example configuration:
customTool = WikipediaTool
{ topK = 3
, docMaxChars = 1000
, languageCode = "es"
}Parameters
defaultTopK :: Int Source #
Default value for top K
defaultDocMaxChars :: Int Source #
Default value for max chars
defaultLanguageCode :: Text Source #
Default language
Internal types
data SearchQuery Source #
Type for list of search result
Constructors
| SearchQuery | |
Fields
| |
Instances
| FromJSON SearchQuery Source # | |
Defined in Langchain.Tool.WikipediaTool | |
| Show SearchQuery Source # | |
Defined in Langchain.Tool.WikipediaTool Methods showsPrec :: Int -> SearchQuery -> ShowS # show :: SearchQuery -> String # showList :: [SearchQuery] -> ShowS # | |
data SearchResponse Source #
Data types for JSON parsing.
Constructors
| SearchResponse | |
Fields
| |
Instances
| FromJSON SearchResponse Source # | |
Defined in Langchain.Tool.WikipediaTool Methods parseJSON :: Value -> Parser SearchResponse # parseJSONList :: Value -> Parser [SearchResponse] # | |
| Generic SearchResponse Source # | |
Defined in Langchain.Tool.WikipediaTool Associated Types type Rep SearchResponse :: Type -> Type # Methods from :: SearchResponse -> Rep SearchResponse x # to :: Rep SearchResponse x -> SearchResponse # | |
| Show SearchResponse Source # | |
Defined in Langchain.Tool.WikipediaTool Methods showsPrec :: Int -> SearchResponse -> ShowS # show :: SearchResponse -> String # showList :: [SearchResponse] -> ShowS # | |
| type Rep SearchResponse Source # | |
Defined in Langchain.Tool.WikipediaTool type Rep SearchResponse = D1 ('MetaData "SearchResponse" "Langchain.Tool.WikipediaTool" "langchain-hs-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SearchResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "query") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SearchQuery))) | |
Represents wikipedia page
data SearchResult Source #
Result of SearchResult
Constructors
| SearchResult | |
Instances
| FromJSON SearchResult Source # | |
Defined in Langchain.Tool.WikipediaTool | |
| Show SearchResult Source # | |
Defined in Langchain.Tool.WikipediaTool Methods showsPrec :: Int -> SearchResult -> ShowS # show :: SearchResult -> String # showList :: [SearchResult] -> ShowS # | |
Collection of Wikipedia pages, where key is page id
data PageResponse Source #
Wikipedia response
Constructors
| PageResponse | |
Instances
| FromJSON PageResponse Source # | |
Defined in Langchain.Tool.WikipediaTool | |
| Generic PageResponse Source # | |
Defined in Langchain.Tool.WikipediaTool Associated Types type Rep PageResponse :: Type -> Type # | |
| Show PageResponse Source # | |
Defined in Langchain.Tool.WikipediaTool Methods showsPrec :: Int -> PageResponse -> ShowS # show :: PageResponse -> String # showList :: [PageResponse] -> ShowS # | |
| Eq PageResponse Source # | |
Defined in Langchain.Tool.WikipediaTool | |
| type Rep PageResponse Source # | |
Defined in Langchain.Tool.WikipediaTool type Rep PageResponse = D1 ('MetaData "PageResponse" "Langchain.Tool.WikipediaTool" "langchain-hs-0.0.1.0-inplace" 'False) (C1 ('MetaCons "PageResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "query") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Pages))) | |