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

docs: standardize ChatHuggingFace #22693

Merged
merged 9 commits into from
Jun 10, 2024

Conversation

lucas-tucker
Copy link
Contributor

@lucas-tucker lucas-tucker commented Jun 8, 2024

Updated ChatHuggingFace doc string as per issue #22296: "langchain_huggingface: updated docstring for ChatHuggingFace in langchain_huggingface to match that of the description (in the appendix) provided in issue #22296. "

Issue: This PR is in response to issue #22296, and more specifically ChatHuggingFace model. In particular, this PR updates the docstring for langchain/libs/partners/hugging_face/langchain_huggingface/chat_models/huggingface.py by adding the following sections: Instantiate, Invoke, Stream, Async, Tool calling, and Response metadata. I used the template from the Anthropic implementation and referenced the Appendix of the original issue post. I also noted that: langchain_community hugging face llms do not work with langchain_huggingface's ChatHuggingFace model (at least for me); the .stream(messages) functionality of ChatHuggingFace only returned a block of response.

@efriis efriis added the partner label Jun 8, 2024
Copy link

vercel bot commented Jun 8, 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 Jun 10, 2024 8:50pm

@efriis efriis self-assigned this Jun 8, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder labels Jun 8, 2024
@lucas-tucker lucas-tucker changed the title Updated ChatHuggingFace doc as per issue #22296 Updated ChatHuggingFace docstring as per issue #22296 Jun 8, 2024
@lucas-tucker lucas-tucker changed the title Updated ChatHuggingFace docstring as per issue #22296 docs: standardize ChatHuggingFace Jun 8, 2024
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jun 10, 2024
@eyurtsev
Copy link
Collaborator

Thank you!

@eyurtsev eyurtsev enabled auto-merge (squash) June 10, 2024 15:19
auto-merge was automatically disabled June 10, 2024 16:09

Head branch was pushed to by a user without write access

Comment on lines 184 to 185
model_id: Optional[str]
system_message: SystemMessage
Copy link
Collaborator

Choose a reason for hiding this comment

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

these are completion params (as in they affect the content of whats generated)

@baskaryan baskaryan enabled auto-merge (squash) June 10, 2024 20:50
@baskaryan baskaryan merged commit cb79e80 into langchain-ai:master Jun 10, 2024
21 checks passed
hinthornw pushed a commit that referenced this pull request Jun 20, 2024
**Updated ChatHuggingFace doc string as per issue #22296**:
"langchain_huggingface: updated docstring for ChatHuggingFace in
langchain_huggingface to match that of the description (in the appendix)
provided in issue #22296. "

**Issue:** This PR is in response to issue #22296, and more specifically
ChatHuggingFace model. In particular, this PR updates the docstring for
langchain/libs/partners/hugging_face/langchain_huggingface/chat_models/huggingface.py
by adding the following sections: Instantiate, Invoke, Stream, Async,
Tool calling, and Response metadata. I used the template from the
Anthropic implementation and referenced the Appendix of the original
issue post. I also noted that: langchain_community hugging face llms do
not work with langchain_huggingface's ChatHuggingFace model (at least
for me); the .stream(messages) functionality of ChatHuggingFace only
returned a block of response.

---------

Co-authored-by: lucast2021 <[email protected]>
Co-authored-by: Bagatur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder lgtm PR looks good. Use to confirm that a PR is ready for merging. partner size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants