-
Notifications
You must be signed in to change notification settings - Fork 15k
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
Standardize ChatModel docstrings and integration docs #22296
Labels
🤖:docs
Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder
documentation
Improvements or additions to documentation
help wanted
Good issue for contributors
integration-docs
Comments
baskaryan
added
documentation
Improvements or additions to documentation
help wanted
Good issue for contributors
labels
May 29, 2024
dosubot
bot
added
🔌: openai
Primarily related to OpenAI integrations
🤖:docs
Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder
labels
May 29, 2024
hi @baskaryan, i'm interested in this. where would I find more info for the fields in Doc pages that aren't autopopulated? |
Hi @chaityacshah, I am interested to contribute to this issue. I am doing open source contribution for the first time. Can we both together take up this task ? |
baskaryan
added a commit
that referenced
this issue
Jun 4, 2024
Related to #22296 And update anthropic to accept base_url
This was referenced Jun 7, 2024
This was referenced Jun 8, 2024
baskaryan
added a commit
that referenced
this issue
Jun 10, 2024
Part of #22296. Part two of langchain-ai/langchain-google#287
baskaryan
added a commit
that referenced
this issue
Jun 10, 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]>
baskaryan
added a commit
that referenced
this issue
Jun 14, 2024
Updated ChatGroq doc string as per issue https://github.com/langchain-ai/langchain/issues/22296:"langchain_groq: updated docstring for ChatGroq in langchain_groq 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 the ChatGroq model. In particular, this PR updates the docstring for langchain/libs/partners/groq/langchain_groq/chat_model.py by adding the following sections: Instantiate, Invoke, Stream, Async, Tool calling, Structured Output, and Response metadata. I used the template from the Anthropic implementation and referenced the Appendix of the original issue post. I also noted that: `usage_metadata `returns none for all ChatGroq models I tested; there is no mention of image input in the ChatGroq documentation; unlike that of ChatHuggingFace, `.stream(messages)` for ChatGroq returned blocks of output. --------- Co-authored-by: lucast2021 <[email protected]> Co-authored-by: Bagatur <[email protected]>
ccurme
pushed a commit
that referenced
this issue
Jun 15, 2024
- **Description:** Update ZhipuAI ChatModel rich docstring - **Issue:** the issue #22296
hinthornw
pushed a commit
that referenced
this issue
Jun 20, 2024
Related to #22296 And update anthropic to accept base_url
hinthornw
pushed a commit
that referenced
this issue
Jun 20, 2024
Part of #22296. Part two of langchain-ai/langchain-google#287
hinthornw
pushed a commit
that referenced
this issue
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]>
hinthornw
pushed a commit
that referenced
this issue
Jun 20, 2024
Updated ChatGroq doc string as per issue https://github.com/langchain-ai/langchain/issues/22296:"langchain_groq: updated docstring for ChatGroq in langchain_groq 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 the ChatGroq model. In particular, this PR updates the docstring for langchain/libs/partners/groq/langchain_groq/chat_model.py by adding the following sections: Instantiate, Invoke, Stream, Async, Tool calling, Structured Output, and Response metadata. I used the template from the Anthropic implementation and referenced the Appendix of the original issue post. I also noted that: `usage_metadata `returns none for all ChatGroq models I tested; there is no mention of image input in the ChatGroq documentation; unlike that of ChatHuggingFace, `.stream(messages)` for ChatGroq returned blocks of output. --------- Co-authored-by: lucast2021 <[email protected]> Co-authored-by: Bagatur <[email protected]>
hinthornw
pushed a commit
that referenced
this issue
Jun 20, 2024
- **Description:** Update ZhipuAI ChatModel rich docstring - **Issue:** the issue #22296
This was referenced Jun 23, 2024
ccurme
pushed a commit
that referenced
this issue
Jun 24, 2024
- **Description:** Update QianfanChatEndpoint ChatModel rich docstring - **Issue:** the issue #22296
Josephasafg
pushed a commit
to joshc-ai21/langchain
that referenced
this issue
Jun 25, 2024
) - **Description:** Update QianfanChatEndpoint ChatModel rich docstring - **Issue:** the issue langchain-ai#22296
baskaryan
added a commit
that referenced
this issue
Jul 1, 2024
This was referenced Jul 2, 2024
baskaryan
added a commit
that referenced
this issue
Jul 2, 2024
baskaryan
added a commit
that referenced
this issue
Jul 2, 2024
mandos21
pushed a commit
to mandos21/langchain
that referenced
this issue
Jul 8, 2024
) - **Description:** Update QianfanChatEndpoint ChatModel rich docstring - **Issue:** the issue langchain-ai#22296
eyurtsev
pushed a commit
that referenced
this issue
Jul 11, 2024
- **Description:** Add MiniMaxChat rich docstrings. - **Issue:** the issue #22296
ccurme
pushed a commit
that referenced
this issue
Jul 17, 2024
- **Description:** Add ChatBaichuan rich docstrings. - **Issue:** the issue #22296
baskaryan
pushed a commit
that referenced
this issue
Jul 20, 2024
- **Description:** - Add `ChatSparkLLM` docstrings, the issue #22296 - To support `stream` method
This was referenced Jul 24, 2024
isahers1
added a commit
that referenced
this issue
Jul 25, 2024
Part of #22296 --------- Co-authored-by: isaac hershenson <[email protected]>
isahers1
added a commit
that referenced
this issue
Jul 25, 2024
part of #22296 --------- Co-authored-by: isaac hershenson <[email protected]>
olgamurraft
pushed a commit
to olgamurraft/langchain
that referenced
this issue
Aug 16, 2024
- **Description:** - Add `ChatSparkLLM` docstrings, the issue langchain-ai#22296 - To support `stream` method
olgamurraft
pushed a commit
to olgamurraft/langchain
that referenced
this issue
Aug 16, 2024
Part of langchain-ai#22296 --------- Co-authored-by: isaac hershenson <[email protected]>
olgamurraft
pushed a commit
to olgamurraft/langchain
that referenced
this issue
Aug 16, 2024
part of langchain-ai#22296 --------- Co-authored-by: isaac hershenson <[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
documentation
Improvements or additions to documentation
help wanted
Good issue for contributors
integration-docs
Issue
To make our chat model integrations as easy to use as possible we need to make sure the docs for them are thorough and standardized. There are two parts to this: updating the chat model docstrings and updating the actual integration docs.
This needs to be done for each ChatModel integration, ideally with one PR per ChatModel.
Related to broader issues #21983 and #22005.
Docstrings
Each ChatModel class docstring should have the sections shown in the Appendix below. The sections should have input and output code blocks when relevant. See ChatOpenAI docstrings and corresponding API reference for an example.
To build a preview of the API docs for the package you're working on run (from root of repo):
make api_docs_clean; make api_docs_quick_preview API_PKG=openai
where
API_PKG=
should be the parent directory that houses the edited package (e.g. community, openai, anthropic, huggingface, together, mistralai, groq, fireworks, etc.). This should be quite fast for all the partner packages.Doc pages
Each ChatModel docs page should follow this template. See ChatOpenAI for an example.
You can use the
langchain-cli
to quickly get started with a new chat model integration docs page (run from root of repo):poetry run pip install -e libs/cli poetry run langchain-cli integration create-doc --name "foo-bar" --name-class FooBar --destination-dir ./docs/docs/integrations/chat/
where
--name
is the integration package name without the "langchain-" prefix and--name-class
is the class name without the "Chat" prefix. This will create a template doc with some autopopulated fields at docs/docs/integrations/chat/foo_bar.ipynb.To build a preview of the docs you can run (from root):
make docs_clean make docs_build cd docs/build/output-new yarn yarn start
Appendix
Expected sections for the ChatModel class docstring.
The text was updated successfully, but these errors were encountered: