Fix model dropdowns - #654
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates documentation for embedding and chat model dropdowns across Python and JavaScript integrations. The changes restructure the UI from Tab-based dropdowns to Accordion-based expandable sections while standardizing the documentation format.
Key changes include:
- Converting Tab components to AccordionGroup/Accordion components for better UI organization
- Standardizing code example formats and adding consistent usage examples
- Correcting markup syntax for Card components and improving consistency across files
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/oss/python/integrations/text_embedding/index.mdx | Converts tabs to accordions, reorganizes provider table placement, adds usage examples, and fixes Card component syntax |
| src/oss/python/integrations/providers/index.mdx | Corrects markdown table column alignment syntax |
| src/oss/python/integrations/providers/all_providers.mdx | Removes incomplete Card component attribute |
| src/oss/python/integrations/chat/index.mdx | Converts tabs to accordions, updates section heading capitalization, and fixes Card component syntax |
| src/oss/javascript/integrations/text_embedding/index.mdx | Converts tabs to accordions, standardizes installation instructions, and fixes Card component syntax |
| src/oss/javascript/integrations/chat/index.mdx | Converts tabs to accordions, consolidates installation tips, and adds usage examples |
Comments suppressed due to low confidence (2)
src/oss/python/integrations/text_embedding/index.mdx:1
- The API reference link for OpenAI embeddings points to a chat model class (
ChatOpenAI) instead of the embeddings class. This should link to the OpenAI embeddings API reference.
---
src/oss/python/integrations/text_embedding/index.mdx:1
- The API reference link for Cohere embeddings points to an LLM class instead of the embeddings class. This should link to the Cohere embeddings API reference.
---
| @@ -233,9 +276,11 @@ if not os.environ.get("VOYAGE_API_KEY"): | |||
| from langchain-voyageai import VoyageAIEmbeddings | |||
There was a problem hiding this comment.
This import statement has a syntax error. It should use underscores instead of hyphens for the package name: from langchain_voyageai import VoyageAIEmbeddings
| from langchain-voyageai import VoyageAIEmbeddings | |
| from langchain_voyageai import VoyageAIEmbeddings |
|
|
||
| embeddings = OpenAIEmbeddings(model="text-embedding-3-large") | ||
|
|
||
| embeddings.embed_query("Hello, world!") |
There was a problem hiding this comment.
This line references an undefined variable embeddings. In the xAI and Perplexity sections, the code creates a model variable but then tries to use embeddings.embed_query(). This should be model.embed_query() or the variable should be named embeddings.
| | [Nomic](/oss/integrations/text_embedding/nomic) | [langchain-nomic](https://python.langchain.com/api_reference/nomic/embeddings/langchain_nomic.embeddings.NomicEmbeddings.html) | | ||
| | [Databricks](/oss/integrations/text_embedding/databricks) | [databricks-langchain](https://api-docs.databricks.com/python/databricks-ai-bridge/latest/databricks_langchain.html#databricks_langchain.DatabricksEmbeddings) | | ||
| | [IBM](/oss/integrations/text_embedding/ibm_watsonx) | [langchain-ibm](https://python.langchain.com/api_reference/ibm/embeddings/langchain_ibm.embeddings.WatsonxEmbeddings.html) | | ||
| | [NVIDIA](/oss/integrations/text_embedding/nvidia_ai_endpoints) | [langchain-nvidia](https://python.langchain.com/api_reference/nvidia_ai_endpoints/embeddings/langchain_nvidia_ai_endpoints.embeddings.NVIDIAEmbeddings.html) | |
There was a problem hiding this comment.
[nitpick] The usage example for HuggingFace embeddings is placed in a separate code block instead of being combined with the instantiation code block like other examples. This inconsistency makes the documentation harder to follow. Consider combining both code snippets into a single block for consistency.
|
Preview ID generated: preview-models-1758844980-60e691f |
Overview
Type of change
Type: [Replace with: New documentation page / Update existing documentation / Fix typo/bug/link/formatting / Remove outdated content / Other]
Related issues/PRs
Checklist
docs devsrc/docs.jsonif neededAdditional notes