Ensure consistent naming for model initialization methods #29522
Florian-crg
announced in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
The current method to abstract chat models is named
init_chat_model
. I would have expected a similar naming pattern for the method to abstract embedding models. However, in its beta version, it's calledinit_embeddings
instead ofinit_embeddings_model
.Would it make sense to align the naming for consistency?
Motivation
The methods
init_chat_model
andinit_embeddings
serve a similar purpose: initializing models for chat and embeddings, respectively. However, their naming is inconsistent. The chat model function follows the patterninit_<type>_model
, while the embeddings function omits_model
.Given their structural similarity, this inconsistency can be confusing for users who expect a uniform API. Renaming
init_embeddings
toinit_embeddings_model
would improve clarity, enhance discoverability, and create a more predictable experience for developers using LangChain.Proposal (If applicable)
Renaming the
init_embeddings
toinit_embeddings_model
.Beta Was this translation helpful? Give feedback.
All reactions