Skip to content

Commit

Permalink
Fix: Search org id bug
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
dallinbentley authored Feb 5, 2025
2 parents dd00ec3 + 80d3662 commit bb100d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,7 @@ async fn search_for_relevant_terms(
terms_search
where
fts @@ websearch_to_tsquery('{prompt}')
and organization_id = '{organization_id}'
order by rank_ix
limit least(10, 30) * 2
),
Expand All @@ -1236,6 +1237,7 @@ semantic as (
row_number() over (order by embedding <#> '{prompt_embedding}') as rank_ix
from
terms_search
where organization_id = '{organization_id}'
order by rank_ix
limit least(10, 30) * 2
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ You should talk about how you tried to fix the SQL query three times, and that y
At the end make sure to apologize to the user
PLEASE OUTPUT THE SQL QUERY IN THE FOLLOWING FORMAT:
```sql
<sql_query>
```
### GENERAL GUIDELINES
- Keep your response under 50 words
- Do not output the failed SQL query in your response
Expand Down

0 comments on commit bb100d4

Please sign in to comment.