Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ embeddings = OpenAIEmbeddings(openai_api_key = OPENAI_API)
|
|
34 |
|
35 |
index = pinecone.Index(index_name)
|
36 |
|
37 |
-
k =
|
38 |
|
39 |
st.title("USC GPT - Find the perfect class")
|
40 |
|
@@ -66,6 +66,7 @@ def get_rag_results(prompt):
|
|
66 |
3. Rerank the results from vector DB using a BERT-based cross encoder
|
67 |
'''
|
68 |
query = filter_agent(prompt, OPENAI_API)
|
|
|
69 |
|
70 |
##Get metadata filters
|
71 |
days_filter = list()
|
@@ -90,7 +91,7 @@ def get_rag_results(prompt):
|
|
90 |
## Query the pinecone database
|
91 |
response = index.query(
|
92 |
vector = embeddings.embed_query(query),
|
93 |
-
top_k =
|
94 |
filter = query_filter,
|
95 |
include_metadata = True
|
96 |
)
|
|
|
34 |
|
35 |
index = pinecone.Index(index_name)
|
36 |
|
37 |
+
k = 35
|
38 |
|
39 |
st.title("USC GPT - Find the perfect class")
|
40 |
|
|
|
66 |
3. Rerank the results from vector DB using a BERT-based cross encoder
|
67 |
'''
|
68 |
query = filter_agent(prompt, OPENAI_API)
|
69 |
+
print("Here is the response from the filter_agent", query)
|
70 |
|
71 |
##Get metadata filters
|
72 |
days_filter = list()
|
|
|
91 |
## Query the pinecone database
|
92 |
response = index.query(
|
93 |
vector = embeddings.embed_query(query),
|
94 |
+
top_k = k,
|
95 |
filter = query_filter,
|
96 |
include_metadata = True
|
97 |
)
|