Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -106,10 +106,15 @@ def query_hybrid_search(query: str, client: QdrantClient, collection_name: str,
|
|
106 |
)
|
107 |
|
108 |
def build_prompt_conv():
|
109 |
-
return
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
@outlines.prompt
|
115 |
def build_initial_prompt(query: str):
|
@@ -734,7 +739,7 @@ if __name__ == '__main__':
|
|
734 |
|
735 |
def generate_conv_title(llm):
|
736 |
if st.session_state.chat_id == 'New Conversation':
|
737 |
-
output = llm.
|
738 |
build_prompt_conv(),
|
739 |
SamplingParams(temperature=0.3, max_tokens=10)
|
740 |
)
|
|
|
106 |
)
|
107 |
|
108 |
def build_prompt_conv():
|
109 |
+
return [
|
110 |
+
{
|
111 |
+
'role': 'user',
|
112 |
+
'content': f"""Generate a short, single-sentence summary of the user's intent or topic based on their question, capturing the main focus of what they want to discuss.
|
113 |
+
|
114 |
+
Question : {st.session_state.user_input}
|
115 |
+
"""
|
116 |
+
}
|
117 |
+
]
|
118 |
|
119 |
@outlines.prompt
|
120 |
def build_initial_prompt(query: str):
|
|
|
739 |
|
740 |
def generate_conv_title(llm):
|
741 |
if st.session_state.chat_id == 'New Conversation':
|
742 |
+
output = llm.chat(
|
743 |
build_prompt_conv(),
|
744 |
SamplingParams(temperature=0.3, max_tokens=10)
|
745 |
)
|