Commit Graph

5230 Commits

Author SHA1 Message Date
Nuno Campos
a6afd45c63 Lint 2023-10-02 10:14:56 +01:00
Nuno Campos
f7dd10b820 Lint 2023-10-02 10:13:09 +01:00
Nuno Campos
040bb2983d Lint 2023-10-02 10:11:26 +01:00
Nuno Campos
52e5a8b43e Create new RunnableSerializable class in preparation for configurable runnables
- Also move RunnableBranch to its own file
2023-10-02 10:07:30 +01:00
Yeonji-Lim
61ab1b1266
Fix typo in docstring (#11256)
Description : Remove meaningless 's' in docstring
2023-10-01 15:55:11 -04:00
Kazuki Maeda
a363ab5292
rename repo namespace to langchain-ai (#11259)
### Description
renamed several repository links from `hwchase17` to `langchain-ai`.

### Why
I discovered that the README file in the devcontainer contains an old
repository name, so I took the opportunity to rename the old repository
name in all files within the repository, excluding those that do not
require changes.

### Dependencies
none

### Tag maintainer
@baskaryan

### Twitter handle
[kzk_maeda](https://twitter.com/kzk_maeda)
2023-10-01 15:30:58 -04:00
Dayuan Jiang
17cdeb72ef
minor fix: remove redundant code from OpenAIFunctionsAgent (#11245)
minor fix: remove redundant code from OpenAIFunctionsAgent (#11245)
2023-10-01 13:22:15 -04:00
Leonid Ganeline
5e5039dbd2
docs: updated YouTube and tutorial video links (#10897)
updated `YouTube` and `tutorial` videos with new links.
Removed couple of duplicates.
Reordered several links by view counters
Some formatting: emphasized the names of products
2023-09-30 16:37:28 -07:00
Leonid Ganeline
cb84f612c9
docs: document_transformers consistency (#10467)
- Updated `document_transformers` examples: titles, descriptions, links
- Added `integrations/providers` for missed document_transformers
2023-09-30 16:36:23 -07:00
Leonid Ganeline
240190db3f
docs: integrations/memory consistency (#10255)
- updated titles and descriptions of the `integrations/memory` notebooks
into consistent and laconic format;
- removed
`docs/extras/integrations/memory/motorhead_memory_managed.ipynb` file as
a duplicate of the
`docs/extras/integrations/memory/motorhead_memory.ipynb`;
- added `integrations/providers` Integration Cards for `dynamodb`,
`motorhead`.
- updated `integrations/providers/redis.mdx` with links
- renamed several notebooks; updated `vercel.json` to reroute new names.
2023-09-30 16:35:55 -07:00
Michael Goin
33eb5f8300
Update DeepSparse LLM (#11236)
**Description:** Adds streaming and many more sampling parameters to the
DeepSparse interface

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-09-29 13:55:19 -07:00
Eugene Yurtsev
f91ce4eddf
Bump deps in langserve (#11234)
Bump deps in langserve lockfile
2023-09-29 16:19:37 -04:00
Haozhe
4c97a10bd0
fix code injection vuln (#11233)
- **Description:** Fix a code injection vuln by adding one more keyword
into the filtering list
  - **Issue:** N/A
  - **Dependencies:** N/A
  - **Tag maintainer:** 
  - **Twitter handle:**

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2023-09-29 16:16:00 -04:00
Eugene Yurtsev
aebdb1ad01
Ignore aadd (#11235) 2023-09-29 21:10:53 +01:00
Eugene Yurtsev
8b4cb4eb60
Add type to message chunks (#11232) 2023-09-29 20:14:52 +01:00
Nuno Campos
fb66b392c6
Implement RunnablePassthrough.assign(...) (#11222)
Passes through dict input and assigns additional keys

<!-- 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/hwchase17/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.
 -->
2023-09-29 20:12:48 +01:00
Nuno Campos
1ddf9f74b2
Add a streaming json parser (#11193)
<img width="1728" alt="Screenshot 2023-09-28 at 20 15 01"
src="https://github.com/langchain-ai/langchain/assets/56902/ed0644c3-6db7-41b9-9543-e34fce46d3e5">


<!-- 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/hwchase17/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.
 -->
2023-09-29 20:09:52 +01:00
Nuno Campos
ee56c616ff Remove flawed test
- It is not possible to access properties on classes, only on instances, therefore this test is not something we can implement
2023-09-29 20:05:33 +01:00
Nuno Campos
f3f3f71811 Lint 2023-09-29 19:57:40 +01:00
Nuno Campos
f6b0b065d3
Update json.py
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2023-09-29 19:34:35 +01:00
Nuno Campos
cbe18057b0
Update json.py
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2023-09-29 19:34:27 +01:00
Nuno Campos
aa8b4120a8 Keep exceptions when not in streaming mode 2023-09-29 19:21:27 +01:00
Nuno Campos
1f30e25681 Lint 2023-09-29 18:03:41 +01:00
Nuno Campos
c9d0f2b984 Combine with existing json output parsers 2023-09-29 17:55:30 +01:00
Eugene Yurtsev
b4354b7694
Make tests stricter, remove old code, fix up pydantic import when using v2 (#11231)
Make tests stricter, remove old code, fix up pydantic import when using v2 (#11231)
2023-09-29 12:47:02 -04:00
Eugene Yurtsev
572968fee3
Using langchain input types (#11204)
Using langchain input type
2023-09-29 12:37:09 -04:00
Bagatur
77c7c9ab97
bump 305 (#11224) 2023-09-29 08:55:00 -07:00
Nuno Campos
4b8442896b Make test deterministic 2023-09-29 16:50:00 +01:00
Ikko Eltociear Ashimine
33884b2184
Fix typo in gradient.ipynb (#11206)
Enviroment -> Environment

<!-- 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/hwchase17/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.
 -->
2023-09-29 11:45:40 -04:00
Attila Tőkés
ba9371854f
OpenAI gpt-3.5-turbo-instruct cost information (#11218)
Added pricing info for `gpt-3.5-turbo-instruct` for OpenAI and Azure
OpenAI.

Co-authored-by: Attila Tőkés <atokes@rws.com>
2023-09-29 08:44:55 -07:00
Eugene Yurtsev
de69ea26e8
Suppress warnings in interactive env that stem from tab completion (#11190)
Suppress warnings in interactive environments that can arise from users 
relying on tab completion (without even using deprecated modules).

jupyter seems to filter warnings by default (at least for me), but
ipython surfaces them all
2023-09-29 11:44:30 -04:00
Jon Saginaw
715ffda28b
mongodb doc loader init (#10645)
- **Description:** A Document Loader for MongoDB
  - **Issue:** n/a
  - **Dependencies:** Motor, the async driver for MongoDB
  - **Tag maintainer:** n/a
  - **Twitter handle:** pigpenblue

Note that an initial mongodb document loader was created 4 months ago,
but the [PR ](https://github.com/langchain-ai/langchain/pull/4285)was
never pulled in. @leo-gan had commented on that PR, but given it is
extremely far behind the master branch and a ton has changed in
Langchain since then (including repo name and structure), I rewrote the
branch and issued a new PR with the expectation that the old one can be
closed.

Please reference that old PR for comments/context, but it can be closed
in favor of this one. Thanks!

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2023-09-29 11:44:07 -04:00
Cynthia Yang
523898ab9c
Update fireworks features (#11205)
Description
* Update fireworks feature on web page

Issue - Not applicable
Dependencies - None
Tag maintainer - @baskaryan
2023-09-29 08:37:06 -07:00
Nuno Campos
3d8aa88e26 Add async tests and comments 2023-09-29 15:28:46 +01:00
Nuno Campos
4ad0f3de2b
Add RunnableGenerator (#11214)
<!-- 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/hwchase17/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.
 -->
2023-09-29 15:21:37 +01:00
Guy Korland
748a757306
Clean warnings: replace type with isinstance and fix syntax (#11219)
Clean warnings: replace type with `isinstance` and fix on notebook
syntax syntax
2023-09-29 10:06:33 -04:00
Nuno Campos
091d8845d5 Backwards compat 2023-09-29 14:18:38 +01:00
Nuno Campos
4e28a7a513 Implement diff 2023-09-29 14:12:48 +01:00
Nuno Campos
5cbe2b7b6a Implement diff 2023-09-29 14:12:18 +01:00
Nuno Campos
6c0a6b70e0 WIP Add tests§ 2023-09-29 14:11:34 +01:00
Nuno Campos
63f2ef8d1c Implement str one 2023-09-29 14:11:34 +01:00
Nuno Campos
f672b39cc9 Add a streaming json parser 2023-09-29 14:11:34 +01:00
Nuno Campos
2387647d30 Lint 2023-09-29 14:11:03 +01:00
Nuno Campos
0318cdd33c Add tests 2023-09-29 12:25:19 +01:00
Nuno Campos
b67db8deaa Add RunnableGenerator 2023-09-29 12:04:32 +01:00
Nuno Campos
ca5293bf54
Enable creating Tools from any Runnable (#11177)
<!-- 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/hwchase17/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.
 -->
2023-09-29 12:03:56 +01:00
Nuno Campos
e35ea565d1 Lint 2023-09-29 12:00:56 +01:00
Nuno Campos
7f589ebbc2 Lint 2023-09-29 11:57:01 +01:00
Nuno Campos
8be598f504 Fix invocation 2023-09-29 11:57:01 +01:00
Nuno Campos
6eb6c45c98 Enable creating Tools from any Runnable 2023-09-29 11:57:01 +01:00