Commit Graph

2391 Commits

Author SHA1 Message Date
Raunak
64f5968a81
community: Replaced hardcoded "metadata" with FIELDS_METADATA variable in semantic_hybrid_search_with_score_and_rerank (#15642)
- **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

Co-authored-by: H161961 <Raunak.Raunak@Honeywell.com>
2024-01-06 17:04:59 -08:00
Erick Friis
b1fa726377
docs: langchain-openai (#15513)
Updates docs and cookbooks to import ChatOpenAI, OpenAI, and OpenAI
Embeddings from `langchain_openai`

There are likely more

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-06 15:54:48 -08:00
Bagatur
14c5c15958
experimental[patch]: Release 0.0.48 (#15483) 2024-01-06 12:46:00 -05:00
Erick Friis
d136925c49
community[patch]: fix deprecation warnings on openai subclasses (#15621) 2024-01-05 18:02:17 -08:00
Bagatur
4ac61670b2
infra: fix langchain openai test dep (#15620) 2024-01-05 20:14:22 -05:00
Bagatur
81810cec2e
langchain[minor]: Release 0.1.0 (#15619) 2024-01-05 19:33:35 -05:00
Bagatur
c5226d7a18
docs: update cohere chat integration (#15562)
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-05 16:33:29 -08:00
Erick Friis
1bc6b19ea7
openai[patch]: v0.0.2 (#15618) 2024-01-05 16:33:10 -08:00
Bagatur
46446a100d
core[patch]: deprecate v1 tracer (#15608) 2024-01-05 19:25:19 -05:00
Bagatur
dbb582d227
infra: community bump min core version (#15617) 2024-01-05 19:17:48 -05:00
Bagatur
1e4b8f0453
community[patch]: Release 0.0.9 (#15615) 2024-01-05 19:11:18 -05:00
Erick Friis
7f8baa030b
openai: core version, rc1 (#15614) 2024-01-05 15:57:23 -08:00
Erick Friis
5ac3a06378
google-vertexai: release 0.0.1 (#15613) 2024-01-05 15:24:23 -08:00
Bagatur
96b47e18e0
core[patch]: Release 0.1.7 (#15610) 2024-01-05 18:24:11 -05:00
Erick Friis
b257c7d0ea
google-vertexai, openai: release candidate version (#15611) 2024-01-05 15:05:27 -08:00
Erick Friis
ebc75c5ca7
openai[minor]: implement langchain-openai package (#15503)
Todo

- [x] copy over integration tests
- [x] update docs with new instructions in #15513 
- [x] add linear ticket to bump core -> community, community->langchain,
and core->openai deps
- [ ] (optional): add `pip install langchain-openai` command to each
notebook using it
- [x] Update docstrings to not need `openai` install
- [x] Add serialization
- [x] deprecate old models

Contributor steps:

- [x] Add secret names to manual integrations workflow in
.github/workflows/_integration_test.yml
- [x] Add secrets to release workflow (for pre-release testing) in
.github/workflows/_release.yml

Maintainer steps (Contributors should not do these):

- [x] set up pypi and test pypi projects
- [x] add credential secrets to Github Actions
- [ ] add package to conda-forge


Functional changes to existing classes:

- now relies on openai client v1 (1.6.1) via concrete dep in
langchain-openai package

Codebase organization

- some function calling stuff moved to
`langchain_core.utils.function_calling` in order to be used in both
community and langchain-openai
2024-01-05 15:03:28 -08:00
Bagatur
a7d023aaf0
core[patch], community[patch]: mark runnable context, lc load as beta (#15603) 2024-01-05 17:54:26 -05:00
Leonid Kuligin
f73bf4ee54
google-vertexai: added langchain_google_vertexai package (#15218)
added langchain_google_vertexai package

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-01-05 10:44:10 -08:00
Bagatur
e1fc4d5b95
core[patch]: add beta decorator (#15589) 2024-01-05 13:16:27 -05:00
Bagatur
68eb3053e7
langchain[patch]: deprecate old agent classes and methods (#15558) 2024-01-05 12:42:54 -05:00
Harrison Chase
9b9449750c
update chain docs (#15495)
Co-authored-by: Bagatur <baskaryan@gmail.com>
2024-01-05 09:15:00 -08:00
Bagatur
00dfbd2a99
core[minor], langchain[minor]: deprecate old Chain and LLM methods (#15499) 2024-01-05 11:58:35 -05:00
chyroc
f12b5c1222
Feat: support Milvus more params (#15447)
fix https://github.com/langchain-ai/langchain/issues/15442
2024-01-04 20:07:23 -08:00
Bagatur
f5e4f0b30b
langchain[minor]: add warnings when importing integrations (#15505)
Should be imported from community directly
2024-01-04 17:41:45 -05:00
Eugene Yurtsev
bf0b3cc0b5
core[patch]: Further restrict recursive URL loader (#15559)
Includes code from this PR:  https://github.com/langchain-ai/langchain/compare/HEAD...m0kr4n3:security/fix_ssrf 
with additional fixes 

Unit tests cover new test cases
2024-01-04 16:33:57 -05:00
Bagatur
817b84de9e
core[patch]: Release 0.1.6 (#15547) 2024-01-04 11:02:04 -05:00
Bagatur
b2f15738dd
core[patch], langchain[patch], community[patch]: Revert #15326 (#15546) 2024-01-04 10:39:37 -05:00
Bagatur
6e90b7a91b
langchain[patch]: bump community >=0.0.8,<0.1 (#15492) 2024-01-03 13:31:48 -05:00
Bagatur
8b7d6531a5
langchain[patch]: Release 0.0.354 (#15482) 2024-01-03 12:51:55 -05:00
Bagatur
0b579dc623
infra: update community test min reqs (#15490) 2024-01-03 12:13:29 -05:00
Bagatur
266db0efc8
community[patch]: bump core version >=0.1.5,<0.2 (#15488) 2024-01-03 12:03:31 -05:00
Bagatur
a2324ee533
community[patch]: Release 0.0.8 (#15481) 2024-01-03 11:28:50 -05:00
Bagatur
54b58c03db
infra: add minimum deps pre release check (#15485) 2024-01-03 11:28:35 -05:00
Bagatur
b317ad2472
core[patch]: Release 0.1.5 (#15480) 2024-01-03 10:26:27 -05:00
Bagatur
baeac236b6
langchain[patch], experimental[patch]: update utilities imports (#15438) 2024-01-03 02:18:15 -05:00
Harutaka Kawamura
73da8f863c
Remove unused Params (#14385)
<!-- 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.
 -->

Removes unused `Params` in `libs/langchain/langchain/llms/mlflow.py`.

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-02 22:45:18 -08:00
chyroc
b65e57971e
Patch: improve type hint (#15451) 2024-01-02 22:39:27 -08:00
Harutaka Kawamura
8ebf55ebbf
Fix llms.Mlflow example (#14386)
<!-- 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.
 -->

The example code for `llms.Mlflow` is outdated.

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-02 22:35:13 -08:00
Nolan
6c4b5a4eff
Add option to preserve headers in MarkdownHeaderTextSplitter (#14433)
- **Description:** `MarkdownHeaderTextSplitter` currently strips header
lines from chunked content. Many applications require these header lines
are preserved. This adds an optional parameter to preserve those headers
in the chunked content.
  - **Issue:** #2836 (relevant)
  - **Dependencies:** -
  - **Tag maintainer:** @baskaryan
  - **Twitter handle:** @finnless

Unit tests and new examples in notebook included.

cc @rlancemartin

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-02 22:34:52 -08:00
Xin Liu
0a7d360ba4
feat: new integration wasm_chat (#14787)
<!-- 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/).

---------

Signed-off-by: Xin Liu <sam@secondstate.io>
2024-01-02 22:33:14 -08:00
Leonid Ganeline
2bbee894bb
fixed a dependency duplicate (#15444)
BaseModel is derived twice. Left only one.
2024-01-02 21:40:04 -08:00
William FH
65afc13b8b
[Improvement] Evals: Add git info (#15446) 2024-01-02 20:08:50 -08:00
Anush
58cc7878e9
refactor: Qdrant async improvements (#14492)
Follow up on https://github.com/langchain-ai/langchain/pull/13048.
This PR intends to simplify the Qdrant async implementation by replacing
the internal GRPC methods with the `QdrantAsyncClient` methods.
This is a backward compatible change with no additional steps required
after merge.

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-02 20:07:48 -08:00
Li-Lun Lin
cda68d717c
core[patch]: update LanguageModelInput from List to Sequence (#14405)
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-01-02 18:49:01 -08:00
JuR-0
4dab37741a
Fix Bedrock broad error catching (#14398)
Fixes #14347 

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
- **Description:** Added the traceback of the previous error to keep the
initial error type,
  - **Issue:** #14347 ,
  - **Dependencies:** None,
  - **Tag maintainer:** 

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.
 -->

---------

Co-authored-by: Julien Raffy <julien.raffy@emeria.eu>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-02 17:25:48 -08:00
amaleki2
413a56b8f1
adding vectorstore_kwarg attribute to search_similarity function (#14604)
- **Description:** the ability to add all extra parameter of vectorstore
and using them SemanticSimilarityExampleSelector.
  - **Issue:** #14583
  - **Dependencies:** no dependensies
  - **Tag maintainer:** 
  - **Twitter handle:** @AmirMalekiz

---------

Co-authored-by: Amir Maleki <amaleki@fb.com>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-02 17:18:33 -08:00
Bob Lin
e93be14c11
Improvement: Allow passing parameters to the underlying es_client. Closes: #14403 (#14435)
### Description

In https://github.com/langchain-ai/langchain/issues/14403, the user
mentioned that he hopes not to verify ssl and needs to pass more
parameters

I found that the `Elasticsearch` class [has very many
parameters](98f2af2134/elasticsearch/_sync/client/__init__.py (L131-L191)
):

<img width="1097" alt="Screenshot 2023-12-08 at 4 24 39 PM"
src="https://github.com/langchain-ai/langchain/assets/10000925/f2201554-b41a-4388-a8e8-c14a2d0466d4">

In order to adapt to more situations, I want to add the kwargs parameter
so that users can enter more `Elasticsearch` parameters. Like
[redis](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/vectorstores/redis/base.py#L253),
[tair](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/vectorstores/tair.py#L32),
[myscale](https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/vectorstores/myscale.py#L112)
and so on.
2024-01-02 16:48:17 -08:00
codehound42
8aa921d3a4
Support score_threshold in SupabaseVectorStore similarity search (#14439)
Description: Add support for setting the `score_threshold` for
similarity search in SupabaseVectoreStore.

This pull request addresses issue #14438

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-02 16:47:05 -08:00
Antonio Pisani
d4a98e4e04
core: update json output parser (#15079)
- **Description:** changed json.py to handle additional cases of partial
json string to be parsed, basically by dropping the last character in
the string until a valid json string is found or the string is empty.
Also added additional test cases.
  
- **Issue:** function parse_partial_json could not parse cases where the
key is present but the value is not.

---------

Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-01-02 16:34:43 -08:00
YISH
eecfa81918
Add the collection_description parameter to Milvus (#14524)
Because Milvus' collection_name doesn't support UFT8 characters in other
languages, I want the `collection_descriotion`.


<!-- 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.
 -->
2024-01-02 16:28:01 -08:00