stakwork / sphinx-nav-fiber

12 stars 45 forks source link

Update logic to render highlighted terms #1843

Closed tomsmith8 closed 1 month ago

tomsmith8 commented 1 month ago

Task

Subscribe to the following websocket event:

extractedentitieshook

Feture: Update AI summary answer and highlight the entities identified in the hook.

Currently, the highlighted terms are calculated from the nodes response when we search:

Image

NEW

Update the logic, to listen to the event extractedentitieshook. Any entity that is returned in entities list, we should highlight those exact match terms instead.

{

"ref_id": "12345-abced",
"question": "What is the Lightning Network?",
"entities": 
[
{"entity": "Lightning Network", "description": "this is a description"},
{"entity": "LND", "description": "this is a description"},
{"entity": "UTXO", "description": "this is a description"}
]
}

AI Summary: Morbi UTXO est eros, malesuada at ultricies id, congue eu metus. Lightning Network Phasellus vel tristique odio. Maecenas ex nunc, auctor ut mauris et, venenatis ullamcorper enim. Suspendisse LND luctus lectus id tellus placerat, a finibus lectus blandit. Maecenas condimentum metus velit, ut ullamcorper mi condimentum non.

In this case we should highlight UTXO, LND and Lightning Network

AbdulWahab3181 commented 1 month ago

@tomsmith8 Could you please assign me?

AbdulWahab3181 commented 1 month ago

@tomsmith8 Could you please assign me?

sophieturner0 commented 1 month ago

@tomsmith8 assign me?

tomsmith8 commented 1 month ago

@AbdulWahab3181 how we looking on this one? its high priority

Shoaibdev7 commented 1 month ago

@tomsmith8 I am available. I will provide the PR same day

AbdulWahab3181 commented 1 month ago

@tomsmith8 I am working on it. I will provide the PR in few hours.

tomsmith8 commented 1 month ago

ok, I will keep @AbdulWahab3181 on this. If you are unable to complete in next few hours, let me know and I'll reassign, thanks

AbdulWahab3181 commented 1 month ago

ok, I will keep @AbdulWahab3181 on this. If you are unable to complete in next few hours, let me know and I'll reassign, thanks

Sure