Skip to content

Commit a03e9c4

Browse files
updated the parsing of parameters with CREATE KNOWLEDGE_BASE
1 parent 203c86c commit a03e9c4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

mindsdb_sql_parser/parser.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,20 @@ def create_kb(self, p):
112112
name = p.identifier
113113
# check model and storage are in params
114114
params = {k.lower(): v for k, v in params.items()} # case insensitive
115-
model = params.pop('model', None)
115+
embedding_model = params.pop('embedding_model', None)
116+
reranking_model = params.pop('reranking_model', None)
116117
storage = params.pop('storage', None)
117118

118119
if isinstance(storage, str):
119120
# convert to identifier
120121
storage = Identifier(storage)
121122

122-
if isinstance(model, str):
123-
# convert to identifier
124-
model = Identifier(model)
125-
126123
if_not_exists = p.if_not_exists_or_empty
127124

128125
return CreateKnowledgeBase(
129126
name=name,
130-
model=model,
127+
embedding_model=embedding_model,
128+
reranking_model=reranking_model,
131129
storage=storage,
132130
from_select=from_query,
133131
params=params,

0 commit comments

Comments
 (0)