-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question]: Streaming response with metadata #14519
Labels
question
Further information is requested
Comments
I think I shared this on discord, by either yield the metadata at the start or end, or attach it to every text that you yield. Its still on the response object So either
or
or
|
Okk thank you so much got it👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Question Validation
Question
def get_completion(query: str, namespace: HomeNamespace, home_id: int):
"""
Queries document from for a specific property and returns the response and citations.
Args:
query (str): The query string.
namespace (str): The namespace for the Pinecone index.
home_id (str): The home ID to filter the documents.
Returns:
tuple: A tuple containing the response string and a list of citations.
"""
# Initialize Pinecone index
vector_store = PineconeVectorStore(pinecone_index=get_index(PineconeIndexEnum.HOME), namespace=namespace)
index = VectorStoreIndex.from_vector_store(vector_store=vector_store)
when I use this function I am only able to get the text of the response but I also want to access the metadata attributes so that I can also cite my page_number and other metadata
The text was updated successfully, but these errors were encountered: