delayedkarma/langchain-issues huggingface dataset:
MiniMaxChat：AttributeError: 'str' object has no attribute 'generations'
Labels: name: auto:bug, name: area: models

### System Info

Macos

### Who can help?

_No response_

### Information

- [X] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [X] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

```python
# -*- coding: utf-8 -*-
from langchain.chat_models import MiniMaxChat
from langchain.schema import HumanMessage


if __name__ == "__main__":
    minimax = MiniMaxChat(
        model="abab5.5-chat",
        minimax_api_key="****",
        minimax_group_id="***",
    )

    resp = minimax(
        [
            HumanMessage(content="hello"),
        ]
    )
    print(resp)

```

error info
```base
Traceback (most recent call last):
  File "***", line 17, in <module>
    resp = minimax(
  File "/opt/homebrew/Caskroom/miniconda/base/envs/langchain/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 634, in __call__
    generation = self.generate(
  File "/opt/homebrew/Caskroom/miniconda/base/envs/langchain/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 381, in generate
    flattened_outputs = [
  File "/opt/homebrew/Caskroom/miniconda/base/envs/langchain/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 382, in <listcomp>
    LLMResult(generations=[res.generations], llm_output=res.llm_output)
AttributeError: 'str' object has no attribute 'generations'
```



### Expected behavior

no error
Implement stream and astream for RunnableLambda
Labels: name: auto:improvement, name: area: models, name: size:L

**Description:** Implement stream and astream methods for RunnableLambda to make streaming work for functions returning Runnable
  - **Issue:** https://github.com/langchain-ai/langchain/issues/11998
  - **Dependencies:** No new dependencies
  - **Twitter handle:** https://twitter.com/qtangs
Upgrades the Tongyi LLM and ChatTongyi Model
Labels: name: auto:improvement, name: area: models, name: size:XL

 - **Description:** fixes and upgrades for the Tongyi LLM and ChatTongyi Model
      - Fixed typos; it should be `Tongyi`, not `OpenAI`.
      - Fixed a bug in `stream_generate_with_retry`; it's a real stream generator now.
      - Fixed a bug in `validate_environment`; the `dashscope_api_key` should be properly handled when set by environment variables or initialization parameters.
      - Changed the `dashscope` response to incremental output by setting the parameter `incremental_output`, which eliminates the need for the prefix-removal trick.
      - Removed some unused parameters, like `n`, `prefix_messages`.
      - Added `_stream` method.
      - Added async methods support, such as `_astream`, `_agenerate`, `_abatch`.
  - **Dependencies:** No new dependencies.
  - **Tag maintainer:** @hwchase17 

> PS: Some may be confused about the terms `dashscope`, `tongyi`, and `Qwen`:
> - `dashscope`: A platform to deploy LLMs and provide APIs to invoke the LLM.
> - `tongyi`: A brand name or overall term about Alibaba Cloud's LLM/AI.
> - `Qwen`: An LLM that is open-sourced and deployed in `dashscope`.
> 
> We use the `dashscope` SDK to interact with the `tongyi`-`Qwen` LLM.
Issue: how to fetch sub url using langchain
Labels: name: area: embeddings, name: auto:bug

### Issue you'd like to raise.


below is my code
with sync_playwright() as p:
browser = p.chromium.launch()
navigate_tool = NavigateTool(sync_browser=browser)
extract_hyperlinks_tool = ExtractHyperlinksTool(sync_browser=browser)
for url in urls:
print(url,"url is ----------------------")
navigate_tool._arun(url)
print(navigate_tool._arun(url))
hyperlinks = extract_hyperlinks_tool._arun()
for link in hyperlinks:
print(link,"link is ------------------------------------------")

