Spaces:
Sleeping
Sleeping
John Graham Reynolds
commited on
Commit
·
3ad1eee
1
Parent(s):
c301575
remove old, commented out code
Browse files
chain.py
CHANGED
@@ -119,7 +119,6 @@ class ChainBuilder:
|
|
119 |
# Prompt Template for generation
|
120 |
prompt = ChatPromptTemplate.from_messages(
|
121 |
[
|
122 |
-
# ("system", self.llm_config.get("llm_prompt_template")), # add current date to the date_str var in system prompt
|
123 |
("system", self.get_system_prompt()),
|
124 |
# *** Note: This chain does not compress the history, so very long converastions can overflow the context window. TODO
|
125 |
# We need to at some point chop this history down to fixed amount of recent messages
|
@@ -174,15 +173,6 @@ class ChainBuilder:
|
|
174 |
return get_and_cache_model(endpoint, extra_params)
|
175 |
|
176 |
def build_chain(self):
|
177 |
-
# model = self.get_model()
|
178 |
-
# prompt = self.get_prompt()
|
179 |
-
# format_context = self.format_context()
|
180 |
-
# vector_search_as_retriever = self.get_retriever()
|
181 |
-
# query_rewrite_prompt = self.get_query_rewrite_prompt()
|
182 |
-
|
183 |
-
def get_date():
|
184 |
-
return datetime.datetime.now().strftime("%B %d, %Y")
|
185 |
-
|
186 |
# RAG Chain
|
187 |
chain = (
|
188 |
{
|
|
|
119 |
# Prompt Template for generation
|
120 |
prompt = ChatPromptTemplate.from_messages(
|
121 |
[
|
|
|
122 |
("system", self.get_system_prompt()),
|
123 |
# *** Note: This chain does not compress the history, so very long converastions can overflow the context window. TODO
|
124 |
# We need to at some point chop this history down to fixed amount of recent messages
|
|
|
173 |
return get_and_cache_model(endpoint, extra_params)
|
174 |
|
175 |
def build_chain(self):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
# RAG Chain
|
177 |
chain = (
|
178 |
{
|