Commit Graph

8108 Commits

Author SHA1 Message Date
Brace Sproul
98cd8f673b
docs[minor]ci[minor]: Add script & CI to check recurring links daily (#19100) 2024-03-14 17:42:22 -07:00
Asaf Joseph Gardin
4d7f6fa968
ai21[patch]: AI21 Labs Batch Support in Embeddings (#18633)
Description: Added support for batching when using AI21 Embeddings model
Twitter handle: https://github.com/AI21Labs

---------

Co-authored-by: Asaf Gardin <asafg@ai21.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-03-14 23:10:23 +00:00
Tomaz Bratanic
321db89e87
templates: Switch neo4j generation template to LLMGraphTransformer (#19024) 2024-03-14 16:00:42 -07:00
Erick Friis
d5cf360329
ibm[patch]: release 0.1.3 (#19094) 2024-03-14 15:59:42 -07:00
Mateusz Szewczyk
b15d150d22
ibm[patch]: add async tests, add tokenize support (#18898)
- **Description:** add async tests, add tokenize support
- **Dependencies:**
[ibm-watsonx-ai](https://pypi.org/project/ibm-watsonx-ai/),
  - **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 -> 
Please make sure integration_tests passing locally -> 

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-03-14 22:57:05 +00:00
billytrend-cohere
7253b816cc
community: Add support for cohere SDK v5 (keeps v4 backwards compatibility) (#19084)
- **Description:** Add support for cohere SDK v5 (keeps v4 backwards
compatibility)

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-03-14 15:53:24 -07:00
Eugene Yurtsev
06165efb5b
core[patch]: RunnablePassthrough transform to autoupgrade to AddableDict (#19051)
Follow up on https://github.com/langchain-ai/langchain/pull/18743 which
missed RunnablePassthrough

Issues:

https://github.com/langchain-ai/langchain/issues/18741
https://github.com/langchain-ai/langgraph/issues/136
https://github.com/langchain-ai/langserve/issues/504
2024-03-14 16:59:46 -04:00
Eugene Yurtsev
41e2f60cd2
Updated security policy (#19089)
Updated security policy
2024-03-14 20:58:47 +00:00
Eugene Yurtsev
6cdca4355d
community[minor]: Revamp PGVector Filtering (#18992)
This PR makes the following updates in the pgvector database:

1. Use JSONB field for metadata instead of JSON
2. Update operator syntax to include required `$` prefix before the
operators (otherwise there will be name collisions with fields)
3. The change is non-breaking, old functionality is still the default,
but it will emit a deprecation warning
4. Previous functionality has bugs associated with comparisons due to
casting to text (so lexical ordering is used incorrectly for numeric
fields)
5. Adds an a GIN index on the JSONB field for more efficient querying
2024-03-14 16:56:00 -04:00
Bagatur
e276817e1d
docs: fix vercel build script (#19090)
amazon linux 2023 doesn't have `amazon-linux-extras` but shoudl have python3.9 by default
2024-03-14 20:53:43 +00:00
Guangdong Liu
d4b025c812
code[patch]: Add in code documentation to core Runnable assign method (docs only) (#18951)
**PR message**: ***Delete this entire checklist*** and replace with
- **Description:** [a description of the change](docs: Add in code
documentation to core Runnable assign method)
    - **Issue:** the issue  #18804
2024-03-14 15:41:19 -04:00
Anthony Yang
688a5bd106
docs:fixed typo in streaming document (#19045)
Fixed typo in line 661 - from 'mimimize' to 'minimize

- [ ] **PR message**: 
- **Description:** Fixed typo in streaming document - change 'mimimize'
to 'minimize

If no one reviews your PR within a few days, please @-mention one of
baskaryan, efriis, eyurtsev, hwchase17.
2024-03-14 19:38:53 +00:00
Bagatur
573f48e34d
core[patch]: Release 0.1.32 (#19088) 2024-03-14 12:01:58 -07:00
YHW
69a8ef2693
core: Runnable pass kwargs to _astream_log_implementation in astream_log (#19055)
- **Description:** When calling the `_stream_log_implementation` from
the `astream_log` method in the `Runnable` class, it is not handing over
the `kwargs` argument. Therefore, even if i want to customize APIHandler
and implement additional features with additional arguments, it is not
possible. Conversely, the `astream_events` method normally handing over
the `kwargs` argument.
- **Issue:** https://github.com/langchain-ai/langchain/issues/19054
- **Dependencies:**
- **Twitter handle:** if your PR gets announced, and you'd like a
mention, we'll gladly shout you out!

Co-authored-by: hyungwookyang <hyungwookyang@worksmobile.com>
2024-03-14 14:39:46 -04:00
Nuno Campos
751fb7de20
Add new beta StructuredPrompt (#19080)
Thank you for contributing to LangChain!

- [ ] **PR title**: "package: description"
- Where "package" is whichever of langchain, community, core,
experimental, etc. is being modified. Use "docs: ..." for purely docs
changes, "templates: ..." for template changes, "infra: ..." for CI
changes.
  - Example: "community: add foobar LLM"


- [ ] **PR message**: ***Delete this entire checklist*** and replace
with
    - **Description:** a description of the change
    - **Issue:** the issue # it fixes, if applicable
    - **Dependencies:** any dependencies required for this change
- **Twitter handle:** if your PR gets announced, and you'd like a
mention, we'll gladly shout you out!


- [ ] **Add tests and docs**: 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.


- [ ] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. See contribution
guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:
- Make sure optional dependencies are imported within a function.
- Please do not add dependencies to pyproject.toml files (even optional
ones) unless they are required for unit tests.
- Most PRs should not touch more than one package.
- Changes should be backwards compatible.
- If you are adding something to community, do not re-import it in
langchain.

If no one reviews your PR within a few days, please @-mention one of
baskaryan, efriis, eyurtsev, hwchase17.
2024-03-14 10:40:34 -07:00
Bagatur
0ae39ab30e
docs: make links internal (#19063)
So they can be properly link checked
2024-03-14 16:22:56 +00:00
Anton Parkhomenko
ae73b9d839
community[patch]: Fix NotionDBLoader 400 Error by conditionally adding filter parameter (#19075)
- **Description:** This change fixes a bug where attempts to load data
from Notion using the NotionDBLoader resulted in a 400 Bad Request
error. The issue was traced to the unconditional addition of an empty
'filter' object in the request payload, which Notion's API does not
accept. The modification ensures that the 'filter' object is only
included in the payload when it is explicitly provided and not empty,
thus preventing the 400 error from occurring.
- **Issue:** Fixes
[#18009](https://github.com/langchain-ai/langchain/issues/18009)
- **Dependencies:** None
- **Twitter handle:** @gunnzolder

Co-authored-by: Anton Parkhomenko <anton@merge.rocks>
2024-03-14 13:56:57 +00:00
Erick Friis
2999d06938
docs: deprecate old airbyte loader docs (#19048) 2024-03-13 23:18:30 +00:00
Prakul
4c53e31377
docs: Updated index definition and reference to LangChain-MongoDB (#19047)
**Description:** 
Updates to LangChain-MongoDB documentation: updates to the Atlas vector
search index definition

**Issue:** 
NA

**Dependencies:** 
NA

**Twitter handle:** 
iprakul
2024-03-13 15:44:13 -07:00
Erick Friis
5e0c58f9c2
infra: update upload-artifact and download-artifact to v4 (#19044) 2024-03-13 20:08:29 +00:00
Tomaz Bratanic
e5e15c8d59
docs: Add graph construction docs (#18904) 2024-03-13 12:27:58 -07:00
Nuno Campos
2b7c3c548d
core[minor]: Add Runnable.batch_as_completed (#17603)
This PR adds `batch as completed` method to the standard Runnable
interface. It takes in a list of inputs and yields the corresponding
outputs as the inputs are completed.
2024-03-13 11:18:02 -07:00
Erick Friis
71d0981f18
templates: fix rag-lancedb dep (#19010) 2024-03-13 04:36:24 +00:00
Erick Friis
74b2c0aa01
templates, cli: more security deps (#19006) 2024-03-12 20:48:56 -07:00
Erick Friis
9052d05442
template: bump more lockfiles (#19003)
- templates: bump lockfile deps
- x
2024-03-13 01:43:33 +00:00
Erick Friis
49f3cc0f6b
templates: bump lockfile deps (#19001) 2024-03-13 01:25:45 +00:00
Erick Friis
2ffb2144a6
experimental[patch]: release 0.0.54 (#19000) 2024-03-13 00:38:46 +00:00
Erick Friis
873d06c009
langchain[patch]: release 0.1.12 (#18999) 2024-03-13 00:22:21 +00:00
Leonid Ganeline
9c8523b529
community[patch]: flattening imports 3 (#18939)
@eyurtsev
2024-03-12 15:18:54 -07:00
Erick Friis
af50f21765
community[patch]: release 0.0.28 (#18993) 2024-03-12 21:55:29 +00:00
Erick Friis
4881bb669c
core[patch]: release 0.1.31 (#18989) 2024-03-12 19:45:21 +00:00
Erick Friis
a29e8d8594
elasticsearch[patch]: fix integration tests for release (#18980) 2024-03-12 10:22:07 -07:00
Erick Friis
0d1f6c417c
elasticsearch[patch]: release 0.1.1 (#18978) 2024-03-12 16:46:22 +00:00
Max Jakob
911ccf9aa6
docs: elasticsearch retriever (#18965)
Add documentation notebook for `ElasticsearchRetriever`.

## Dependencies
- [ ] Release new `langchain-elasticsearch` version 0.2.0 that includes
`ElasticsearchRetriever`
2024-03-12 09:42:36 -07:00
Dobiichi-Origami
471f2ed40a
community[patch]: re-arrange the addtional_kwargs of returned qianfan structure to avoid _merge_dict issue (#18889)
fix issue: https://github.com/langchain-ai/langchain/issues/18441
PTAL, thanks
@baskaryan, @efriis, @eyurtsev, @hwchase17.

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-03-12 05:43:56 +00:00
Naman Jain
75122646b5
core[patch]: fixed circular dependency with json schema (#18657)
**Description:** Circular dependencies when parsing references leading
to `RecursionError: maximum recursion depth exceeded` issue. This PR
address the issue by handling previously seen refs as in any typical DFS
to avoid infinite depths.

**Issue:** https://github.com/langchain-ai/langchain/issues/12163

 **Twitter handle:** https://twitter.com/theBhulawat 


- [x] **Add tests and docs**: 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.


- [x] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. See contribution
guidelines for more: https://python.langchain.com/docs/contributing/

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-03-12 05:42:45 +00:00
Tymofii
0bec1f6877
commnity[patch]: refactor code for faiss vectorstore, update faiss vectorstore documentation (#18092)
**Description:** Refactor code of FAISS vectorcstore and update the
related documentation.
Details: 
 - replace `.format()` with f-strings for strings formatting;
- refactor definition of a filtering function to make code more readable
and more flexible;
- slightly improve efficiency of
`max_marginal_relevance_search_with_score_by_vector` method by removing
unnecessary looping over the same elements;
- slightly improve efficiency of `delete` method by using set data
structure for checking if the element was already deleted;

**Issue:** fix small inconsistency in the documentation (the old example
was incorrect and unappliable to faiss vectorstore)

**Dependencies:** basic langchain-community dependencies and `faiss`
(for CPU or for GPU)

**Twitter handle:** antonenkodev
2024-03-11 22:33:03 -07:00
Roshan Santhosh
acf1ecc081
langchain[patch]: update llm_router.py (#18865)
Issue : _call method of LLMRouterChain uses predict_and_parse, which is
slated for deprecation.

Description : Instead of using predict_and_parse, this replaces it with
individual predict and parse functions.
2024-03-11 22:30:07 -07:00
Bagatur
18de77cc8c
core[minor]: add streaming support to OAI tool parsers (#18940)
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-03-11 21:53:56 -07:00
Bagatur
e0e688a277
core[minor]: generation info on msg (#18592)
related to #16403 #17188
2024-03-12 04:43:17 +00:00
Tomaz Bratanic
cda43c5a11
experimental[patch]: Fix LLM graph transformer default prompt (#18856)
Some LLMs do not allow multiple user messages in sequence.
2024-03-11 20:11:52 -07:00
Bagatur
19721246f5
core[patch]: support labeled json schema as tools (#18935) 2024-03-11 19:51:35 -07:00
Jacob Lee
950ab056eb
templates[patch]: Update pirate-speak deps, add messages placeholder (#18949)
CC @efriis
2024-03-11 19:20:30 -07:00
Leonid Ganeline
fad308a764
docs: providers update 2 (#18407)
Formatted pages into a consistent form. Added descriptions and links
when needed.
2024-03-11 18:35:37 -07:00
Erick Friis
239f0a615e
templates: redis multi-modal multi-vector rag (#18946)
---------

Co-authored-by: Tyler Hutcherson <tyler.hutcherson@redis.com>
2024-03-12 00:32:25 +00:00
Bagatur
915c1f8673
infra: rm api build CI (#18944) 2024-03-11 16:12:34 -07:00
Brace Sproul
578e67c017
docs[patch]: properly load/use env vars (#18942) 2024-03-11 15:38:05 -07:00
Erick Friis
0d888a65cb
core[patch]: move some attr/methods to BaseLanguageModel (#18936)
Cleans up some shared code between `BaseLLM` and `BaseChatModel`. One
functional difference to make it more consistent (see comment)
2024-03-11 14:59:45 -07:00
Brace Sproul
4ff6aa5c78
docs[minor]: Swap gtag for supabase (#18937)
Added deps:
- `@supabase/supabase-js` - for sending inserts
- `supabase` - dev dep, for generating types via cli
- `dotenv` for loading env vars

Added script:
- `yarn gen` - will auto generate the database schema types using the
supabase CLI. Not necessary for development, but is useful. Requires
authing with the supabase CLI (will error out w/ instructions if you're
not authed).

Added functionality:
- pulls users IP address (using a free endpoint: `https://api.ipify.org`
so we can filter out abuse down the line)

TODO:
- [x] add env vars to vercel
2024-03-11 14:23:12 -07:00
aditya thomas
5c2f7e6b2b
partners[openai]: update the docstring of OpenAI, OpenAIEmbeddings and ChatOpenAI classes (#18908)
**Description:** Update the docstring of OpenAI, OpenAIEmbeddings and
ChatOpenAI classes
**Issue:** Update import module paths to the current LangChain API
**Dependencies:** None
**Lint and test**: `make format` and `make lint` were run

This incorporates the review comments from langchain-ai/langchain#18637
which I closed due to an issue I had in updating that pr branch

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-03-11 20:48:54 +00:00