Cogniswitch
CogniswitchToolSpec #
Bases: BaseToolSpec
Cogniswitch Tool Spec. A toolspec to have store_data and query_knowledge as tools to store the data from a file or a url and answer questions from the knowledge stored respectively.
Source code in llama-index-integrations/tools/llama-index-tools-cogniswitch/llama_index/tools/cogniswitch/base.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
|
store_data #
store_data(url: Optional[str] = None, file: Optional[str] = None, document_name: Optional[str] = None, document_description: Optional[str] = None) -> dict
Store data using the Cogniswitch service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
Optional[str]
|
URL link. |
None
|
file |
Optional[str]
|
file path of your file. |
None
|
document_name |
Optional[str]
|
Name of the document you are uploading. |
None
|
document_description |
Optional[str]
|
Description of the document. |
None
|
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
Response JSON from the Cogniswitch service. |
Source code in llama-index-integrations/tools/llama-index-tools-cogniswitch/llama_index/tools/cogniswitch/base.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
query_knowledge #
query_knowledge(query: str) -> dict
Send a query to the Cogniswitch service and retrieve the response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query |
str
|
Query to be answered. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
Response JSON from the Cogniswitch service. |
Source code in llama-index-integrations/tools/llama-index-tools-cogniswitch/llama_index/tools/cogniswitch/base.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
knowledge_status #
knowledge_status(document_name: str) -> dict
Use this function to know the status of the document or the URL uploaded Args: document_name (str): The document name or the url that is uploaded.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
Response JSON from the Cogniswitch service. |
Source code in llama-index-integrations/tools/llama-index-tools-cogniswitch/llama_index/tools/cogniswitch/base.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
|