removed langchain dependency
Browse files
HumanStandardInputFlow.py
CHANGED
|
@@ -2,7 +2,11 @@ from copy import deepcopy
|
|
| 2 |
from typing import Dict, Any
|
| 3 |
|
| 4 |
import hydra
|
|
|
|
| 5 |
from langchain import PromptTemplate
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
from flows.base_flows import AtomicFlow
|
| 8 |
from flows.messages import UpdateMessage_Generic
|
|
@@ -16,18 +20,17 @@ log = logging.get_logger(f"flows.{__name__}") # ToDo: Is there a better fix?
|
|
| 16 |
class HumanStandardInputFlow(AtomicFlow):
|
| 17 |
REQUIRED_KEYS_CONFIG = ["request_multi_line_input_flag"]
|
| 18 |
|
| 19 |
-
query_message_prompt_template:
|
| 20 |
|
| 21 |
__default_flow_config = {
|
| 22 |
"end_of_input_string": "EOI",
|
| 23 |
"input_keys": [],
|
| 24 |
"description": "Reads input from the user's standard input.",
|
| 25 |
"query_message_prompt_template": {
|
| 26 |
-
"_target_": "
|
| 27 |
"template": "",
|
| 28 |
"input_variables": [],
|
| 29 |
"partial_variables": {},
|
| 30 |
-
"template_format": "jinja2"
|
| 31 |
}
|
| 32 |
}
|
| 33 |
|
|
@@ -41,7 +44,6 @@ class HumanStandardInputFlow(AtomicFlow):
|
|
| 41 |
|
| 42 |
kwargs["query_message_prompt_template"] = \
|
| 43 |
hydra.utils.instantiate(config['query_message_prompt_template'], _convert_="partial")
|
| 44 |
-
|
| 45 |
return kwargs
|
| 46 |
|
| 47 |
@classmethod
|
|
|
|
| 2 |
from typing import Dict, Any
|
| 3 |
|
| 4 |
import hydra
|
| 5 |
+
<<<<<<< HEAD
|
| 6 |
from langchain import PromptTemplate
|
| 7 |
+
=======
|
| 8 |
+
from flows.prompt_template import JinjaPrompt
|
| 9 |
+
>>>>>>> removed langchain dependency
|
| 10 |
|
| 11 |
from flows.base_flows import AtomicFlow
|
| 12 |
from flows.messages import UpdateMessage_Generic
|
|
|
|
| 20 |
class HumanStandardInputFlow(AtomicFlow):
|
| 21 |
REQUIRED_KEYS_CONFIG = ["request_multi_line_input_flag"]
|
| 22 |
|
| 23 |
+
query_message_prompt_template: JinjaPrompt = None
|
| 24 |
|
| 25 |
__default_flow_config = {
|
| 26 |
"end_of_input_string": "EOI",
|
| 27 |
"input_keys": [],
|
| 28 |
"description": "Reads input from the user's standard input.",
|
| 29 |
"query_message_prompt_template": {
|
| 30 |
+
"_target_": "flows.prompt_template.JinjaPrompt",
|
| 31 |
"template": "",
|
| 32 |
"input_variables": [],
|
| 33 |
"partial_variables": {},
|
|
|
|
| 34 |
}
|
| 35 |
}
|
| 36 |
|
|
|
|
| 44 |
|
| 45 |
kwargs["query_message_prompt_template"] = \
|
| 46 |
hydra.utils.instantiate(config['query_message_prompt_template'], _convert_="partial")
|
|
|
|
| 47 |
return kwargs
|
| 48 |
|
| 49 |
@classmethod
|