-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardized model init arg names #20085
Comments
Do we need to refactor every llm? |
Ideally yes but we can do so incrementally, doesn't need to be all at once |
I see. |
Do you think it's worth to set the above names as the actual attribute name (and have an alias for the current one)? eg., for OpenAI we have
which could be changed to
This will bring a common look and feel to the API references since sphinx(I think) arranges them in alphabetical order. |
Also perhaps Cohere
Anthropic
OpenAI
|
We need to be compatible, we try not to modify the original code. |
issue with this is it's a breaking change (unless we add some extra explicit properties) since the field name is the actual attribute by which the param is accessible. so if you switched eg openai then |
yes, you're right, should've put in some more thought |
- **Description:** Standardize QianfanEmbeddingsEndpoint, include: - docstrings, the issue langchain-ai#21983 - model init arg names, the issue langchain-ai#20085
- **Description:** Standardize MiniMaxEmbeddings - docs, the issue langchain-ai#24856 - model init arg names, the issue langchain-ai#20085
- **Description:** Standardize Tongyi LLM,include: - docs, the issue langchain-ai#24803 - model init arg names, the issue langchain-ai#20085
- **Description:** Standardize QianfanLLMEndpoint LLM,include: - docs, the issue langchain-ai#24803 - model init arg names, the issue langchain-ai#20085
- **Description:** Standardize SparkLLM, include: - docs, the issue langchain-ai#24803 - to support stream - update api url - model init arg names, the issue langchain-ai#20085
updated stop and request_timeout so they aliased to stop_sequences, and timeout respectively. Added test that both continue to set the same underlying attributes. Related to [20085](#20085) Co-authored-by: ccurme <chester.curme@gmail.com>
Thank you for contributing to LangChain! community:premai[patch]: standardize init args - updated `temperature` with Pydantic Field, updated the unit test. - updated `max_tokens` with Pydantic Field, updated the unit test. - updated `max_retries` with Pydantic Field, updated the unit test. Related to #20085 --------- Co-authored-by: Isaac Francisco <78627776+isahers1@users.noreply.github.com> Co-authored-by: ccurme <chester.curme@gmail.com>
per langchain-ai/langchain#20085 --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
Hi, @baskaryan. I'm Dosu, and I'm helping the LangChain team manage their backlog. I'm marking this issue as stale. Issue Summary:
Next Steps:
Thank you for your understanding and contribution! |
Privileged issue
Issue Content
There's some discrepancies in the init args different models use to set the same params. It'd be a much nicer UX if common params could be set with a common set of init args
Suggesting that if a param in this list is present in a model integration, the below name should either be the actual attribute name or an init arg that can be used to set the attribute:
Importantly we should also use the above init args in the docs
The text was updated successfully, but these errors were encountered: