Skip to content
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

core[patch]: move some attr/methods to BaseLanguageModel #18936

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

efriis
Copy link
Member

@efriis efriis commented Mar 11, 2024

Cleans up some shared code between BaseLLM and BaseChatModel. One functional difference to make it more consistent (see comment)

Copy link

vercel bot commented Mar 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Mar 11, 2024 8:41pm

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Ɑ: models Related to LLMs or chat model modules 🔌: huggingface Primarily related to HuggingFace integrations 🤖:refactor A large refactor of a feature(s) or restructuring of many files labels Mar 11, 2024
"""Metadata to add to the run trace."""

@validator("verbose", pre=True, always=True)
def set_verbose(cls, verbose: Optional[bool]) -> bool:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was inconsistent before - this used to only be on llms but not chat model. Will now have same behavior for verbose=None for both

verbose: bool = Field(default_factory=_get_verbosity)
"""Whether to print out response text."""
callbacks: Callbacks = Field(default=None, exclude=True)
"""Callbacks to add to the run trace."""
callback_manager: Optional[BaseCallbackManager] = Field(default=None, exclude=True)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left this in the two places because deprecated and didn't want to add deprecated attr to baselanguagemodel

@efriis efriis changed the title core[patch]: move some to BaseLanguageModel core[patch]: move some attr/methods to BaseLanguageModel Mar 11, 2024
@eyurtsev eyurtsev self-requested a review March 11, 2024 20:47
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Mar 11, 2024
@efriis efriis merged commit 0d888a6 into master Mar 11, 2024
95 checks passed
@efriis efriis deleted the erick/core-patch-move-some-to-baselanguagemodel branch March 11, 2024 21:59
bechbd pushed a commit to bechbd/langchain that referenced this pull request Mar 29, 2024
…i#18936)

Cleans up some shared code between `BaseLLM` and `BaseChatModel`. One
functional difference to make it more consistent (see comment)
gkorland pushed a commit to FalkorDB/langchain that referenced this pull request Mar 30, 2024
…i#18936)

Cleans up some shared code between `BaseLLM` and `BaseChatModel`. One
functional difference to make it more consistent (see comment)
hinthornw pushed a commit that referenced this pull request Apr 26, 2024
Cleans up some shared code between `BaseLLM` and `BaseChatModel`. One
functional difference to make it more consistent (see comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔌: huggingface Primarily related to HuggingFace integrations lgtm PR looks good. Use to confirm that a PR is ready for merging. Ɑ: models Related to LLMs or chat model modules 🤖:refactor A large refactor of a feature(s) or restructuring of many files size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants