Find answers from the community

Updated last year

Hi.

At a glance
Hi.
To check whether query message and context(include the information got from vector store) are folloiwng the content policy, I wanna know that how to call moderation api(Open AI API) before doing query.
W
a
2 comments
One approach is to set up a retriever for your index. This retriever would return the nodes intended for generating the response. After retrieving these nodes, you can perform content moderation checks on their text content. Subsequently, you can initiate a call to the Language Model (LLM) from your end, passing along the processed nodes.

https://docs.llamaindex.ai/en/stable/module_guides/querying/retriever/root.html
I got it! Thank you so much for your help.
Add a reply
Sign up and join the conversation on Discord