Commit Graph

6054 Commits

Author SHA1 Message Date
ccurme
ab831ce05c
tests[patch]: populate API reference for chat models (#28487)
Populate API reference for test class properties and test methods for
chat models.

Also:
- Make `standard_chat_model_params` private.
- `pytest.skip` some tests that were previously passed if features are
not supported.
2024-12-03 15:24:54 -05:00
Erick Friis
c74f34cb41
pinecone: release 0.2.1 (version sequence) (#28485) 2024-12-03 10:22:16 -08:00
Audrey Sage Lorberfeld
926e452f44
partners: update version header for Pinecone integration (#28481)
Just need to update the version header used with Pinecone in
recently-merged method (from [this
PR](https://github.com/langchain-ai/langchain/pull/28320/files#r1867820929)).

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-12-03 18:08:56 +00:00
Erick Friis
7315360907
openai: dont populate logit_bias if None (#28482) 2024-12-03 17:54:53 +00:00
Erick Friis
ff675c11f6
partners/pinecone: release 0.2.2 (#28466) 2024-12-03 06:49:35 +00:00
Audrey Sage Lorberfeld
6b7e93d4c7
pinecone: update pinecone client (#28320)
This PR updates the Pinecone client to `5.4.0`, as well as its
dependencies (`pinecone-plugin-inference` and
`pinecone-plugin-interface`).

Note: `pinecone-client` is now simply called `pinecone`.

**Question for reviewer(s):** should this PR also update the `pinecone`
dep in [the root dir's `poetry.lock`
file](https://github.com/langchain-ai/langchain/blob/master/poetry.lock#L6729)?
Was unsure. (I don't believe so b/c it seems pinned to a lower version
likely based on 3rd-party deps (e.g. Unstructured).)

--
TW: @audrey_sage_


---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1208693659122374
2024-12-02 22:47:09 -08:00
Erick Friis
000be1f32c
tests: init retriever standard tests (#28459) 2024-12-02 23:36:09 +00:00
Erick Friis
42d40d694b
partners/openai: release 0.2.11 (#28461) 2024-12-02 23:35:18 +00:00
Erick Friis
9f04416768
openai: set logit_bias to none instead of empty dict by default (#28460) 2024-12-02 15:30:32 -08:00
William FH
ecee41ab72
fix: Handle response metadata in merge_messages_runs (#28453) 2024-12-02 13:56:23 -08:00
lucasiscovici
60021e54b5
community: Add the additonnal kward 'context' for openai (#28351)
- **Description:** 
Add the additonnal kward 'context' for openai into
`convert_dict_to_message` and `convert_message_to_dict` functions.
2024-12-02 16:43:30 -05:00
ccurme
28487597b2
ollama[patch]: release 0.2.1 (#28458)
We inadvertently skipped 0.2.1, so release pipeline
[failed](https://github.com/langchain-ai/langchain/actions/runs/12126964367/job/33810204551).
2024-12-02 21:17:51 +00:00
ccurme
88d6d02b59
ollama[patch]: release 0.2.2 (#28456) 2024-12-02 14:57:30 -05:00
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
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
42b8ad067d
chroma[patch]: test python 3.13 in CI (#28387) 2024-11-27 15:02:40 +00: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
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
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
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
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