and i am getting these error
<coroutine object NavigateTool._arun at 0x7f0ab738f0c0>
/home/hs/CustomBot/accounts/common_langcain_qa.py:122: RuntimeWarning: coroutine 'NavigateTool._arun' was never awaited
print(navigate_tool._arun(url))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Internal Server Error: /create-project/
Traceback (most recent call last):
File "/home/hs/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/hs/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/hs/env/lib/python3.8/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
File "/home/hs/env/lib/python3.8/site-packages/django/views/generic/base.py", line 101, in dispatch
return handler(request, *args, **kwargs)
File "/home/hs/CustomBot/user_projects/views.py", line 1776, in post
file_crawl_status, file_index_status = generate_embeddings(
File "/home/hs/CustomBot/accounts/common_langcain_qa.py", line 124, in generate_embeddings
for link in hyperlinks:

TypeError: 'coroutine' object is not iterable
[16/Dec/2023 15:59:50] "POST /create-project/ HTTP/1.1" 500 89444
/usr/lib/python3.8/pathlib.py:755: RuntimeWarning: coroutine 'ExtractHyperlinksTool._arun' was never awaited
return self._cached_cparts
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

### Suggestion:

_No response_
Google Drive Loader: Modify docs to always set the env var
Labels: name: area: doc loader, name: auto:documentation, name: size:XS

  - **Description:**  Code written by following, the official documentation of [Google Drive Loader](https://python.langchain.com/docs/integrations/document_loaders/google_drive), gives errors. I have opened an issue regarding this. See #14725. This is a pull request for modifying the documentation to use an approach that makes the code work. Basically, the change is that we need to always set the GOOGLE_APPLICATION_CREDENTIALS env var to an emtpy string, rather than only in case of RefreshError. Also, rewrote 2 paragraphs to make the instructions more clear.
  - **Issue:** See this related [issue # 14725](https://github.com/langchain-ai/langchain/issues/14725)
  - **Dependencies:** NA
  - **Tag maintainer:** @baskaryan
  - **Twitter handle:** NA
fix(14534): make the azure vectorsearch compatible with latest stable release 11.4
Labels: name: area: vector store, name: auto:improvement, name: size:M

  - **Description:** This fix solves the issue of being compatible with the latest stable version azure search documents 11.4. 
  - **Issue:** 14534
  - **Dependencies:** none
  - **Tag maintainer:** none
  - **Twitter handle:** none
add png support for vertexai._parse_chat_history_gemini()
Labels: name: lgtm, name: auto:improvement, name: area: models, name: size:S

  - **Description:** Modify community chat model vertexai to handle png and other image types encoded in base64
  - **Dependencies:** added `import re` but no new dependencies.

This addresses a problem where the vertexai method _parse_chat_history_gemini() was only recognizing image uris in jpeg format. I made a simple change to cover other extension types.
feat: new integration `wasm_chat`
Labels: name: lgtm, name: auto:enhancement, name: area: models, name: size:L

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
  - **Tag maintainer:** for a quicker response, tag the relevant maintainer (see below),
  - **Twitter handle:** we announce bigger features on Twitter. If your PR gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: 
https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md

If you're adding a new integration, please include:
  1. a test for the integration, preferably unit tests that do not rely on network access,
  2. an example notebook showing its use. It lives in `docs/extras` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->

Adds `WasmChat` integration. `WasmChat` runs GGUF models locally or via chat service in lightweight and secure WebAssembly containers. In this PR, `WasmChatService` is introduced as the first step of the integration. `WasmChatService` is driven by [llama-api-server](https://github.com/second-state/llama-utils) and [WasmEdge Runtime](https://wasmedge.org/).
infra: cut down on integration steps
Labels: name: lgtm, name: area: doc loader, name: auto:improvement, name: size:M

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
  - **Tag maintainer:** for a quicker response, tag the relevant maintainer (see below),
  - **Twitter handle:** we announce bigger features on Twitter. If your PR gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: 
https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md

If you're adding a new integration, please include:
  1. a test for the integration, preferably unit tests that do not rely on network access,
  2. an example notebook showing its use. It lives in `docs/extras` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->
Generalized streaming control stop_sequences
Labels: name: auto:enhancement, name: area: models, name: size:L

- **Description:** 
Introduces `StopSequenceAwareStreamer` that enhances streaming control by allowing end users to specify arbitrary stop sequences spanning multiple tokens, without knowledge of the tokenizer. This generalizes current functionality, adding capabilities without changing API. End users' current implementations will work the same while allowing longer stop sequences.
- **Issue:** -
- **Dependencies:** None
- **Twitter handle:** https://twitter.com/TheRealABook

Happy Friday <:)
This is still a draft in the sense that I would welcome your thoughts on: 1) where this logic would best be centralized. 2) which LLMs that we want to implement this for.
I've tested this out locally but will happily add unit tests for the components once we firm up the above two points!
docs `google drive` update
Labels: name: lgtm, name: area: doc loader, name: auto:documentation, name: size:L

The [Google Drive toolkit](https://python.langchain.com/docs/integrations/toolkits/google_drive) page is a duplicate of the [Google Drive tool](https://python.langchain.com/docs/integrations/tools/google_drive) page.
- Removed the `Google Drive toolkit` page (it shouldn't be a toolkit but tool)
- Removed the correspondent reference in the Google platform page
- Redirected the removed page to the tool page.
[Documentation] Minor documentation prior to NVIDIA Integration announcement
Labels: name: lgtm, name: area: embeddings, name: auto:documentation, name: size:L

  - **Description:** Modification of descriptions for marketing purposes and transitioning towards `platforms` directory if possible. 
  - **Issue:** Some marketing opportunities, lodging PR and awaiting later discussions. 
  - 

This PR is intended to be merged when decisions settle/hopefully after further considerations. Submitting as Draft for now. Nobody @'d yet.
ParentDocumentRetriever does not have any save to local option
Labels: name: area: vector store, name: auto:improvement

### System Info

Hi,
I am trying to save the ParentDocumentRetriever after adding documents data to it. Since there a lot of documents that needs to be added, its not possible to do it every time. I tried saving via pickle but got the error: TypeError: cannot pickle 'sqlite3.Connection' object


Is there any way to save the retreiver and load it at the inference time?

### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

retriever = ParentDocumentRetriever(
    vectorstore=vectorstore,
    docstore=store,
    child_splitter=child_splitter,
    parent_splitter=parent_splitter,
    search_kwargs={"k": 3}
)

retriever.add_documents(docs, ids=None)
import pickle
with open('ParentDocumentRetriever.pkl', 'wb') as f:
    pickle.dump(retriever, f, protocol = pickle.HIGHEST_PROTOCOL)

### Expected behavior

Provide a save to local option for the retreiver with added data
docs redundant pages
Labels: name: lgtm, name: area: doc loader, name: auto:documentation, name: integration: aws, name: size:M

[ScaNN](https://python.langchain.com/docs/integrations/providers/scann) and [DynamoDB](https://python.langchain.com/docs/integrations/platforms/aws#aws-dynamodb) pages in `providers` are redundant because we have those references in the Google and AWS platform pages. It is confusing.
- I removed unnecessary pages, redirected files to new nams;
Update YandexGPT API
Labels: name: auto:improvement, name: area: models, name: size:L

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
  - **Tag maintainer:** for a quicker response, tag the relevant maintainer (see below),
  - **Twitter handle:** we announce bigger features on Twitter. If your PR gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: 
https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md

If you're adding a new integration, please include:
  1. a test for the integration, preferably unit tests that do not rely on network access,
  2. an example notebook showing its use. It lives in `docs/extras` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->
Update LLMand Chat model to use new api version
docs `alibaba cloud`
Labels: name: lgtm, name: area: vector store, name: auto:documentation, name: size:L

The [provider page](https://python.langchain.com/docs/integrations/providers/alibabacloud_opensearch) holds the vector store information. The [Chat example](https://python.langchain.com/docs/integrations/chat/pai_eas_chat_endpoint) was incorrectly sorted in the navbar because of the wrong file name.
- Recreated a provide page
- Added missed links and descriptions
- Compound information about vector store from two pages into one
- Fixed file name
[Documentation] Updates to NVIDIA Playground/Foundation Model naming.…
Labels: name: auto:documentation, name: area: models, name: size:XL

…  (#14723)

- **Description:** Minor updates per marketing requests. Namely, name decisions (AI Foundation Models / AI Playground)
  - **Tag maintainer:** @hinthornw 

Do want to pass around the PR for a bit and ask a few more marketing questions before merge, but just want to make sure I'm not working in a vacuum. No major changes to code functionality intended; the PR should be for documentation and only minor tweaks.

Note: QA model is a bit borked across staging/prod right now. Relevant teams have been informed and are looking into it, and I'm placeholdered the response to that of a working version in the notebook.

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
  - **Tag maintainer:** for a quicker response, tag the relevant maintainer (see below),
  - **Twitter handle:** we announce bigger features on Twitter. If your PR gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: 
https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md

If you're adding a new integration, please include:
  1. a test for the integration, preferably unit tests that do not rely on network access,
  2. an example notebook showing its use. It lives in `docs/extras` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->
feat: Add `task_type` and `auto_truncate` to `VertexAIEmbeddings`
Labels: name: area: embeddings, name: auto:improvement, name: size:S

- Added `task_type` and `auto_truncate` fields to `VertexAIEmbeddings`.
- https://cloud.google.com/python/docs/reference/aiplatform/latest/vertexai.language_models.TextEmbeddingInput

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
  - **Tag maintainer:** for a quicker response, tag the relevant maintainer (see below),
  - **Twitter handle:** we announce bigger features on Twitter. If your PR gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: 
https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md

If you're adding a new integration, please include:
  1. a test for the integration, preferably unit tests that do not rely on network access,
  2. an example notebook showing its use. It lives in `docs/extras` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->
[DEV] Update import paths for StrOutputParser and RunnablePassthrough
Labels: name: auto:refactor, name: size:M

- Changed import paths:
  - From 'langchain_core.output_parsers' to 'langchain.schema' for StrOutputParser.
  - From 'langchain_core.runnables' to 'langchain.schema.runnable' for RunnablePassthrough.

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** Updates import paths StrOutputParser and RunnablePassthrough
  - **Issue:** related to  #14287


Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally.

 -->
Add YandexGPT embeddings
Labels: name: area: embeddings, name: auto:enhancement, name: size:L

  - **Description:** Introducing an ability to work with the [YandexGPT](https://cloud.yandex.com/en/services/yandexgpt) embeddings models.
<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
  - **Tag maintainer:** for a quicker response, tag the relevant maintainer (see below),
  - **Twitter handle:** we announce bigger features on Twitter. If your PR gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: 
https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md

If you're adding a new integration, please include:
  1. a test for the integration, preferably unit tests that do not rely on network access,
  2. an example notebook showing its use. It lives in `docs/extras` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->
Add safe lookup to OpenAI response adapter
Labels: name: lgtm, name: auto:bug, name: area: models, name: size:S

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
  - **Tag maintainer:** for a quicker response, tag the relevant maintainer (see below),
  - **Twitter handle:** we announce bigger features on Twitter. If your PR gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: 
https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md

If you're adding a new integration, please include:
  1. a test for the integration, preferably unit tests that do not rely on network access,
  2. an example notebook showing its use. It lives in `docs/extras` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->
## Description
Similar to https://github.com/langchain-ai/langchain/issues/5861, I've experienced `KeyError`s resulting from unsafe lookups in the `convert_dict_to_message` function in [this file](https://github.com/langchain-ai/langchain/blob/master/libs/community/langchain_community/adapters/openai.py). While that issue focused on `KeyError 'content'`, I've opened another issue (#14764) about how the problem still exists in the same function but with `KeyError 'role'`. The fix for #5861 only added a safe lookup to the specific line that was giving them trouble.. This PR fixes the unsafe lookup in the rest of the function but the problem still exists across the repo.

## Issues
* #14764
* #5861 

## Dependencies
* None

## Checklist
[x] make format
[x] make lint
[ ] make test - Results in `make: *** No rule to make target 'test'.  Stop.`

## Maintainers
* @hinthornw