Spaces:
Sleeping
Sleeping
add previous user query to vector search
Browse files- actions/actions.py +1 -2
actions/actions.py
CHANGED
@@ -38,8 +38,7 @@ def generate_openai_response(query, model_engine="gpt-3.5-turbo", max_tokens=256
|
|
38 |
# Run the main function from search_content.py and store the results in a variable
|
39 |
|
40 |
#results = main_search(query)
|
41 |
-
results = main_search(query["current_user_query"])
|
42 |
-
dispatcher.utter_message(text="current query:"+query["current_user_query"])
|
43 |
|
44 |
# Create context from the results
|
45 |
context = "".join([f"#{str(i)}" for i in results])[:2014] # Trim the context to 2014 characters - Modify as necessory
|
|
|
38 |
# Run the main function from search_content.py and store the results in a variable
|
39 |
|
40 |
#results = main_search(query)
|
41 |
+
results = main_search(query["current_user_query"]+query["previous_user_query"])
|
|
|
42 |
|
43 |
# Create context from the results
|
44 |
context = "".join([f"#{str(i)}" for i in results])[:2014] # Trim the context to 2014 characters - Modify as necessory
|