Commit Graph

8101 Commits (41e2f60cd288e7cc6aa48bc826dcdd4ef7235e45)
 

Author SHA1 Message Date
Eugene Yurtsev 41e2f60cd2
Updated security policy (#19089)
Updated security policy
3 months ago
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
3 months ago
Bagatur e276817e1d
docs: fix vercel build script (#19090)
amazon linux 2023 doesn't have `amazon-linux-extras` but shoudl have python3.9 by default
3 months ago
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
3 months ago
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.
3 months ago
Bagatur 573f48e34d
core[patch]: Release 0.1.32 (#19088) 3 months ago
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>
3 months ago
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.
3 months ago
Bagatur 0ae39ab30e
docs: make links internal (#19063)
So they can be properly link checked
3 months ago
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>
3 months ago
Erick Friis 2999d06938
docs: deprecate old airbyte loader docs (#19048) 3 months ago
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
3 months ago
Erick Friis 5e0c58f9c2
infra: update upload-artifact and download-artifact to v4 (#19044) 3 months ago
Tomaz Bratanic e5e15c8d59
docs: Add graph construction docs (#18904) 3 months ago
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.
3 months ago
Erick Friis 71d0981f18
templates: fix rag-lancedb dep (#19010) 3 months ago
Erick Friis 74b2c0aa01
templates, cli: more security deps (#19006) 3 months ago
Erick Friis 9052d05442
template: bump more lockfiles (#19003)
- templates: bump lockfile deps
- x
3 months ago
Erick Friis 49f3cc0f6b
templates: bump lockfile deps (#19001) 3 months ago
Erick Friis 2ffb2144a6
experimental[patch]: release 0.0.54 (#19000) 3 months ago
Erick Friis 873d06c009
langchain[patch]: release 0.1.12 (#18999) 3 months ago
Leonid Ganeline 9c8523b529
community[patch]: flattening imports 3 (#18939)
@eyurtsev
3 months ago
Erick Friis af50f21765
community[patch]: release 0.0.28 (#18993) 3 months ago
Erick Friis 4881bb669c
core[patch]: release 0.1.31 (#18989) 3 months ago
Erick Friis a29e8d8594
elasticsearch[patch]: fix integration tests for release (#18980) 3 months ago
Erick Friis 0d1f6c417c
elasticsearch[patch]: release 0.1.1 (#18978) 3 months ago
Max Jakob 911ccf9aa6
docs: elasticsearch retriever (#18965)
Add documentation notebook for `ElasticsearchRetriever`.

## Dependencies
- [ ] Release new `langchain-elasticsearch` version 0.2.0 that includes
`ElasticsearchRetriever`
3 months ago
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>
3 months ago
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>
3 months ago
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
3 months ago
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.
3 months ago
Bagatur 18de77cc8c
core[minor]: add streaming support to OAI tool parsers (#18940)
Co-authored-by: Erick Friis <erick@langchain.dev>
3 months ago
Bagatur e0e688a277
core[minor]: generation info on msg (#18592)
related to #16403 #17188
3 months ago
Tomaz Bratanic cda43c5a11
experimental[patch]: Fix LLM graph transformer default prompt (#18856)
Some LLMs do not allow multiple user messages in sequence.
3 months ago
Bagatur 19721246f5
core[patch]: support labeled json schema as tools (#18935) 3 months ago
Jacob Lee 950ab056eb
templates[patch]: Update pirate-speak deps, add messages placeholder (#18949)
CC @efriis
3 months ago
Leonid Ganeline fad308a764
docs: `providers` update 2 (#18407)
Formatted pages into a consistent form. Added descriptions and links
when needed.
3 months ago
Erick Friis 239f0a615e
templates: redis multi-modal multi-vector rag (#18946)
---------

Co-authored-by: Tyler Hutcherson <tyler.hutcherson@redis.com>
3 months ago
Bagatur 915c1f8673
infra: rm api build CI (#18944) 3 months ago
Brace Sproul 578e67c017
docs[patch]: properly load/use env vars (#18942) 3 months ago
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)
3 months ago
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
3 months ago
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>
3 months ago
Leonid Ganeline 11195cfa42
community[patch]: speed up import times in the community package (#18928)
This PR speeds up import times in the community package
3 months ago
fjk a7fc731720
docs: change sparkllm spark_app_url to spark_api_url (#18000)
community: fix - change sparkllm spark_app_url to spark_api_url

- **Description:** 
- Change the variable name from `sparkllm spark_app_url` to
`spark_api_url` in the community package.

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
3 months ago
Sevin F. Varoglu 8639624d40
docs: update OctoAI doc (#18913)
This PR updates the OctoAI LLM doc.
3 months ago
Alexander Kozlov a7500ab0fb
docs: Update huggingface pipelines notebook (#18801) 3 months ago
Conroy Whitney 96d7fe0f85
docs: Change saved/configured chain variable name (#18863)
**Description:**
Variable name was `openai_poem` but it didn't pass in the `"prompt":
"poem"` config, so the examples were showing a joke being returned from
a variable called `*_poem`.

We could have gone one of two ways:

1. Updating the config line and the output line, or
2. Updating the variable name

The latter seemed simpler, so that's what I went with. But I'd be glad
to re-do this PR if you prefer the former.

Thanks for everything, y'all. You rock 🤘

**Issue:** N/A

**Dependencies:** N/A

**Twitter handle:** `conroywhitney`
3 months ago
aditya thomas 8544f748f2
community[patch]: update AnthropicLLM deprecation message (#18869)
**Description:** Update AnthropicLLM deprecation message import path for
ChatAnthropic
**Issue:** Incorrect import path in deprecation message
**Dependencies:** None
**Lint and test**: `make format`, `make lint` and `make test` were run
3 months ago
Virat Singh cafffe8a21
community: Add PolygonAggregates tool (#18882)
**Description:**
In this PR, I am adding a `PolygonAggregates` tool, which can be used to
get historical stock price data (called aggregates by Polygon) for a
given ticker.

Polygon
[docs](https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to)
for this endpoint.

**Twitter**: 
[@virattt](https://twitter.com/virattt)
3 months ago