Spaces:
Sleeping
Sleeping
Merge branch 'main' of https://huggingface.co/spaces/bziiit/VEGETALIS_AI_API into main
Browse files234 unmodified lines235236237238239240241234 unmodified linestemplate_prompt = base_templatecontext = get_retreive_answer(enterprise_id, prompt, index, common_namespace)#final_prompt_simplified = prompt_formatting(prompt,template,context)infos_added_to_kb = handle_calling_add_to_knowledge_base(prompt,enterprise_id,index,getattr(user_input,"marque",""),user_id=getattr(user_input,"user_id",""))234 unmodified lines235236237238239240241234 unmodified linestemplate_prompt = base_templatecontext = get_retreive_answer(enterprise_id, prompt, index, common_namespace, user_id=user_input.user_id)#final_prompt_simplified = prompt_formatting(prompt,template,context)infos_added_to_kb = handle_calling_add_to_knowledge_base(prompt,enterprise_id,index,getattr(user_input,"marque",""),user_id=getattr(user_input,"user_id",""))
109 unmodified lines1101111121131141151166 unmodified lines12312412512612712820 unmodified lines149150151152153154155109 unmodified linesprint(e)return Falsedef get_retreive_answer(enterprise_id,prompt,index,common_id):try:print("common_id ",common_id)6 unmodified lines)enterprise_context = retriever.invoke(prompt)if enterprise_context:print("found enterprise context")20 unmodified lineselse:print("no commun context")response = enterprise_context + commun_contextelse:response = retriever.invoke(prompt)109 unmodified lines1101111121131141151166 unmodified lines12312412512612712812920 unmodified lines150151152153154155156109 unmodified linesprint(e)return Falsedef get_retreive_answer(enterprise_id,prompt,index,common_id,user_id=""):try:print("common_id ",common_id)6 unmodified lines)enterprise_context = retriever.invoke(prompt)user_memory = retriever.invoke(prompt,filters={"user_id":user_id})if enterprise_context:print("found enterprise context")20 unmodified lineselse:print("no commun context")response = user_memory + enterprise_context + commun_contextelse:response = retriever.invoke(prompt)
main.py+1-1
rag.py+3-2