delayedkarma/langchain-issues huggingface dataset:
using YahooFinanceNewsTool() results to KeyError: 'description'
Labels: name: auto:bug

### System Info

Langchain Version: 0.0.354 (also tried with 0.1.0)
Python version: 3.9.18
yfinance version: 0.2.35
OS: Windows 10

### Who can help?

@hwchase17 , @agola11

### Information

- [X] 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
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [X] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

Just exectuing the bottom of this page (the tool soley): https://python.langchain.com/docs/integrations/tools/yahoo_finance_news

**Returned this error (see):**
from langchain.tools.yahoo_finance_news import YahooFinanceNewsTool
tool = YahooFinanceNewsTool()
res = tool.run("AAPL")
print(res)

updating langchain to newest version didnt change anything for me.

Im also using a poetry installed file with a clean fresh enviroment, same error. 

### Expected behavior

To do exactly whats written in the docs and to not drop an error
DOC: Integration  re-direct to github page not found 
Labels: name: area: memory, name: auto:bug, name: integration: redis

### Issue with current documentation:

When clicking on redis and then when trying to re-direct to github for seeing the implementation that page is not found 
from this [integration's page](https://integrations.langchain.com/memory)
![image](https://github.com/langchain-ai/langchain/assets/30804112/63aa066b-6a22-4697-9ebf-ff01df7bd9e5)

Error :
![image](https://github.com/langchain-ai/langchain/assets/30804112/d2d59f0d-fae6-487a-a4d3-4ca80564f102)


### Idea or request for content:

i would like to know the place where this has been implemented to fix the issue and raise an PR 
Happy to help the community
Creating a conversation agent with tools and history for Ollama
Labels: name: auto:bug, name: area: models

I'm trying to create a simple test that can:
- use Ollama as the model
- use the agent with my custom tools to enrich the output
- history to store the conversation history

Based on examples, the code should look like this:

```
const llm = new ChatOllama(...);
const tools = [...];
const executor = await initializeAgentExecutorWithOptions(tools, llm, ...);
```

the compiler does not like `llm` parameter because
```
Argument of type 'ChatOllama' is not assignable to parameter of type 'BaseLanguageModelInterface<any, BaseLanguageModelCallOptions>'
```
and this is the same for OpenAI llm as well.
I don't see this `BaseLanguageModelCallOptions` interface being used anywhere in the code. Is this the right way to use it?
Issue: how to resolve this warning "My code has a warning "D:\anaconda3\envs\py311\Lib\site-packages\langchain\__init__.py:34: UserWarning: Importing verbose from langchain root module is no longer supported. Please use langchain.globals.set_verbose() / langchain.globals.get_verbose() instead. warnings.warn(""
Labels: name: auto:bug

### Issue you'd like to raise.

I have a warning when I run my langchain code "how to resolve this warning "My code has a warning "D:\anaconda3\envs\py311\Lib\site-packages\langchain\__init__.py:34: UserWarning: Importing verbose from langchain root module is no longer supported. Please use langchain.globals.set_verbose() / langchain.globals.get_verbose() instead. warnings.warn(", how to resolve it?

### Suggestion:

_No response_
Issue: My code has a warning "D:\anaconda3\envs\py311\Lib\site-packages\langchain\__init__.py:34: UserWarning: Importing verbose from langchain root module is no longer supported. Please use langchain.globals.set_verbose() / langchain.globals.get_verbose() instead.   warnings.warn("
Labels: name: auto:bug

### Issue you'd like to raise.

I had no issues running the langchain code before, but when I moved the callback_handler position, this warning appeared: "D:\anaconda3\envs\py311\Lib\site-packages\langchain\__init__.py:34: UserWarning: Importing verbose from langchain root module is no longer supported. Please use langchain.globals.set_verbose() / langchain.globals.get_verbose() instead.   warnings.warn(" 

### Suggestion:

_No response_
Broken imports
Labels: name: auto:bug

### System Info

Using...

langchain==0.0.353
langchain-core==0.1.4

Seems to have broken from yesterday's merges?
```
from langchain.chains.combine_documents.stuff import StuffDocumentsChain
--
2319 | File "/root/.local/lib/python3.9/site-packages/langchain/chains/__init__.py", line 56, in <module>
2320 | from langchain.chains.openai_functions import (
2321 | File "/root/.local/lib/python3.9/site-packages/langchain/chains/openai_functions/__init__.py", line 1, in <module>
2322 | from langchain.chains.openai_functions.base import (
2323 | File "/root/.local/lib/python3.9/site-packages/langchain/chains/openai_functions/base.py", line 32, in <module>
2324 | from langchain.utils.openai_functions import convert_pydantic_to_openai_function
2325 | File "/root/.local/lib/python3.9/site-packages/langchain/utils/openai_functions.py", line 1, in <module>
2326 | from langchain_community.utils.openai_functions import (
2327 | File "/root/.local/lib/python3.9/site-packages/langchain_community/utils/openai_functions.py", line 3, in <module>
2328 | from langchain_core.utils.function_calling import (
2329 | ModuleNotFoundError: No module named 'langchain_core.utils.function_calling'
```

### 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
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [x] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

It's triggered, in our case, when we import `StuffDocumentsChain`

from langchain.chains.combine_documents.stuff import StuffDocumentsChain

### Expected behavior

No error!
community: Replaced hardcoded "metadata" with FIELDS_METADATA variable in semantic_hybrid_search_with_score_and_rerank
Labels: name: lgtm, name: area: vector store, name: auto:bug, name: size:XS

 - **Description:** This PR is to fix a bug in semantic_hybrid_search_with_score_and_rerank() function in langchain_community/vectorstores/azuresearch.py. The hardcoded "metadata" name is replaced with FIELDS_METADATA variable with an if block to check if the metadata column exists or not.
- **Issue:** Fixed #15581
- **Dependencies:** No
- **Twitter handle:** None
Do not issue beta or deprecation warnings on internal calls
Labels: name: auto:refactor, name: area: models, name: size:L

ie. calls from other langchain modules

<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is whichever of langchain, community, core, experimental, etc. is being modified.

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,
  - **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` from the root of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: https://python.langchain.com/docs/contributing/

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/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->
community: CTransformers: Add `_astream` implementation
Labels: name: auto:improvement, name: area: models, name: size:M

Description:
- Addition of `_astream` implementation in `ctransformers.py`
- Returns asynchronous iterator

Issue:
- Invoking `astream` without any model specific implementation of `_astream` defaults to 'yielding' `ainvoke` which does not "stream" data, returns string asynchronously.

Verification:
- `astream` verified with running `Mistral-7B-Instruct-v0.1-GGUF`
ReadTimeout with Arabic pdf files
Labels: name: auto:bug, name: area: models

### System Info

Langchain

### Who can help?

LangChain with Gemini Pro

### Information

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

### Related Components

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

### Reproduction

stuff_chain = load_qa_chain(model, chain_type="stuff", prompt=prompt)
question = "content pls?"

stuff_answer = stuff_chain(
    {"input_documents": pages[1:], "question": question}, return_only_outputs=True
)


### Expected behavior

ReadTimeout: HTTPConnectionPool(host='localhost', port=36027): Read timed out. (read timeout=60.0)
Issue: What docstore to use in ChromaDB that isn't in memory?
Labels: name: area: memory, name: auto:question, name: integration: chroma

### Issue you'd like to raise.

I have the following ChromaDB setup:

```python
parent_splitter = RecursiveCharacterTextSplitter(chunk_size=2000)
    child_splitter = RecursiveCharacterTextSplitter(chunk_size=400)

    vectorstore = None
    try:
        vectorstore = Chroma(persist_directory="storage/deploy/chroma-db", embedding_function=get_embedding_function())        
        print("Loaded existing vector store")
    except:
        print("Creating new vector store")
        vectorstore = Chroma(
            collection_name=collection_name, 
            embedding_function=get_embedding_function(), 
            persist_directory="storage/deploy/chroma-db"
        )
        
    store = InMemoryStore()
    
    retriever = ParentDocumentRetriever(
        vectorstore=vectorstore,
        docstore=store,
        child_splitter=child_splitter,
        parent_splitter=parent_splitter
    )
    return retriever
```

The issue is if I add a bunch of documents to the retriever, the memory eventually can run out and crash the system. Is there a way for this to be done out of RAM instead? Or am I misunderstanding the usage of this.

### Suggestion:
Is there a non-inmemory docstore that can be used in the ParentDocumentRetriever or does it not make sense in the use case.
DOC: langchain with Fireworks ai
Labels: name: area: memory, name: auto:bug

### Issue with current documentation:

https://python.langchain.com/docs/integrations/chat/fireworks

Hi, I'm new Langchain with Fireworks.
I run this code in document 'ChatFireworks' and got an issue.
Environment : python 3.11, Window10

```Create a simple chain with memory

chain = (
    RunnablePassthrough.assign(
        history=memory.load_memory_variables | (lambda x: x["history"])
    )
    | prompt
    | llm.bind(stop=["\n\n"])
)

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[17], line 3
      1 chain = (
      2     RunnablePassthrough.assign(
----> 3         history=memory.load_memory_variables | (lambda x: x["history"])
      4     )
      5     | prompt
      6     | llm.bind(stop=["\n\n"])
      7 )

TypeError: unsupported operand type(s) for |: 'method' and 'function'```


### Idea or request for content:

TypeError: unsupported operand type(s) for |: 'method' and 'function
community: Fixed bug of "system message check" in chat_models/tongyi.
Labels: name: lgtm, name: auto:bug, name: area: models, name: size:XS

  - **Description:** This PR is to fix a bug of "system message check" in langchain_community/ chat_models/tongyi.py
  - **Issue:** In term of current logic, if there's no system message in the chat messages, an error of "System message can only be the first message." will be wrongly raised.
  - **Dependencies:** No.
  - **Twitter handle:** I don't have a Twitter account.
'Unrecognized request argument supplied: functions' error when executing agent | following documentation
Labels: name: area: agent, name: auto:bug

### System Info

`langchain==0.1.0`
`langchain-community==0.0.9`
`langchain-core==0.1.7`
`linux 20.04`

### Who can help?

_No response_

### Information

- [X] 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
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [X] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

Following the documentation https://python.langchain.com/docs/modules/agents/how_to/custom_agent

### Expected behavior

Should output something similar to this
```
{'input': 'How many letters in the word educa',
 'output': 'There are 5 letters in the word "educa".'}
```

Instead got an error when ran `agent_executor.invoke({"input": "How many letters in the word educa"})`
```
NotFoundError: Error code: 404 - {'error': {'message': 'Unrecognized request argument supplied: functions', 'type': 'invalid_request_error', 'param': None, 'code': None}}
```
community: Allow deleting by ID and collection in `pgvector`
Labels: name: lgtm, name: area: vector store, name: auto:improvement, name: integration: supabase, name: size:S

  - **Description:** The `delete_collection` method deletes an entire collection regardless of custom ID. The `delete` method deletes everything with the provided custom IDs regardless of collection. It can be useful to restrict deletion to both the collection and a set of custom IDs. This change adds support for that by allowing you to optionally specify that `delete` should be restricted to the collection defined on the `PGVector` instance.
community: AWS Athena Document Loader
Labels: name: area: doc loader, name: auto:enhancement, name: integration: aws, name: size:L

<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is whichever of langchain, community, core, experimental, etc. is being modified.

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,
  - **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` from the root of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: https://python.langchain.com/docs/contributing/

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/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->
 
  - **Description:** Adds the document loader for [AWS Athena](https://aws.amazon.com/athena/), a serverless and interactive analytics service.
  - **Dependencies:** Added boto3 as a dependency
Fix history runnable when called with messages as input
Labels: name: area: memory, name: auto:bug, name: size:XS

<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is whichever of langchain, community, core, experimental, etc. is being modified.

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,
  - **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` from the root of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: https://python.langchain.com/docs/contributing/

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/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->
AttributeError: module 'chromadb' has no attribute 'config'
Labels: name: area: vector store, name: auto:bug, name: integration: chroma

### System Info

Python 3.11, Langchain 0.0.354, ChromaDB v0.4.22

### Who can help?

@agola11
@hwchase17

### Information

- [ ] The official example notebooks/scripts
- [X] 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

```python
from langchain.text_splitter import MarkdownTextSplitter, RecursiveCharacterTextSplitter
from langchain.document_loaders import DirectoryLoader
from langchain.storage import InMemoryStore
from langchain.retrievers import ParentDocumentRetriever
from langchain.vectorstores import Chroma
import chromadb
    
    
def load_chroma_db(collection_name: str):
    parent_splitter = RecursiveCharacterTextSplitter(chunk_size=2000)
    child_splitter = RecursiveCharacterTextSplitter(chunk_size=400)
    
    vectorstore = Chroma(
        collection_name=collection_name, 
        embedding_function=get_embedding_function(), 
        persist_directory="storage/deploy/chroma-db"
    )
    store = InMemoryStore()
    
    retriever = ParentDocumentRetriever(
        vectorstore=vectorstore,
        docstore=store,
        child_splitter=child_splitter,
        parent_splitter=parent_splitter
    )
    return retriever

retriever = load_chroma_db("full_docs")
retriever.add_documents(bancworks_docs)
```

### Expected behavior

Should be able to load ChromaDB and persist it.
`UnstructuredFileLoader` shows `TypeError: expected str, bytes or os.PathLike object, not list` when a list of files is passed in
Labels: name: area: doc loader, name: auto:bug

### System Info

LangChain version: 0.0.354
LangChain Community version: 0.0.8
Platform: Apple M3 Pro chip on MacOS Sonoma (MacOS 14.2.1)
Python version: 3.11.7

### Who can help?

@baskaryan has the most recent commits on this section of the code, but it was for moving items to the `langchain_community` package. I'm not sure who is the original author

### Information

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

### Related Components

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

### Reproduction

1. Create a list of file paths
2. Attempt to load using `UnstructuredFileLoader`

```python
from langchain_community.document_loaders import UnstructuredFileLoader

files = [
    "file_1.txt",
    "file_2.txt"
]

loader = UnstructuredFileLoader(file_path=files)
documents = loader.load()  # Error occurs on this line
```

Contents of `file_1.txt` 
```txt
some stuff
```

Contents of `file_2.txt`
```txt
some more stuff
```


Stack trace
```
Traceback (most recent call last):
  File "/Users/joshl/Library/Application Support/JetBrains/PyCharm2023.3/scratches/scratch.py", line 9, in <module>
    documents = loader.load()  # Error occurs on this line
                ^^^^^^^^^^^^^
  File "/Users/joshl/miniforge3/envs/MechanisticLLM/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 87, in load
    elements = self._get_elements()
               ^^^^^^^^^^^^^^^^^^^^
  File "/Users/joshl/miniforge3/envs/MechanisticLLM/lib/python3.11/site-packages/langchain_community/document_loaders/unstructured.py", line 173, in _get_elements
    return partition(filename=self.file_path, **self.unstructured_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/joshl/miniforge3/envs/MechanisticLLM/lib/python3.11/site-packages/unstructured/partition/auto.py", line 278, in partition
    filetype = detect_filetype(
               ^^^^^^^^^^^^^^^^
  File "/Users/joshl/miniforge3/envs/MechanisticLLM/lib/python3.11/site-packages/unstructured/file_utils/filetype.py", line 248, in detect_filetype
    _, extension = os.path.splitext(_filename)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 118, in splitext
TypeError: expected str, bytes or os.PathLike object, not list

Process finished with exit code 1

```

### Expected behavior

A list of strings should be able to be passed to the `UnstructuredFileLoader` class based on the `__init__` arguments

```python
class UnstructuredFileLoader(UnstructuredBaseLoader):
    def __init__(
        self,
        file_path: Union[str, List[str]],
        mode: str = "single",
        **unstructured_kwargs: Any,
    ):
```
docs: add changelog
Labels: name: auto:documentation, name: size:L

<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is whichever of langchain, community, core, experimental, etc. is being modified.

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,
  - **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` from the root of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run tests, lint, etc: https://python.langchain.com/docs/contributing/

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/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17.
 -->