1
0
mirror of https://github.com/hwchase17/langchain.git synced 2025-05-10 17:46:15 +00:00
Commit Graph

11298 Commits

Author SHA1 Message Date
Erick Friis
4c6181b7ac core: release 0.2.42 2024-10-04 16:49:15 -07:00
Piyush Jain
807314661d
Added mapping to fix CI for #langchain-aws:227. ()
Fixes unit tests for `ChatBedrockConverse` in
https://github.com/langchain-ai/langchain-aws/pull/227
2024-10-04 16:45:59 -07:00
Bagatur
6cfd1e846a
core[patch]: Release 0.2.41 () 2024-09-19 15:15:23 -07:00
Piyush Jain
c5eca37262
core[patch]: Fixed bedrock chat model load. ()
Fixes `load` for `ChatBedrock`, in-turn fixes unit test errors for
`standard-tests` in `langchain-aws`, when working with v0.2 branch.

```
FAILED tests/unit_tests/test_standard.py::TestBedrockStandard::test_serdes - ValueError: Trying to deserialize something that cannot be deserialized in current version of langchain-core: ('langchain', 'cha...
FAILED tests/unit_tests/test_standard.py::TestBedrockAsConverseStandard::test_serdes - ValueError: Trying to deserialize something that cannot be deserialized in current version of langchain-core: ('langchain', 'cha...
```
2024-09-19 15:00:45 -07:00
Erick Friis
70c992bd61
community: poetry lock for cffi dep () 2024-09-19 17:27:34 +00:00
Erick Friis
51fd70be63
infra: 0.2 release checkout ref for release note () 2024-09-17 18:48:20 -07:00
Erick Friis
7d2753fbd6
docs: v0.2 canonical () 2024-09-16 12:58:29 -07:00
Erick Friis
cfd11b2c34
docs: v0.2 deprecation warning () 2024-09-15 19:33:16 -07:00
Erick Friis
8b7843b343
docs: v0.2 link to latest in dropdown () 2024-09-15 18:57:35 +00:00
Bagatur
ffefaa6490
docs: point to v2 api ref () 2024-09-14 03:38:54 +00:00
Erick Friis
8ecef68b10
robocorp: release 0.0.10.post1, point to v0.2 branch () 2024-09-13 22:57:40 +00:00
Erick Friis
13a6847478
infra: codespell all prs, not by branch [v0.2] () 2024-09-13 15:56:07 -07:00
Erick Friis
064b891454
infra: v0.2 docs from v0.2 branch () 2024-09-13 14:03:57 -07:00
Bagatur
d9813bdbbc
openai[patch]: Release 0.1.25 () 2024-09-13 12:00:01 -07:00
liuhetian
7fc9e99e21
openai[patch]: get output_type when using with_structured_output ()
- This allows pydantic to correctly resolve annotations necessary when
using openai new param `json_schema`

Resolves issue: 

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
2024-09-13 11:42:01 -07:00
Bagatur
0f2b32ffa9
core[patch]: Release 0.2.40 () 2024-09-13 09:57:09 -07:00
Bagatur
e32adad17a
community[patch]: Release 0.2.17 () 2024-09-13 09:56:39 -07:00
langchain-infra
8a02fd9c01
core: add additional import mappings to loads ()
Support using additional import mapping. This allows users to override
old mappings/add new imports to the loads function.

