Skip to content

Commit

Permalink
Merge pull request #75 from iQuxLE/dimension_correction_search_duckdb
Browse files Browse the repository at this point in the history
Prevent dimension errors in search via duckdb
  • Loading branch information
caufieldjh authored Aug 29, 2024
2 parents 9e967e3 + 620d672 commit 4475f64
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/curate_gpt/store/duckdb_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,10 +1029,9 @@ def _parse_where_clause(where: Dict[str, Any]) -> str:
return " AND ".join(conditions)

def _get_embedding_dimension(self, model_name: str) -> int:
if model_name is None:
if model_name is None or model_name.startswith(self.default_model):
return DEFAULT_MODEL[self.default_model]
if isinstance(model_name, str):
logger.info("somehow here")
if model_name.startswith("openai:"):
model_key = model_name.split("openai:", 1)[1]
model_info = MODEL_MAP.get(model_key, DEFAULT_OPENAI_MODEL)
Expand Down

0 comments on commit 4475f64

Please sign in to comment.