Commit Graph

4548 Commits (4a7da3ce3b7e821e4004414ae0bc17b8cf42bad6)
 

Author SHA1 Message Date
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
Bagatur 77a165e0d9
fix replicate output type (#10598) 1 year ago
Aashish Saini 7608f85f13
Removed duplicate heading (#10570)
**I recently reviewed the content and identified that there heading
appeared twice on the docs.**
1 year ago
Bagatur 0786395b56
bump 289 (#10586)
<!-- 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
Bagatur 9dd4cacae2
add replicate stream (#10518)
support direct replicate streaming. cc @cbh123 @tjaffri
1 year ago
Bagatur 7f3f6097e7
Add mmr support to redis retriever (#10556) 1 year ago
Bagatur ccf71e23e8
cache replicate version (#10517)
In subsequent pr will update _call to use replicate.run directly when
not streaming, so version object isn't needed at all

cc @cbh123 @tjaffri
1 year ago
Stefano Lottini 49b65a1b57
CassandraCache and CassandraSemanticCache can handle any "Generation" (#10563)
Hello,
this PR improves coverage for caching by the two Cassandra-related
caches (i.e. exact-match and semantic alike) by switching to the more
general `dumps`/`loads` serdes utilities.

This enables cache usage within e.g. `ChatOpenAI` contexts (which need
to store lists of `ChatGeneration` instead of `Generation`s), which was
not possible as long as the cache classes were relying on the legacy
`_dump_generations_to_json` and `_load_generations_from_json`).

Additionally, a slightly different init signature is introduced for the
cache objects:
- named parameters required for init, to pave the way for easier changes
in the future connect-to-db flow (and tests adjusted accordingly)
- added a `skip_provisioning` optional passthrough parameter for use
cases where the user knows the underlying DB table, etc already exist.

Thank you for a review!
1 year ago
Tomaz Bratanic e1e01d6586
Add Neo4j vector index hybrid search (#10442)
Adding support for Neo4j vector index hybrid search option. In Neo4j,
you can achieve hybrid search by using a combination of vector and
fulltext indexes.

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
1 year ago
William FH 596f294b01
Update LangSmith Walkthrough (#10564) 1 year ago
ItzPAX cbb4860fcd
fix typo in aleph_alpha.ipynb (#10478)
fixes the aleph_alpha.ipynb typo from contnt to content
1 year ago
stonekim adabdfdfc7
Add Baidu Qianfan endpoint for LLM (#10496)
- Description:
* Baidu AI Cloud's [Qianfan
Platform](https://cloud.baidu.com/doc/WENXINWORKSHOP/index.html) is an
all-in-one platform for large model development and service deployment,
catering to enterprise developers in China. Qianfan Platform offers a
wide range of resources, including the Wenxin Yiyan model (ERNIE-Bot)
and various third-party open-source models.
- Issue: none
- Dependencies: 
    * qianfan
- Tag maintainer: @baskaryan
- Twitter handle:

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
1 year ago
Sergey Kozlov 0a0276bcdb
Fix OpenAIFunctionsAgent function call message content retrieving (#10488)
`langchain.agents.openai_functions[_multi]_agent._parse_ai_message()`
incorrectly extracts AI message content, thus LLM response ("thoughts")
is lost and can't be logged or processed by callbacks.

This PR fixes function call message content retrieving.
1 year ago
Michael Kim 2dc3c64386
Adding headers for accessing pdf file url (#10370)
- Description: Set up 'file_headers' params for accessing pdf file url
  - Tag maintainer: @hwchase17 

 make format, make lint, make test

---------

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
1 year ago