Find answers from the community

Updated 2 years ago

quite puzzling after query and use str

quite puzzling. after query and use str(response), return like this: Response(response='\n\n text text text.', source_nodes=[NodeWithScore(node=Node(text='\ntext text.', doc_id='c9b62c00-6ae3-4dc6-8b9b-cd79c4737f6d', embedding=None, doc_hash='d74157c2912d9c9c386c0a58079c16ab2b94ad50a40275c8bb63640ec94a9a67', extra_info=None, node_info=None, relationships={}), score=None), NodeWithScore(node=Node(text='\ntext text.', doc_id='f35a8c60-5a21-467b-ab78-c19e70e7da29', embedding=None, doc_hash='d74157c2912d9c9c386c0a58079c16ab2b94ad50a40275c8bb63640ec94a9a67', extra_info=None, node_info=None, relationships={}), score=None), NodeWithScore(node=Node(text='BY
j
L
J
6 comments
hey @Jack2020 could you share source code? weird that str(response) is returning that
@Jack2020 what does the endpoint code look like in your flask code? How do you return the response?

(You can reply in this thread to keep the conversation organized πŸ’ͺ)
@Logan M @app.route("/query", methods=["GET", "POST"])
def query():
manager = get_manager()
response = None
if request.method == "POST":
query_text = request.json.get("text", None)
if query_text:
response = manager.use_pinecone_index(query_text)
return str(response)
Interesting πŸ€” and does use_pinecone_index(..) query a GPTPineconeIndex instance? Or what does that do?
@Logan M i modifed GPTPineconeIndex. but it works correctly without flask. so i guess it is caused by flask.
i will check modified GPTPineconeIndex.
Add a reply
Sign up and join the conversation on Discord