Skip to content

Commit

Permalink
bug fix for openai embedding model
Browse files Browse the repository at this point in the history
  • Loading branch information
krohling committed Dec 15, 2023
1 parent 77ea942 commit 961278f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bondai/models/openai/openai_embedding_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(
model: OpenAIModelNames = OpenAIModelNames.TEXT_EMBEDDING_ADA_002,
connection_params: Dict = None,
):
self._model = model.value
self._model = model.value if isinstance(model, OpenAIModelNames) else model
self._connection_params = connection_params
if ModelConfig[self._model]["model_type"] != OpenAIModelType.EMBEDDING:
raise Exception(f"Model {model} is not an embedding model.")
Expand Down

0 comments on commit 961278f

Please sign in to comment.