jeff3071 commented on code in PR #72002:
URL: https://github.com/apache/airflow/pull/72002#discussion_r3986393226


##########
providers/common/ai/src/airflow/providers/common/ai/hooks/llamaindex.py:
##########
@@ -179,7 +185,12 @@ def get_embedding_model(self) -> BaseEmbedding:
             extra_key="embed_model",
             kind="embedding",
         )
-        return OpenAIEmbedding(model=model_id, **self._connection_kwargs(conn))
+        connection_kwargs = self._connection_kwargs(conn)
+        overridden_keys = sorted(self.embedding_kwargs.keys() & 
connection_kwargs.keys())
+        if overridden_keys:
+            self.log.warning("Connection parameters override embedding_kwargs 
values: %s", overridden_keys)
+        kwargs = {**self.embedding_kwargs, **connection_kwargs}
+        return OpenAIEmbedding(model=model_id, **kwargs)

Review Comment:
   Add the warning message about upsupported keys in llamaindex and 
corresponding test. And document the real param name (credentials -> `api_key`, 
base URL->`api_base`, `base_url`)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to