Skip to content

Commit

Permalink
fix: use match_phrase_prefix on full_name field for table suggestion (#…
Browse files Browse the repository at this point in the history
…1433)

* fix: use match_phrase_prefix on full_name field for table suggestion

* add gpt-4-turbo contextsize
  • Loading branch information
jczhong84 authored Apr 11, 2024
1 parent 067d96d commit cd11be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"gpt-3.5-turbo-16k": 16385,
"gpt-4": 8192,
"gpt-4-32k": 32768,
"gpt-4-turbo": 128000,
}
DEFAULT_MODEL_NAME = "gpt-3.5-turbo"

Expand Down
4 changes: 1 addition & 3 deletions querybook/server/lib/elasticsearch/suggest_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ def construct_suggest_table_query(
"size": limit,
"query": {
"bool": {
"must": {
"match": {"full_name_ngram": {"query": keyword, "operator": "and"}}
},
"must": [{"match_phrase_prefix": {"full_name": {"query": keyword}}}],
"filter": {"match": {"metastore_id": metastore_id}},
}
},
Expand Down

0 comments on commit cd11be9

Please sign in to comment.