- [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/
2024-09-13 09:39:58 -07:00
Erick Friis
1d98937e8d
partners/openai: release 0.1.24 () 2024-09-12 21:54:13 -07:00
Harrison Chase
28ad244e77
community, openai: support nested dicts ()
needed for thinking tokens

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-12 21:47:47 -07:00
Erick Friis
c0dd293f10
partners/groq: release 0.1.10 () 2024-09-12 17:41:11 +00:00
Erick Friis
54c85087e2
groq: add back streaming tool calls ()
api no longer throws an error

https://console.groq.com/docs/tool-use#streaming
2024-09-12 10:29:45 -07:00
jessicaou
396c0aee4d
docs: Adding LC Academy links ()
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, ccurme, vbarda, hwchase17.

---------

Co-authored-by: Jess Ou <jessou@jesss-mbp.local.meter>
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-11 23:37:17 +00:00
Bagatur
feb351737c
core[patch]: fix empty OpenAI tools when strict=True ()
Fix 

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-09-11 16:06:03 -07:00
William FH
d87feb1b04
[Docs] Correct the admonition explaining min langchain-anthropic version in doc ()
0.1.15 instead of just 0.1.5
2024-09-11 23:03:42 +00:00
ccurme
398718e1cb
core[patch]: fix regression in convert_to_openai_tool with instances of Tool ()
```python
from langchain_core.tools import Tool
from langchain_core.utils.function_calling import convert_to_openai_tool

def my_function(x: int) -> int:
    return x + 2

tool = Tool(
    name="tool_name",
    func=my_function,
    description="test description",
)
convert_to_openai_tool(tool)
```

Current:
```
{'type': 'function',
 'function': {'name': 'tool_name',
  'description': 'test description',
  'parameters': {'type': 'object',
   'properties': {'args': {'type': 'array', 'items': {}},
    'config': {'type': 'object',
     'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}},
      'metadata': {'type': 'object'},
      'callbacks': {'anyOf': [{'type': 'array', 'items': {}}, {}]},
      'run_name': {'type': 'string'},
      'max_concurrency': {'type': 'integer'},
      'recursion_limit': {'type': 'integer'},
      'configurable': {'type': 'object'},
      'run_id': {'type': 'string', 'format': 'uuid'}}},
    'kwargs': {'type': 'object'}},
   'required': ['config']}}}
```

Here:
```
{'type': 'function',
 'function': {'name': 'tool_name',
  'description': 'test description',
  'parameters': {'properties': {'__arg1': {'title': '__arg1',
     'type': 'string'}},
   'required': ['__arg1'],
   'type': 'object'}}}
```
2024-09-11 15:51:10 -04:00
이규민
7feae62ad7
core[patch]: Support non ASCII characters in tool output if user doesn't output string ()
### simple modify
core: add supporting non english character

target issue is  
same issue on langgraph -
https://github.com/langchain-ai/langgraph/issues/1504
2024-09-11 15:21:00 +00:00
William FH
b993172702
Keyword-like runnable config () 2024-09-11 07:44:47 -07:00
Bagatur
17659ca2cd
core[patch]: Release 0.2.39 () 2024-09-10 20:11:27 +00:00
Nuno Campos
212c688ee0
core[minor]: Remove serialized manifest from tracing requests for non-llm runs ()
- This takes a long time to compute, isn't used, and currently called on
every invocation of every chain/retriever/etc
2024-09-10 12:58:24 -07:00
ccurme
979232257b
huggingface[patch]: add integration tests for embeddings () 2024-09-10 14:57:16 -04:00
ccurme
4ffd27c4d0
huggingface[patch]: add integration tests ()
Add standard tests for ChatHuggingFace. About half of these fail
currently.
2024-09-10 18:31:51 +00:00
Emad Rad
16d41eab1e
docs: typos fixed ()
While going through the chatbot tutorial, I noticed a couple of typos
and grammatical issues. Also, the pip install command for
langchain_community was commented out, but the document mentions
installing it.

---------

Co-authored-by: Erick Friis <erickfriis@gmail.com>
2024-09-10 00:52:20 +00:00
venkatram-dev
fa229d6c02
docs: fix_typo_llm_chain_tutorial ()
Thank you for contributing to LangChain!

- [ ] **PR title**: "package: description"
docs:tutorials:llm_chain:fix typo



- [ ] **PR message**: 
fix typo in llm chain tutorial

- [ ] **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, ccurme, vbarda, hwchase17.

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-10 00:39:29 +00:00
Christophe Bornet
9cf7ae0a52
community: Add docstring for HtmlLinkExtractor ()
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-10 00:27:37 +00:00
Christophe Bornet
56580b5fff
community: Add docstring for GLiNERLinkExtractor ()
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-10 00:27:23 +00:00
Christophe Bornet
e235a572a0
community: Add docstring for KeybertLinkExtractor ()
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-10 00:26:29 +00:00
Vadym Barda
bab9de581c
core[patch]: wrap mermaid node names w/ markdown in <p> tag ()
This fixes the issue where `__start__` and `__end__` node labels are
being interpreted as markdown, as of the most recent Mermaid update
2024-09-09 20:11:00 -04:00
miri-bar
3e48c728d5
docs: add ai21 tool calling example ()
Add tool calling example to AI21 docs
2024-09-09 09:34:54 -07:00
Geoffrey HARRAZI
76bce42629
docs: Update Google BigQuery Vector Search with new SQL filter feature introduce in langchain-google-community 1.0.9 ()
Hello,

fix: https://github.com/langchain-ai/langchain/issues/26183

Adding documentation regarding SQL like filter for Google BigQuery
Vector Search coming in next langchain-google-community 1.0.9 release.
Note: langchain-google-community==1.0.9 is not yet released

Question: There is no way to warn the user int the doc about the
availability of a feature after a specific package version ?

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-08 18:58:28 +00:00
Matt Hull
bca51ca164
docs: Update func doc strings in tools_human ()
Thank you for contributing to LangChain!

- [x] **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"


- [x] **PR message**: ***Delete this entire checklist*** and replace
with
- **Description:** Fix docstring for two functions that look like have
docstrings carried over from other functions.
    - **Issue:** Not found issue reporting the miss-leading docstrings.
    - **Dependencies:** None
    - **Twitter handle:** 


- [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/

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, ccurme, vbarda, hwchase17.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-08 18:48:24 +00:00
Qasim Khan
fa17b145bb
docs: fix typo in graph_constructing tutorial ()
Changed 

> "At a high-level, the steps of constructing a knowledge are from text
are:"

to 

> "At a high-level, the steps of constructing a knowledge graph from
text are:"

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-08 18:46:49 +00:00
Tomaz Bratanic
181e4fc0e0
Add session expired retry to neo4j graph ()
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-08 11:40:43 -07:00
Sebastian Cherny
b3c7ed4913
Adding bind_tools in ChatOctoAI ()
The object extends from
langchain_community.chat_models.openai.ChatOpenAI which doesn't have
`bind_tools` defined. I tried extending from
`langchain_openai.ChatOpenAI` in
https://github.com/langchain-ai/langchain/pull/25975 but that PR got
closed because this is not correct.
So adding our own `bind_tools` (which for now copying from ChatOpenAI is
good enough) will solve the tool calling issue we are having now.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-08 18:38:43 +00:00
Malik Ashar Khan
042e84170b
Fix typo in ScrapflyLoader documentation ()
This PR fixes a minor typo in the ScrapflyLoader documentation. The word
"passigng" was changed to "passing."

Before: passigng
After: passing

This change improves the clarity and professionalism of the
documentation.

Co-authored-by: Ashar <asharmalik.ds193@gmail.com>
2024-09-08 18:33:01 +00:00
John
97a8e365ec
partners/unstructured: update unstructured client version ()
Users are having version conflicts with `unstructured-client` as
described here:

https://unstructuredw-kbe4326.slack.com/archives/C06JJHC9G4U/p1725557970546199?thread_ts=1725035247.162819&cid=C06JJHC9G4U

This PR fixes that issue and should update the version to "0.1.3" as
well for a clean-slate version for users to install

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-08 18:32:34 +00:00
Vadym Barda
1b3bd52e0e
core[patch]: fix edge labels for mermaid graphs () 2024-09-08 14:35:25 +00:00
Marcelo Machado
9bd4f1dfa8
docs: small improvement ChatOllama setup description ()
Small improvement on ChatOllama description

---------

Co-authored-by: Marcelo Machado <mmachado@ibm.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-08 00:15:05 +00:00
Leonid Ganeline
2f80d67dc1
docs: integrations reference updates 16 ()
Added missed provider pages and links. Fixed inconsistent formatting.

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-08 00:13:53 +00:00
Ikko Eltociear Ashimine
ffdc370200
docs: update agent_executor.ipynb ()
initalize -> initialize

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-09-08 00:07:26 +00:00