Commit Graph

1888 Commits (parallel_dir_loader)
 

Author SHA1 Message Date
Davis Chase 7f8727bbcd
Router chains (#4019)
Unpolished router examples to help flesh out abstractions and use cases 
![Screenshot 2023-05-02 at 7 02 58
PM](https://user-images.githubusercontent.com/130488702/235820394-389e5584-db0b-415e-a260-2824b5555167.png)

---------

Co-authored-by: Shreya Rajpal <shreya.rajpal@gmail.com>
1 year ago
Pulkit Mehta bbbca10704
issue#4082 base_language had wrong code comment that it was using gpt… (#4084)
…3 to tokenize text instead of gpt-2

Co-authored-by: Pulkit <pulkit.mehta@catylex.com>
1 year ago
Leonid Ganeline 6caba8e759
docs: added a link to the `Google Scholar` articles (#4007)
Google Scholar outputs a nice list of scientific and research articles
that use LangChain.
I added a link to the Google Scholar page to the `gallery` doc page
1 year ago
obbiondo d18e788ee3
bugfix: return whole document when loading with ConfluenceLoader.load by label (#3980)
Method confluence.get_all_pages_by_label, returns only metadata about
documents with a certain label (such as pageId, titles, ...). To return
all documents with a certain label we need to extract all page ids given
a certain label and get pages content by these ids.

---------

Co-authored-by: Andrea Biondo <a.biondo@reply.it>
1 year ago
Harrison Chase 5f30cc8713
Harrison/knn retriever (#4083)
Co-authored-by: Yuichi Tateno (secon) <hotchpotch@users.noreply.github.com>
1 year ago
Zander Chase 65c3b146c9
Accept str or list[str] for shell (#4060)
Relax the requirements
1 year ago
Harrison Chase 5a269d3175
Harrison/media wiki xml (#4072)
Co-authored-by: Géraud de Drouas <gdedrouas@users.noreply.github.com>
1 year ago
Zeeland c186f18aab
fix: incorrect data type when construct_path in chain (#4031)
A incorrect data type error happened when executing _construct_path in
`chain.py` as follows:

```python
Error with message replace() argument 2 must be str, not int
```

The path is always a string. But the result of `args.pop(param, "")` is
undefined.
1 year ago
engkheng 349ba88aee
Export `FileChatMessageHistory` (#4042) 1 year ago
Nikolas Garske 1608f5dcae
Remove pip stdout and fix typo (#4050) 1 year ago
Ivo Stranic 3b556eae44
Update deeplake example (#4055) 1 year ago
Steve Kim 9b830f437c
Deleted importing Document from document_loaders.base because Documen… (#4068)
Hi,

- Modification:
https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/arxiv.html
- Reason: In this example, the first line is unnecessary because the
Document class does not exist in the base.
- Resolves: Issue #4052

--------
P.S: This pull-request is my first time, so please let me know if I need
to correct or write more explanation.
1 year ago
hp0404 374725a715
Refactor TelegramChatLoader and FacebookChatLoader classes and add tests (#3863)
This PR includes two main changes:

- Refactor the `TelegramChatLoader` and `FacebookChatLoader` classes by
removing the dependency on pandas and simplifying the message filtering
process.

- Add test cases for the `TelegramChatLoader` and `FacebookChatLoader`
classes. This test ensures that the class correctly loads and processes
the example chat data, providing better test coverage for this
functionality.
1 year ago
Jon Saginaw ea64b1716d
Enhancement: option to Get All Tokens with a single Blockchain Document Loader call (#3797)
The Blockchain Document Loader's default behavior is to return 100
tokens at a time which is the Alchemy API limit. The Document Loader
exposes a startToken that can be used for pagination against the API.

This enhancement includes an optional get_all_tokens param (default:
False) which will:

- Iterate over the Alchemy API until it receives all the tokens, and
return the tokens in a single call to the loader.
- Manage all/most tokenId formats (this can be int, hex16 with zero or
all the leading zeros). There aren't constraints as to how smart
contracts can represent this value, but these three are most common.

Note that a contract with 10,000 tokens will issue 100 calls to the
Alchemy API, and could take about a minute, which is why this param will
default to False. But I've been using the doc loader with these
utilities on the side, so figured it might make sense to build them in
for others to use.
1 year ago
Akash Sharma 525db1b6cb
Fixed typo leading to broken link (#4034) 1 year ago
Zander Chase afa9d1292b
Re-Permit Partials in `Tool` (#4058)
Resolved issue #4053

Now that StructuredTool is a separate class, this constraint is no
longer needed.

Added/updated a unit test
1 year ago
Zander Chase 7e967aa4d5
Update Notebooks (#4051) 1 year ago
Nuno Campos f3ec6d2449
Replace remaining usage of basellm with baselangmodel (#3981) 1 year ago
mbchang f291fd7eed
docs: remove stdout from pip install (for gymnasium) (#3993) 1 year ago
Harrison Chase b67be55ab8
bump ver (#4018) 1 year ago
Harrison Chase a5dd73c1a6
Revert "[agent][property type] Change allowed_tools to Set as Duplicate doesn’t make sense" (#4014)
Reverts hwchase17/langchain#3840
1 year ago
Davis Chase df3bc707fc
Dev2049/callback example fix (#4010)
Closes #3997

---------

Co-authored-by: Akshaj Jain <akshaj.jain@gmail.com>
1 year ago
Davis Chase f08a76250f
Better custom model handling OpenAICallbackHandler (#4009)
Thanks @maykcaldas for flagging! think this should resolve #3988. Let me
know if you still see issues after next release.
1 year ago
Zander Chase aa38355999
Vwp/docs improved document loaders (#4006)
Huge thanks to @leo-gan for improving the document loaders notebooks

---------

Co-authored-by: Leonid Ganeline <leo.gan.57@gmail.com>
1 year ago
Zander Chase 1c68cbdb28
Fix typing of attribute (#3999) 1 year ago
MichaelMDowling 36ee60c96c
Update \docs\modules\models\text_embedding\examples\openai.ipynb (#3976)
Single edit to: models/text_embedding/examples/openai.ipynb - Line 88:
changed from: "embeddings = OpenAIEmbeddings(model_name=\"ada\")" to
"embeddings = OpenAIEmbeddings()" as model_name is no longer part of the
OpenAIEmbeddings class.
1 year ago
Harrison Chase e23391965b
fix import (#4003) 1 year ago
Jinto Jose 013208cce6
Fix Documentation - Nomic - Atlas Jupyter Notebook (#3987)
Correction to Numic-Atlas Jupyter Notebook Docs
1 year ago
Ankush Gola 18f9d7b4f6
don't deepcopy handlers (#3995)
Co-authored-by: Sami Liedes <sami.liedes@iki.fi>
Co-authored-by: Sami Liedes <sami.liedes@rocket-science.ch>
1 year ago
Mike Wang c26cf04110
[check] add import check and warning for pandas (#3944)
- as titled, add an `import` catch for pandas with a user suggestion
message.
1 year ago
Chop Tr 71a337dac6
Update output_fixing_parser.ipynb (#3978) 1 year ago
Ankush Gola 3bd5a99b83
v2 tracer with single runs endpoint (#3951) 1 year ago
Harrison Chase 8fcb56e74a
bump version to 155 (#3943) 1 year ago
Harrison Chase ca08a34a98
retry to parsing (#3696) 1 year ago
mbchang 3993166b5e
docs: remove stdout from pip install (#3945) 1 year ago
Harrison Chase 2366e71bed
Harrison/azure openai (#3942)
Co-authored-by: Saverio Proto <zioproto@gmail.com>
1 year ago
Harrison Chase 48ea27ba60
Harrison/blockwise sitemap (#3940)
Co-authored-by: Martin Holzhauer <martin@holzhauer.eu>
1 year ago
Harrison Chase 483fe257d9
bump timeout (#3939) 1 year ago
Jan Philipp Harries fc3c2c4406
Async Support for LLMChainExtractor (new) (#3780)
@vowelparrot @hwchase17 Here a new implementation of
`acompress_documents` for `LLMChainExtractor ` without changes to the
sync-version, as you suggested in #3587 / [Async Support for
LLMChainExtractor](https://github.com/hwchase17/langchain/pull/3587) .

I created a new PR to avoid cluttering history with reverted commits,
hope that is the right way.
Happy for any improvements/suggestions.

(PS:
I also tried an alternative implementation with a nested helper function
like

``` python
  async def acompress_documents_old(
      self, documents: Sequence[Document], query: str
  ) -> Sequence[Document]:
      """Compress page content of raw documents."""
      async def _compress_concurrently(doc):
          _input = self.get_input(query, doc)
          output = await self.llm_chain.apredict_and_parse(**_input)
          return Document(page_content=output, metadata=doc.metadata)
      outputs=await asyncio.gather(*[_compress_concurrently(doc) for doc in documents])
      compressed_docs=list(filter(lambda x: len(x.page_content)>0,outputs))
      return compressed_docs
```

But in the end I found the commited version to be better readable and
more "canonical" - hope you agree.
1 year ago
Harrison Chase 2cecc572f9
Harrison/chroma get (#3938)
Co-authored-by: sdan <git@sdan.io>
1 year ago
liviuasnash1 6396a4ad8d
Fix documentation typos (#3870)
Co-authored-by: Liviu Asnash <liviua@maximallearning.com>
1 year ago
Hristo Stoychev 109927cdb2
Make project compatible with SQLAlchemy 1.3.* (#3862)
Related to [this
issue.](https://github.com/hwchase17/langchain/issues/3655#issuecomment-1529415363)

The `Mapped` SQLAlchemy class is introduced in SQLAlchemy 1.4 but the
migration from 1.3 to 1.4 is quite challenging so, IMO, it's better to
keep backwards compatibility and not change the SQLAlchemy requirements
just because of type annotations.
1 year ago
sqr 8bbdde8f9e
make ARG POETRY_HOME available in multistage (#3882) 1 year ago
玄猫 188a7bd653
fix: pgvector hang risk if table not exist #3883 (#3884) 1 year ago
tomer555 9acf80fd69
fix: invalid escape sequence error in regex pattern (#3902)
This PR fixes the "SyntaxError: invalid escape sequence" error in the
pydantic.py file. The issue was caused by the backslashes in the regular
expression pattern being treated as escape characters. By using a raw
string literal for the regex pattern (e.g., r"\{.*\}"), this fix ensures
that backslashes are treated as literal characters, thus preventing the
error.

Co-authored-by: Tomer Levy <tomer.levy@tipalti.com>
1 year ago
Samuel Dion-Girardeau c5c33786a7
Fix bad spellings for 'convenience' (#3936)
Found in the docs for chat prompt templates:

https://python.langchain.com/en/latest/getting_started/getting_started.html#chat-prompt-templates

and fixed similar issues in neighboring notebooks.
1 year ago
Harrison Chase f04faf8496
Harrison/spreedly (#3937)
Co-authored-by: Esmit Pérez <esmitperez@users.noreply.github.com>
1 year ago
Harrison Chase cd3f8582cb
Harrison/combined memory (#3935)
Co-authored-by: engkheng <60956360+outday29@users.noreply.github.com>
1 year ago
Zander Chase c4cb55a0c5
[Breaking] Migrate GPT4All to use PyGPT4All (#3934)
Seems the pyllamacpp package is no longer the supported bindings from
gpt4all. Tested that this works locally.

Given that the older models weren't very performant, I think it's better
to migrate now without trying to include a lot of try / except blocks

---------

Co-authored-by: Nissan Pow <npow@users.noreply.github.com>
Co-authored-by: Nissan Pow <pownissa@amazon.com>
1 year ago
leo-gan f0a4bbb8e2
updated `YouTube` links (#3916)
Added several links to fresh videos

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
1 year ago