Commit Graph

8142 Commits

Author SHA1 Message Date
Anubhav Madhav
6de6b441cd docs: Fixed Grammar in Considerations of Model I/O Concepts (#19091)
Fixed Grammar in Considerations of Model I/O Concepts documentation page
- Update concepts.mdx

Page Link:
https://python.langchain.com/docs/modules/model_io/concepts#considerations

- **Description:** Fixed Grammar in Considerations of Model I/O
Documentation Page
- **Issue:** "to work well with the model are you using" # "to work well
with the model you are using"
- **Dependencies:** None
- **Twitter handle:** @Anubhav_Madhav
(https://twitter.com/Anubhav_Madhav)


If no one reviews your PR within a few days, please @-mention one of
baskaryan, efriis, eyurtsev, hwchase17.

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-04-25 17:39:12 -07:00
Shotaro Sano
29ca47239d docs: Fix execution results of docs/docs/modules/data_connection/indexing.ipynb (#19112)
## Description
This PR addresses a documentation issue in the
[Indexing](https://python.langchain.com/docs/modules/data_connection/indexing)
page. Specifically, it corrects the execution results of the Jupyter
notebook under the
[Source](https://python.langchain.com/docs/modules/data_connection/indexing#source)
section, which were broken as detailed below.

## Problem
The execution results following the statement, `This should delete the
old versions of documents associated with doggy.txt source and replace
them with the new versions.`, appear to be incorrect, as described
below.

### Current Behavior
- For some reason, the `index` function fails to add the new content of
`doggy.txt`. Although it deletes the document objects associated with
the `doggy.txt` source, it does not add the objects in
`changed_doggy_docs`. Consequently, the execution result displays
`num_added: 0`.
- This unexpected behavior also impacts the results of
`vectorstore.similarity_search("dog", k=30)`, showing only the contents
of `kitty.txt`. It appears as though the contents of `doggy.txt` have
been completely removed from the index:

```
 Document(page_content='tty kitty', metadata={'source': 'kitty.txt'}),
 Document(page_content='tty kitty ki', metadata={'source': 'kitty.txt'}),
 Document(page_content='kitty kit', metadata={'source': 'kitty.txt'})]
```

### Expected Behavior
- The `index` function should successfully add the objects in
`changed_doggy_docs` after removing the old content of `doggy.txt`. The
anticipated execution result is `num_added: 2`.
- Subsequently, the modified content of `doggy.txt` should appear in the
results of `vectorstore.similarity_search("dog", k=30)` as follows:

```
[Document(page_content='woof woof', metadata={'source': 'doggy.txt'}),
 Document(page_content='woof woof woof', metadata={'source': 'doggy.txt'}),
 Document(page_content='tty kitty', metadata={'source': 'kitty.txt'}),
 Document(page_content='tty kitty ki', metadata={'source': 'kitty.txt'}),
 Document(page_content='kitty kit', metadata={'source': 'kitty.txt'})]
```

## Fix
I reran `docs/docs/modules/data_connection/indexing.ipynb` and have
included the diff in this PR.
2024-04-25 17:39:12 -07:00
case-k
74ca2e4ba8 docs: fix databricks document url (#19096)
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-04-25 17:39:12 -07:00
Guangdong Liu
5b47b26a32 docs: Add in code documentation to core Runnable with_fallbacks method (docs only) (#19104)
- Description: [a description of the change] Add in code documentation
to core Runnable with_fallbacks method (docs only)
- Issue: the issue #18804 
@eyurtsev PTAL
2024-04-25 17:39:12 -07:00
Guangdong Liu
1994040e64 community[patch]: Fix sparkllm embeddings api bug. (#19122)
- **Description:** Fix sparkllm embeddings api bug.
@baskaryan PTAL
2024-04-25 17:39:12 -07:00
samanhappy
42f6d7ca34 docs: fix API link for BaseLoader (#19128)
The link to the BaseLoader API requires an update as it has been moved
into the `langchain_core` package.
2024-04-25 17:39:12 -07:00
kaijietti
f868508beb community[patch]: implement qdrant _aembed_query and use it in other async funcs (#19155)
`amax_marginal_relevance_search ` and `asimilarity_search_with_score `
should use an async version of `_embed_query `.
2024-04-25 17:39:12 -07:00
Kostas Botsas
6f430aeb74 docs: Fix source column xata.ipynb (#19137)
Docs fix: replace column name search with source.

The Xata integration expects metadata column named "source".

The docs suggest the name "search", which if used, yields the following
error:

```
File "/usr/local/lib/python3.11/site-packages/langchain_community/vectorstores/xata.py", line 95, in _add_vectors
    raise Exception(f"Error adding vectors to Xata: {r.status_code} {r}")
Exception: Error adding vectors to Xata: 400 {'errors': [{'status': 400, 'message': 'invalid record: column [source]: column not found'}]}
```
2024-04-25 17:39:12 -07:00
Barun Amalkumar Halder
b6b4fe42ec community[patch] : publishes duration as milliseconds to Fiddler (#19166)
**Description:** Many LLM steps complete in sub-second duration, which
can lead to non-collection of duration field for Fiddler. This PR
updates duration from seconds to milliseconds.
**Issue:** [INTERNAL] FDL-17568
**Dependencies:** NA
**Twitter handle:** behalder

Co-authored-by: Barun Halder <barun@fiddler.ai>
2024-04-25 17:39:12 -07:00
Eugene Yurtsev
dc7c669f04 langchain: upgrade mypy (#19163)
Update mypy in langchain
2024-04-25 17:39:12 -07:00
Maxime Perrin
3fc3e075bd core[minor]: allow LLMs async streaming to fallback on sync streaming (#18960)
- **Description:** Handling fallbacks when calling async streaming for a
LLM that doesn't support it.
- **Issue:** #18920 
- **Twitter handle:**@maximeperrin_

---------

Co-authored-by: Maxime Perrin <mperrin@doing.fr>
2024-04-25 17:39:12 -07:00
Erick Friis
10e18cdd39 infra: run min version ci before integration tests (#18945) 2024-04-25 17:39:12 -07:00
Barun Amalkumar Halder
e5358299f3 community[patch] : adds feedback and status for Fiddler callback handler events (#19157)
**Description:** This PR adds updates the fiddler events schema to also
pass user feedback, and llm status to fiddler
   **Tickets:** [INTERNAL] FDL-17559 
   **Dependencies:**  NA
   **Twitter handle:** behalder

Co-authored-by: Barun Halder <barun@fiddler.ai>
2024-04-25 17:39:12 -07:00
Juan Felipe Arias
3d9fe2ad6a community[patch]: add args_schema to sql_database tools for langGraph integration (#18595)
- **Description:** This modification adds pydantic input definition for
sql_database tools. This helps for function calling capability in
LangGraph. Since actions nodes will usually check for the args_schema
attribute on tools, This update should make these tools compatible with
it (only implemented on the InfoSQLDatabaseTool)
  - **Issue:** N/A
  - **Dependencies:** N/A
  - **Twitter handle:** juanfe8881
2024-04-25 17:39:12 -07:00
fengjial
6c64edac92 community[minor]: Add Baidu VectorDB as vector store (#17997)
Co-authored-by: fengjialin <fengjialin@MacBook-Pro.local>
2024-04-25 17:39:12 -07:00
aditya thomas
a5bb3aa74a docs: update the list of providers (#19012)
**Description:** Update the list of LangChain providers
**Issue:** Make the list of LangChain providers current
**Dependencies:** None
2024-04-25 17:39:12 -07:00
Erick Friis
0a992ac451 docs: voyageai as provider (#19154) 2024-04-25 17:39:12 -07:00
Erick Friis
3dec36a543 community, langchain, infra: revert store extended test deps outside of poetry (#19153)
Reverts langchain-ai/langchain#18995

Because it makes installing dependencies in python 3.11 extended testing
take 80 minutes
2024-04-25 17:39:12 -07:00
Leonid Kuligin
1243857128 docs: updated google integration related imports in the documentation (#19131)
updated imports in the documentation for google vertex
2024-04-25 17:39:12 -07:00
Erick Friis
e1231fdd2e community, langchain, infra: store extended test deps outside of poetry (#18995)
poetry can't reliably handle resolving the number of optional "extended
test" dependencies we have. If we instead just rely on pip to install
extended test deps in CI, this isn't an issue.
2024-04-25 17:39:12 -07:00
Bagatur
a88e19e197 core[patch]: rc release 0.1.33-rc.1 (#19103) 2024-04-25 17:39:12 -07:00
Nuno Campos
84bccc4e7a core[patch]: Change structured prompt lc id to match js (#19099) 2024-04-25 17:39:12 -07:00
Erick Friis
df5c638139 voyageai[patch]: init package (#19098)
Co-authored-by: fodizoltan <zoltan@conway.expert>
Co-authored-by: Yujie Qian <thomasq0809@gmail.com>
Co-authored-by: fzowl <160063452+fzowl@users.noreply.github.com>
2024-04-25 17:39:12 -07:00
Brace Sproul
67dae73a11 ci[patch]: Set root dir to ./docs (#19102) 2024-04-25 17:39:12 -07:00
Brace Sproul
f62d2d8f3f docs[minor]ci[minor]: Add script & CI to check recurring links daily (#19100) 2024-04-25 17:39:12 -07:00
Asaf Joseph Gardin
991ac57254 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-04-25 17:39:12 -07:00
Tomaz Bratanic
6de7f1351b templates: Switch neo4j generation template to LLMGraphTransformer (#19024) 2024-04-25 17:39:12 -07:00
Erick Friis
bb4c490536 ibm[patch]: release 0.1.3 (#19094) 2024-04-25 17:39:12 -07:00
Mateusz Szewczyk
6ece6b698a 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-04-25 17:39:12 -07:00
billytrend-cohere
ef76cb7939 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-04-25 17:39:12 -07:00
Eugene Yurtsev
0da204b457 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-04-25 17:39:12 -07:00
Eugene Yurtsev
3083a5677b Updated security policy (#19089)
Updated security policy
2024-04-25 17:39:12 -07:00
Eugene Yurtsev
e564e4d2ea 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-04-25 17:39:12 -07:00
Bagatur
c4688c8078 docs: fix vercel build script (#19090)
amazon linux 2023 doesn't have `amazon-linux-extras` but shoudl have python3.9 by default
2024-04-25 17:39:12 -07:00
Guangdong Liu
03d32fbf0e 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-04-25 17:39:12 -07:00
Anthony Yang
d7cb116200 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-04-25 17:39:12 -07:00
Bagatur
29d2163c2d core[patch]: Release 0.1.32 (#19088) 2024-04-25 17:39:12 -07:00
YHW
1aa4f147cc 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-04-25 17:39:12 -07:00
Nuno Campos
bc3da71746 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-04-25 17:39:12 -07:00
Bagatur
f751ae1970 docs: make links internal (#19063)
So they can be properly link checked
2024-04-25 17:39:11 -07:00
Anton Parkhomenko
55ec971294 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-04-25 17:39:11 -07:00
Erick Friis
0b7afeaba1 docs: deprecate old airbyte loader docs (#19048) 2024-04-25 17:39:11 -07:00
Prakul
9427f32071 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-04-25 17:39:11 -07:00
Erick Friis
2cba332828 infra: update upload-artifact and download-artifact to v4 (#19044) 2024-04-25 17:39:11 -07:00
Tomaz Bratanic
9d5d07aa79 docs: Add graph construction docs (#18904) 2024-04-25 17:39:11 -07:00
Nuno Campos
17ded1b12b 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-04-25 17:39:11 -07:00
Erick Friis
167e129d65 templates: fix rag-lancedb dep (#19010) 2024-04-25 17:39:11 -07:00
Erick Friis
b6e3057ebc templates, cli: more security deps (#19006) 2024-04-25 17:39:11 -07:00
Erick Friis
34454bb250 template: bump more lockfiles (#19003)
- templates: bump lockfile deps
- x
2024-04-25 17:39:11 -07:00
Erick Friis
7e636aaeab templates: bump lockfile deps (#19001) 2024-04-25 17:39:11 -07:00