LAION-AI/Open-Assistant

Handle edge case search queries better

開放

#3,259 建立於 2023年5月29日

 (4 則留言) (0 個反應) (1 位負責人)Python (3,263 個分叉)batch import
backendgood first issue

倉庫指標

星標
 (37,363 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

We should do some preprocessing of search_query here to prevent errors in edge cases, e.g. where the query ends with an operator like & or |.

Words separated by only a space and no operator also have no effect currently, we could modify these such that & is inserted automatically.

List of valid operations I am aware of:

&
|
<->
!

The syntax also allows combinations like &! and groupings via parantheses.

https://github.com/LAION-AI/Open-Assistant/blob/main/backend/oasst_backend/prompt_repository.py#L1023

貢獻者指南