Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -97,14 +97,15 @@ vectorstore = Pinecone.from_existing_index(index_name, embeddings)
|
|
97 |
def ask_yc_bot(question):
|
98 |
if (len(question)<3 ): return "Не зрозумів питання"
|
99 |
docs = vectorstore.similarity_search(question)
|
100 |
-
print_docs(docs)
|
101 |
source_name = docs[0].metadata['source']
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
108 |
|
109 |
|
110 |
|
|
|
97 |
def ask_yc_bot(question):
|
98 |
if (len(question)<3 ): return "Не зрозумів питання"
|
99 |
docs = vectorstore.similarity_search(question)
|
|
|
100 |
source_name = docs[0].metadata['source']
|
101 |
+
context = docs[0].page_content
|
102 |
+
result = query_gpt_3_5(question, context)
|
103 |
+
result = result + """
|
104 |
+
--------------------------------------------------------
|
105 |
+
[CONTEXT]
|
106 |
+
""" + context
|
107 |
+
result_vector = query_gpt_ft(question)
|
108 |
+
return result, result_vector
|
109 |
|
110 |
|
111 |
|