Retrieve log
labridge.func_modules.memory.experiment.retrieve_log
¶
labridge.func_modules.memory.experiment.retrieve_log.ExperimentLogRetriever
¶
Bases: LogBaseRetriever
This class retrieve in a specific user's experiment logs.
The docstring of the method retrieve
or aretrieve
are used as tool description of the
corresponding retriever tool.
PARAMETER | DESCRIPTION |
---|---|
embed_model |
The embed model. Defaults to None. If set to None, the Settings.embed_model will be used.
TYPE:
|
final_use_context |
Whether to add the context nodes of the retrieved nodes to the final results. Defaults to True.
TYPE:
|
relevant_top_k |
The
TYPE:
|
Source code in labridge\func_modules\memory\experiment\retrieve_log.py
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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
|
labridge.func_modules.memory.experiment.retrieve_log.ExperimentLogRetriever.aretrieve(item_to_be_retrieved, memory_id, start_date=None, end_date=None, experiment_name=None, **kwargs)
async
¶
This tool is used to retrieve relevant experiment logs in a certain experiment log memory.
PARAMETER | DESCRIPTION |
---|---|
item_to_be_retrieved |
This argument is necessary. It denotes things that you want to retrieve in the chat history memory.
TYPE:
|
memory_id |
This argument is necessary. It is the user_id of a lab member.
TYPE:
|
start_date |
This argument is optional. It denotes the start date in the format 'Year-Month-Day'. If both start_date and end_date are specified, only logs which are recorded between the start_date and end_date will be retrieved.
TYPE:
|
end_date |
This argument is optional. It denotes the end date in the format 'Year-Month-Day'.
TYPE:
|
experiment_name |
This argument is optional. It is the name of a specific experiment. If it is specified and is valid, only logs of this experiment will be retrieved.
TYPE:
|
kwargs |
Other arguments will be ignored.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[NodeWithScore]
|
Retrieved experiment logs. |
Source code in labridge\func_modules\memory\experiment\retrieve_log.py
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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
|
labridge.func_modules.memory.experiment.retrieve_log.ExperimentLogRetriever.get_memory_vector_index()
¶
Get the vector index.
Source code in labridge\func_modules\memory\experiment\retrieve_log.py
50 51 52 |
|
labridge.func_modules.memory.experiment.retrieve_log.ExperimentLogRetriever.get_memory_vector_retriever()
¶
Get the default vector index retriever, with default similarity_top_k and no date filters.
Source code in labridge\func_modules\memory\experiment\retrieve_log.py
54 55 56 57 58 59 60 |
|
labridge.func_modules.memory.experiment.retrieve_log.ExperimentLogRetriever.reset_vector_retriever()
¶
Reset the vector index retriever to defaults. Specifically, with no date filters and confined node ids.
Source code in labridge\func_modules\memory\experiment\retrieve_log.py
62 63 64 65 66 67 68 |
|
labridge.func_modules.memory.experiment.retrieve_log.ExperimentLogRetriever.retrieve(item_to_be_retrieved, memory_id, start_date=None, end_date=None, experiment_name=None, **kwargs)
¶
This tool is used to retrieve experiment logs of a user. Use this tool to help you to answer questions about experimental records.
PARAMETER | DESCRIPTION |
---|---|
item_to_be_retrieved |
This argument is necessary. It denotes things that you want to retrieve in the chat history memory.
TYPE:
|
memory_id |
This argument is necessary. It is the user_id of a lab member.
TYPE:
|
start_date |
This argument is optional. It denotes the start date in the format 'Year-Month-Day'. If both start_date and end_date are specified, only logs which are recorded between the start_date and end_date will be retrieved.
TYPE:
|
end_date |
This argument is optional. It denotes the end date in the format 'Year-Month-Day'.
TYPE:
|
experiment_name |
This argument is optional. It is the name of a specific experiment. If it is specified and is valid, only logs of this experiment will be retrieved.
TYPE:
|
kwargs |
Other arguments will be ignored.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[NodeWithScore]
|
Retrieved experiment logs. |
Source code in labridge\func_modules\memory\experiment\retrieve_log.py
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 |
|