PubMedQueryGenerator
Bases: WorkflowHandler
Source code in llm_utils/aiweb_common/resource/PubMedQuery.py
6 7 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 |
|
generate_search_string(loop_n=0, last_query='')
The function generates a search string for a research query using prompts and responses.
Parameters: |
|
---|
of times the method has been called recursively. It is used to determine if additional prompts or
information should be included in the search string based on previous iterations. Defaults to 0
last_query: The last_query
parameter in the generate_search_string
method is used to store the
last query that was executed. It is then appended to the prompt if the loop_n
parameter is greater
than 0. This allows the method to provide additional context or information based on the previous
query
Returns: |
|
---|
prompt, after updating the total cost.
Source code in llm_utils/aiweb_common/resource/PubMedQuery.py
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 |
|