Commit Graph

12416 Commits

Author SHA1 Message Date
Bagatur
47433485e7
mistral[patch]: Release 0.2.3 (#28452) 2024-12-02 08:26:28 -08:00
Bagatur
49914e959a
community[patch]: Release 0.3.9 (#28451) 2024-12-02 16:23:37 +00:00
ccurme
c2f1d022a2
mistral[patch]: ensure tool call IDs in tool messages are correctly formatted (#28422)
Fixes tests for cross-provider compatibility:
https://github.com/langchain-ai/langchain/actions/runs/12085358877/job/33702420504#step:10:376
2024-11-29 13:56:06 +00:00
Alex Thomas
2813e86407
docs: Adds the langchain-neo4j package to the API docs (#28386)
This PR adds the `langchain-neo4j` package to the `libs/packages.yml` so
the API docs can be built.
2024-11-27 12:41:12 -08:00
Bagatur
b7e10bb199
langchain[patch]: Release 0.3.9 (#28399) 2024-11-27 20:06:11 +00:00
ccurme
a8b21afc08
qdrant[patch]: run python 3.13 in CI (#28394) 2024-11-27 12:22:17 -05:00
ccurme
ee6fc3f3f6
nomic[patch]: run python 3.13 in CI (#28393) 2024-11-27 17:08:15 +00:00
Massimiliano Pronesti
83586661d6
partners[chroma]: add retrieval of embedding vectors (#28290)
This PR adds an additional method to `Chroma` to retrieve the embedding
vectors, besides the most relevant Documents. This is sometimes of use
when you need to run a postprocessing algorithm on the retrieved results
based on the vectors, which has been the case for me lately.

Example issue (discussion) requesting this change:
https://github.com/langchain-ai/langchain/discussions/20383

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
2024-11-27 16:34:02 +00:00
ccurme
733a6ad328
mistral[patch]: run python 3.13 in CI (#28392) 2024-11-27 11:29:04 -05:00
ccurme
b9bf7fd797
couchbase[patch]: run python 3.13 in CI (#28391) 2024-11-27 11:28:21 -05:00
Greg Hinch
5141f25a20
community[patch]: support numpy2 (#28184)
Follows on from #27991, updates the langchain-community package to
support numpy 2 versions

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2024-11-27 11:10:58 -05:00
LuisMSotamba
0901f11b0f
community: add truncation params when an openai assistant's run is created (#28158)
**Description:** When an OpenAI assistant is invoked, it creates a run
by default, allowing users to set only a few request fields. The
truncation strategy is set to auto, which includes previous messages in
the thread along with the current question until the context length is
reached. This causes token usage to grow incrementally:
consumed_tokens = previous_consumed_tokens + current_consumed_tokens.

This PR adds support for user-defined truncation strategies, giving
better control over token consumption.

**Issue:** High token consumption.
2024-11-27 10:53:53 -05:00
Pratool Bharti
c09000f20e
Building RAG agents locally using open source LLMs on Intel CPU (#28302)
**Description:** Added a cookbook that showcase how to build a RAG agent
pipeline locally using open-source LLM and embedding models on Intel
Xeon CPU. It uses Llama 3.1:8B model from Ollama for LLM and
nomic-embed-text-v1.5 from NomicEmbeddings for embeddings. The whole
experiment is developed and tested on Intel 4th Gen Xeon Scalable CPU.

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2024-11-27 15:40:09 +00:00
TheDannyG
607c60a594
partners/ollama: fix tool calling with nested schemas (#28225)
## Description

This PR addresses the following:

**Fixes Issue #25343:**
- Adds additional logic to parse shallowly nested JSON-encoded strings
in tool call arguments, allowing for proper parsing of responses like
that of Llama3.1 and 3.2 with nested schemas.
 
**Adds Integration Test for Fix:**
- Adds a Ollama specific integration test to ensure the issue is
resolved and to prevent regressions in the future.

**Fixes Failing Integration Tests:**
- Fixes failing integration tests (even prior to changes) caused by
`llama3-groq-tool-use` model. Previously,
tests`test_structured_output_async` and
`test_structured_output_optional_param` failed due to the model not
issuing a tool call in the response. Resolved by switching to
`llama3.1`.

## Issue
Fixes #25343.

## Dependencies
No dependencies.

____

Done in collaboration with @ishaan-upadhyay @mirajismail @ZackSteine.
2024-11-27 10:32:02 -05:00
ccurme
bb83abd037
community[patch]: remove sqlalchemy cap (#28389) 2024-11-27 10:20:36 -05:00
ccurme
51e98a5548
docs[patch]: fix typo in embeddings tab (#28388) 2024-11-27 10:05:06 -05:00
ccurme
42b8ad067d
chroma[patch]: test python 3.13 in CI (#28387) 2024-11-27 15:02:40 +00:00
Kunal Pathak
85b8cecb6f
docs: fix typo in embedding vectors documentation (#28378)
**Description:** Fixed a grammatical error in the documentation section
on embedding vectors. Replaced "Embedding vectors can be comparing" with
"Embedding vectors can be compared."

**Issue:** N/A (This is a minor documentation fix with no linked issue.)

**Dependencies:** None.
2024-11-27 09:52:40 -05:00
William FH
585da22752
Init embeddings (#28370) 2024-11-27 08:25:10 +00:00
Bagatur
ffe7bd4832
langchain[patch]: init_chat_model provider in model string (#28367)
```python
llm = init_chat_model("openai:gpt-4o")
```
2024-11-27 00:20:25 -08:00
ccurme
8adc4a5bcc
langchain[patch]: update deprecation message for agent classes and constructors (#28369) 2024-11-26 16:07:13 -05:00
Kiril Buga
ec205fcee0
Updated docs for the BM25 preprocessing function (#28101)
- [x] **PR title**: "docs: add explanation for preprocessing function"


- [x] **PR message**: 
- **Description:** Extending the BM25 description and demonstrating the
preprocessing function
    - **Dependencies:** nltk
    - **Twitter handle:** @kirilbuga

@efriis
@baskaryan
@vbarda
@ccurme

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2024-11-26 14:59:15 -05:00
Mohammad Mohtashim
06fafc6651
Community: Marqo Index Setting GET Request Updated according to 2.x API version while keep backward compatability for 1.5.x (#28342)
- **Description:** `add_texts` was using `get_setting` for marqo client
which was being used according to 1.5.x API version. However, this PR
updates the `add_text` accounting for updated response payload for 2.x
and later while maintaining backward compatibility. Plus I have verified
this was the only place where marqo client was not accounting for
updated API version.
  - **Issue:** #28323

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
2024-11-26 18:26:56 +00:00
willtai
7d95a10ada
langchain: Fix Neo4jVector vector store reference from partner package for self query (#28292)
_This should only be merged once neo4j is included under libs/partners._

# **Description:**

Neo4jVector from langchain-community is being moved to langchain-neo4j:
[see
link](https://github.com/langchain-ai/langchain-neo4j/blob/main/libs/neo4j/langchain_neo4j/vectorstores/neo4j_vector.py#L436).

To solve the issue below, this PR adds an attempt to import
`Neo4jVector` from the partner package `langchain-neo4j`, similarly to
the other partner packages.

# **Issue:**
When initializing `SelfQueryRetriever`, the following error is raised:

```
ValueError: Self query retriever with Vector Store type <class 'langchain_neo4j.vectorstores.neo4j_vector.Neo4jVector'> not supported.
```

[See related
issue](https://github.com/langchain-ai/langchain/issues/19748).

# **Dependencies:**
- langchain-neo4j
2024-11-26 13:21:04 -05:00
ccurme
a1c90794e1
ollama[patch]: bump to 0.4.1 in lock file (#28365) 2024-11-26 18:19:31 +00:00
ccurme
74d9d2cba1
ollama[patch]: support ollama 0.4 (#28364)
v0.4 of the Python SDK is already installed via the lock file in CI, but
our current implementation is not compatible with it.

This also addresses an issue introduced in
https://github.com/langchain-ai/langchain/pull/28299. @RyanMagnuson
would you mind explaining the motivation for that change? From what I
can tell the Ollama SDK [does not support
kwargs](6c44bb2729/ollama/_client.py (L286)).
Previously, unsupported kwargs were ignored, but they currently raise
`TypeError`.

Some of LangChain's standard test suite expects `tool_choice` to be
supported, so here we catch it in `bind_tools` so it is ignored and not
passed through to the client.
2024-11-26 12:45:59 -05:00
Bagatur
e9c16552fa
openai[patch]: bump core dep (#28361) 2024-11-26 08:37:05 -08:00
Bagatur
e7dc26aefb
openai[patch]: Release 0.2.10 (#28360) 2024-11-26 08:30:29 -08:00
ccurme
42b18824c2
openai[patch]: use max_completion_tokens in place of max_tokens (#26917)
`max_tokens` is deprecated:
https://platform.openai.com/docs/api-reference/chat/create#chat-create-max_tokens

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
2024-11-26 16:30:19 +00:00
Greg Hinch
869c8f5879
langchain[patch]: support numpy 2 (#28183)
Follows on from #27991, updates the langchain package to support numpy 2
versions

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2024-11-26 11:20:02 -05:00
ccurme
7b9a0d9ed8
docs: update tutorials (#28219) 2024-11-26 10:43:12 -05:00
ccurme
a97c53e7c2
docs[patch]: fix broken anchor link (#28358) 2024-11-26 10:12:44 -05:00
Richard Hao
c161f7d46f
docs(create_sql_agent): fix reStructured Text Markup (#28356)
- **Description:** Lines of code must be indented beneath `..
code-block::` for proper formatting.
https://devguide.python.org/documentation/markup/#showing-code-examples
- **Issue:** The example code block on the `create_sql_agent` document
page is not properly rendered.

https://python.langchain.com/api_reference/community/agent_toolkits/langchain_community.agent_toolkits.sql.base.create_sql_agent.html#langchain_community.agent_toolkits.sql.base.create_sql_agent

<img width="933" alt="image"
src="https://github.com/user-attachments/assets/d764bcad-e412-408b-ab0b-9a78a11188ee">
2024-11-26 09:52:16 -05:00
Mohammad Mohtashim
195ae7baa3
Community: Adding citations in AIMessage for ChatPerplexity (#28321)
**Description**: Adding Citation in response payload of ChatPerplexity
**Issue**: #28108
2024-11-26 09:45:47 -05:00
Ikko Eltociear Ashimine
aa2c17b56c
docs: update azure_openai_whisper_parser.ipynb (#28327)
conjuction -> conjunction
2024-11-25 15:59:40 -05:00
ccurme
a5374952f8
community[patch]: fix import in test (#28339)
Library name was updated after
https://github.com/langchain-ai/langchain/pull/27879 branched off
master.
2024-11-25 19:28:01 +00:00
Alex Thomas
5867f25ff3
community[patch]: Neo4j community deprecation (#28130)
Adds deprecation notices for Neo4j components moving to the
`langchain_neo4j` partner package.

- Adds deprecation warnings to all Neo4j-related classes and functions
that have been migrated to the new `langchain_neo4j` partner package
- Updates documentation to reference the new `langchain_neo4j` package
instead of `langchain_community`
2024-11-25 10:34:22 -08:00
Yan
c60695a1c7
community: fixed critical bugs at Writer provider (#27879) 2024-11-25 12:03:37 -05:00
Yelin Zhang
6ed2d387bb
docs: fix GOOGLE_API_KEY typo (#28322)
fix small GOOGLE_API_KEY markdown formatting typo
2024-11-25 09:45:22 -05:00
ccurme
a83357dc5a
community[patch]: release 0.3.8 (#28316) 2024-11-23 08:21:21 -05:00
ccurme
82bb0cdfff
langchain[patch]: release 0.3.8 (#28315) 2024-11-23 13:02:10 +00:00
ccurme
f5f1149257
core[patch]: release 0.3.21 (#28314) 2024-11-23 12:46:56 +00:00
Erick Friis
7170a4e3e1
docs: standard test api link (#28309) 2024-11-23 04:02:56 +00:00
Eugene Yurtsev
563587e14f
langchain[patch]: Compat with pydantic 2.10 (#28307)
pydantic compat 2.10 for langchain
2024-11-23 03:21:27 +00:00
Eugene Yurtsev
a813d11c14
core[patch]: Compat pydantic 2.10 (#28308)
pydantic 2.10 compat for langchain-core
2024-11-22 21:44:55 -05:00
ZhangShenao
ed84d48eef
[Doc] Improvement: fix import statement for qdrant (#28286)
- fix import statement for qdrant
- issue: https://github.com/langchain-ai/langchain/issues/28012

#28012
2024-11-22 21:43:01 -05:00
Erick Friis
a3296479a0
docs: integration asyncio mode (#28306) 2024-11-23 02:18:53 +00:00
Erick Friis
39fd0fd196
infra: more rst (#28305) 2024-11-22 17:50:42 -08:00
ccurme
25a636c597
langchain[patch]: update deprecation message for MapReduceChain (#28304)
Link migration guide first.
2024-11-23 00:47:52 +00:00
Erick Friis
242e9fc865
infra: install standard tests in docs build (#28303) 2024-11-22 15:49:10 -08:00