Commit Graph

4561 Commits (5072138893daf74cb6a31cab89e842169756f6c1)
 

Author SHA1 Message Date
Bagatur 5072138893
bump 293 (#10740) 1 year ago
Harrison Chase 12ff780089
move embeddings to schema (#10696) 1 year ago
Jiayi Ni ce61840e3b
ENH: Add `llm_kwargs` for Xinference LLMs (#10354)
- This pr adds `llm_kwargs` to the initialization of Xinference LLMs
(integrated in #8171 ).
- With this enhancement, users can not only provide `generate_configs`
when calling the llms for generation but also during the initialization
process. This allows users to include custom configurations when
utilizing LangChain features like LLMChain.
- It also fixes some format issues for the docstrings.
1 year ago
Eugene Yurtsev 1eefb9052b
RunnableBranch (#10594)
Runnable Branch implementation, no optimization for streaming logic yet
1 year ago
William FH 287c81db89
Catch Base Exception (#10607)
Currently the on_*_error isn't called for CancellationError's. This is
because in python 3.8, the inheritance changed from Exception to
BaseException


https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.CancelledError
1 year ago
Philippe PRADOS 39c1c94272
Fix typing in WebResearchRetriver (#10734)
Hello @hwchase17 

**Issue**:
The class WebResearchRetriever accept only
RecursiveCharacterTextSplitter, but never uses a specification of this
class. I propose to change the type to TextSplitter. Then, the lint can
accept all subtypes.
1 year ago
Nuno Campos 8201cae770
Bug fixes for runnables (#10738)
- tools invoked in async methods would not work due to missing await
- RunnableSequence.stream() was creating an extra root run by mistake,
and it can simplified due to existence of default implementation for
.transform()

<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
- **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below),
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` to check this
locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc:

https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md

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/extras`
directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->
1 year ago
William FH 6e48092746
Update LangSmith Version (#10722)
And assign dataset ID upon project creation
1 year ago
Bagatur d21a494a27
mention how-to in LCEL index (#10727) 1 year ago
William FH a3e5507faa
Make eval output parsers more robust (#10658)
Ran through a few hundred generations with some models to fix up the
parsers
1 year ago
Bagatur 3992c1ae9b
runnable bind how to nit (#10718) 1 year ago
Bagatur c3e52ba8ab
Runnable fallbacks howto (#10717) 1 year ago
Bagatur 441a5c2b30
Runnable binding how to (#10716) 1 year ago
Bagatur 4a7da3ce3b
add runnable map how to (#10715) 1 year ago
Nino Risteski d0070040da
Update CONTRIBUTING.md (#10700)
fiixed few typos
1 year ago
Bagatur 8371a8a0c6
Mv LCEL routing doc (#10713)
Move to how-to
1 year ago
Bagatur 5fda838346
Docs intro nit (#10712) 1 year ago
Bagatur f9561fd7c5
docs intro nit (#10711) 1 year ago
William FH c5078fb13c
Add support for showing IO to chain group (#10510)
As well as error propagation
1 year ago
Harrison Chase 2c957de2fc
add checks on basic base modules (#10693) 1 year ago
Harrison Chase 5442d2b1fa
Harrison/stop importing from init (#10690) 1 year ago
Hedeer El Showk 9749f8ebae
database -> db in from_llm (#10667)
**Description:** Renamed argument `database` in
`SQLDatabaseSequentialChain.from_llm()` to `db`,

I realize it's tiny and a bit of a nitpick but for consistency with
SQLDatabaseChain (and all the others actually) I thought it should be
renamed. Also got me while working and using it today.

✔️ Please make sure your PR is passing linting and
testing before submitting. Run `make format`, `make lint` and `make
test` to check this locally.
1 year ago
Joshua Sundance Bailey c4e591a57d
OpenAI function calling docstring and notebook imports (#10663)
This PR is a documentation fix.

Description:
* fixes imports in the code samples in the docstrings of
`create_openai_fn_chain` and `create_structured_output_chain`
* fixes imports in
`docs/extras/modules/chains/how_to/openai_functions.ipynb`
* removes unused imports from the notebook

Issues:
* the docstrings use `from pydantic_v1 import BaseModel, Field` which
this PR changes to `from langchain.pydantic_v1 import BaseModel, Field`
* importing `pydantic` instead of `langchain.pydantic_v1` leads to
errors later in the notebook
1 year ago
xleven 6f36bc6d38
add WeChat chat loader notebook (#10672)
Like
[DiscordChatLoader](https://python.langchain.com/docs/integrations/chat_loaders/discord)
(as mentioned in #9708), this notebook is a demonstration of
WeChatChatLoader based on copy-pasting WeChat messages dump.
1 year ago
Nino Risteski 91f1af0a93
Update community.md (#10676)
fixed typos
1 year ago
Harrison Chase a5ca0ca6e7
update quickstart to use lcel (#10687) 1 year ago
Harrison Chase bdd9fe4066
docs refresh intro (#10683) 1 year ago
Nuno Campos 9cd131a178
Support kwargs in RunnableWithFallbacks (#10682)
<!-- Thank you for contributing to LangChain!

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** any dependencies required for this change,
- **Tag maintainer:** for a quicker response, tag the relevant
maintainer (see below),
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` to check this
locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc:

https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md

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/extras`
directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->
1 year ago
Harrison Chase 116cc7998c
update partners first sentence for preview (#10665) 1 year ago
Joshua Sundance Bailey 0a1dc04875
PydanticOutputParser doc nb: use langchain.pydantic_v1; remove unused imports (#10651)
Description: This PR changes the import section of the
`PydanticOutputParser` notebook.
* Import from `langchain.pydantic_v1` instead of `pydantic`
* Remove unused imports

Issue: running the notebook as written, when pydantic v2 is installed,
results in the following:
```python
PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.3/migration/
```
[...]
```python
PydanticUserError: The `field` and `config` parameters are not available in Pydantic V2, please use the `info` parameter instead.

For further information visit https://errors.pydantic.dev/2.3/u/validator-field-config-info
```
1 year ago
Harrison Chase a07491cfdc
add routing notebook (#10587) 1 year ago
Ikko Eltociear Ashimine f6e5632c84
Fix typo in google_vertex_ai_palm.ipynb (#10631)
seperate -> separate
1 year ago
Jiří Moravčík 75c04f0833
docs: Add question answering over a website to web scraping (#10637)
**Description:**
I've added a new use-case to the Web scraping docs. I also fixed some
typos in the existing text.

---------

Co-authored-by: davidjohnbarton <41335923+davidjohnbarton@users.noreply.github.com>
1 year ago
Gökhan Geyik 976a18c1d5
fix: Lemon AI Analytics broken link (#10641)
**Description**

The [current redirect
link](https://github.com/felixbrock/lemonai-analytics) gives 404 error
replace it with the [correct
link](https://github.com/felixbrock/lemon-agent/blob/main/apps/analytics/README.md)

Resource: https://python.langchain.com/docs/integrations/tools/lemonai
1 year ago
Bagatur 3fb9cfb4ae
openai docs nit (#10656) 1 year ago
Bagatur c7bd3b918c
use cases sidebar nit (#10655) 1 year ago
Bagatur f0fdf3d063
cleanup sql use case docs (#10654) 1 year ago
Bagatur 2ae568dcf5
Separate platforms integrations docs (#10609) 1 year ago
Jeffrey Morgan 6d3670c7d8
Use `OllamaEmbeddings` in ollama examples (#10616)
This change the Ollama examples to use `OllamaEmbeddings` for generating
embeddings.
1 year ago
Bagatur 6831a25675
bump 292 (#10649) 1 year ago
Nuno Campos 029b2f6aac
Allow calls to batch() with 0 length arrays (#10627)
This can happen if eg the input to batch is a list generated dynamically, where a 0-length list might be a valid use case
1 year ago
Jacob Lee a50e62e44b
Adds transform and atransform support to runnable sequences (#9583)
Allow runnable sequences to support transform if each individual
runnable inside supports transform/atransform.

@nfcampos
1 year ago
Nuno Campos c0e1a1d32c
Add missing dep in lcel cookbook (#10636)
Add missing dependency
1 year ago
Aashish Saini f9f1340208
Fixed some grammatical and spelling errors (#10595)
Fixed some grammatical and spelling errors
1 year ago
Ackermann Yuriy 5e50b89164
Added embeddings support for ollama (#10124)
- Description: Added support for Ollama embeddings
  - Issue: the issue # it fixes (if applicable),
  - Dependencies: N/A
- Tag maintainer: for a quicker response, tag the relevant maintainer
(see below),
  - Twitter handle: @herrjemand

cc  https://github.com/jmorganca/ollama/issues/436
1 year ago
Bagatur 48a4efc51a
Bagatur/update replicate nb (#10605) 1 year ago
Bagatur bc6b9331a9
bump 291 (#10604) 1 year ago
Bagatur ecbb1ed8cb
Replicate params fix (#10603) 1 year ago
Bagatur 50bb704da5
bump 290 (#10602) 1 year ago
Bagatur e195b78e1d
Fix replicate model kwargs (#10599) 1 year ago