Commit Graph

11668 Commits

Author SHA1 Message Date
Eugene Yurtsev
b5f11d1967 update 2024-10-22 14:11:20 -04:00
Eugene Yurtsev
be5c73fa53 update 2024-10-22 13:49:23 -04:00
Eugene Yurtsev
7aa67885cf Update 2024-10-22 13:48:00 -04:00
Eugene Yurtsev
cb8e4d4a5f Merge branch 'concept_docs' of github.com:langchain-ai/langchain into concept_docs 2024-10-22 13:39:59 -04:00
Eugene Yurtsev
b68b89a230 Merge branch 'master' into concept_docs 2024-10-22 13:38:16 -04:00
Eugene Yurtsev
db544b1618 docs: update index page, update callbacks, add document loaders (#27528)
* update concepts index page
* update callbacks
* add document loaders
* update architecture to not use links in section headings
2024-10-22 13:06:16 -04:00
Eugene Yurtsev
95c813e4b8 concept docs more fixes (#27543)
Update architecture page
2024-10-22 11:13:40 -04:00
Eugene Yurtsev
acefe02334 docs: consolidate llms and chat models (#27525)
Consolidate the docs. After this, we'll need to potentially set up
redirect, and update links to existing llm pages.

Still not sure this is a good idea. May be better to rename the concept
page and redirect appropriately better, since we do still have string in
/ string out llm integrations
2024-10-22 10:40:04 -04:00
Eugene Yurtsev
e442e485fe docs: update (#27520)
Collecting some feedback

---------

Co-authored-by: Lance Martin <lance@langchain.dev>
2024-10-21 21:37:51 -04:00
Vadym Barda
0640cbf2f1 huggingface[patch]: hide client field in HuggingFaceEmbeddings (#27522) 2024-10-21 17:37:07 -04:00
Chun Kang Lu
380449a7a9 core: fix Image prompt template hardcoded template format (#27495)
Fixes #27411 

**Description:** Adds `template_format` to the `ImagePromptTemplate`
class and updates passing in the `template_format` parameter from
ChatPromptTemplate instead of the hardcoded "f-string".
Also updated docs and typing related to `template_format` to be more
up-to-date and specific.

**Dependencies:** None

**Add tests and docs**: Added unit tests to validate fix. Needed to
update `test_chat` snapshot due to adding new attribute
`template_format` in `ImagePromptTemplate`.

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-10-21 17:31:40 -04:00
Eugene Yurtsev
606225e774 docs: streaming concept docs (#27516)
Streaming concept docs
2024-10-21 16:18:08 -04:00
Eugene Yurtsev
aa0b25cb2a docs: fix some typos (#27519)
* Fix some typos
* Add some missing links
2024-10-21 16:00:31 -04:00
bbaltagi-dtsl
403c0ea801 community: fix DallE hidden open_api_key (#26996)
Thank you for contributing to LangChain!

- [ X] **PR title**: "package: description"
- Where "package" is whichever of langchain, community, core, etc. is
being modified. Use "docs: ..." for purely docs changes, "templates:
..." for template changes, "infra: ..." for CI changes.
  - Example: "community: add foobar LLM"


- [ X] 
    - **Issue:** issue #26941


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-10-21 19:46:56 +00:00
Eugene Yurtsev
13f7d2d58d tools concept (#27482)
Add tools conceptual page
2024-10-21 15:34:21 -04:00
Erick Friis
c6d088bc15 docs: giscus component strict (#27515) 2024-10-21 11:36:51 -07:00
Erick Friis
6ed92f13d0 infra: azure/mongo api docs build (#27512) 2024-10-21 08:27:46 -07:00
Lance Martin
8484c23c72 Address comments, minor cleanups (#27475) 2024-10-21 08:10:16 -07:00
Radi
689e8b7e66 docs: Update chatbot.ipynb (#27422)
- [ ] **PR title**: "docs: Typo fix"

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-10-21 15:06:28 +00:00
venkatram-dev
2678cda83b docs:tutorials:sql_qa.ipynb: fix typo (#27405)
Thank you for contributing to LangChain!

- [x] **PR title**: "package: description"

docs:docs:tutorials:sql_qa.ipynb: fix typo

- [x] **PR message**: ***Delete this entire checklist*** and replace
with
Fix typo in docs:docs:tutorials:sql_qa.ipynb


- [ ] **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-10-21 15:01:23 +00:00
Erez Zohar
8f80dd28d9 docs: typo fix athena.ipynb and glue_catalog.ipynb (#27435)
**Description:** This PR fixes typos in 
```
docs/docs/integrations/document_loaders/athena.ipynb
docs/docs/integrations/document_loaders/glue_catalog.ipynb
```
2024-10-21 15:01:13 +00:00
nodfans
cfcf783cb5 community: fix a typo in planner_prompt.py (#27489)
Description: Fix typo in planner_prompt.py.
2024-10-21 14:59:33 +00:00
Seungha Jeon
edfe35c2a8 docs: fix typo on friendli.ipynb (#27412)
This PR fixes typos in `chat/friendli.ipynb` and `llms/friendli.ipynb`
docs.
2024-10-21 14:58:49 +00:00
Connor Park
e62e390ca0 docs: update API Reference Link in /docs/how_to/vectorstore_retriever/ (#27477)
Description: updated docs
[here](https://python.langchain.com/docs/how_to/vectorstore_retriever/#:~:text=VectorStoreRetriever)
for creating VectorStoreRetrievers. The URL was missing a `.base`, and
now works as expected.

This was a fix for Issue #27196
2024-10-19 00:44:58 +00:00
Erick Friis
97a819d578 community: fix lint from new mypy (#27474) 2024-10-18 20:08:03 +00:00
Lance Martin
8033cae96a First draft of concept pages (#27088)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-10-18 12:52:52 -07:00
Erick Friis
c397baa85f community: release 0.3.3 (#27472) langchain-community==0.3.3 2024-10-18 12:52:15 -07:00
Erick Friis
4ceb28009a mongodb: migrate to repo (#27467) 2024-10-18 12:35:12 -07:00
Erick Friis
a562c54f7d azure-dynamic-sessions: migrate to repo (#27468) 2024-10-18 12:30:48 -07:00
Erick Friis
30660786b3 langchain: release 0.3.4 (#27458) langchain==0.3.4 2024-10-18 11:59:54 -07:00
Eugene Yurtsev
127ac819fc Docs: conceptual docs batch 1 (#27173)
Re-organizing some of the content involves runnables/lcel/streaming into
conceptual guides.

Conceptual guides added:
- [x] Runnables
- [x] LCEL
- [x] Chat Models
- [x] LLM
- [x] async
- [x] Messages
- [x] Chat History
- [x] Multimodality
- [x] Tokenization

Outstanding:
- [ ] Callbacks/Tracers
- [ ] Streaming
- [ ] Tool Creation
- [ ] Document Loading


Other conceptual guides are placeholders to make sure that no existing
links breaks.

Some high level re-organization:

* Introduce the Runnable interface prior to LCEL (since those are two
distinct concepts)
* Cross-link as much related content as possible (including how-to
guides)
2024-10-18 14:59:53 -04:00
Erick Friis
b468552859 docs: langgraph error code redirects (#27465) 2024-10-18 10:39:32 -07:00
Erick Friis
82242dfbb1 docs: openai audio docs (#27459) 2024-10-18 17:06:55 +00:00
Erick Friis
2cf2cefe39 partners/openai: release 0.2.3 (#27457) langchain-openai==0.2.3 2024-10-18 08:16:01 -07:00
Erick Friis
7d65a32ee0 openai: audio modality, remove sockets from unit tests (#27436) 2024-10-18 08:02:09 -07:00
Mateusz Szewczyk
97dc578d47 docs: Update custom name for IBM (#27437)
Thank you for contributing to LangChain!

PR: Update custom name for IBM in api_reference docs

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-10-17 19:41:24 +00:00
Isaac Francisco
6e228c84a8 docs: update mongo table (#27434) 2024-10-17 18:29:29 +00:00
Erick Friis
2a27234a77 docs: fix error reference header (#27431) 2024-10-17 15:51:33 +00:00
Erick Friis
322ca84812 infra: add ibm api build (#27425)
test build:
https://github.com/langchain-ai/langchain/actions/runs/11386155179
2024-10-17 07:47:29 -07:00
Erick Friis
4d11211c89 infra: schedule triggers monorepo only by default (#27428)
fixes https://github.com/langchain-ai/langchain/issues/27426
2024-10-17 14:31:14 +00:00
Erick Friis
f9cc9bdcf3 core: release 0.3.12 (#27410) langchain-core==0.3.12 2024-10-17 06:32:40 -07:00
Erick Friis
0ebddabf7d docs, core: error messaging [wip] (#27397) 2024-10-17 03:39:36 +00:00
Eugene Yurtsev
202d7f6c4a core[patch]: 0.3.11 release (#27403)
Core bump to 0.3.11
langchain-core==0.3.11
2024-10-16 15:39:37 -04:00
Erick Friis
a38e903360 docs: platforms -> providers (#27285) 2024-10-16 18:27:07 +00:00
ccurme
fdb7f951c8 monorepo: add script for updating notebook cassettes (#27399)
1. Move dependencies for running notebooks into monorepo poetry test
deps;
2. Add script to update cassettes for a single notebook;
3. Add cassettes for some how-to guides.

---

To update cassettes for a single notebook, run
`docs/scripts/update_cassettes.sh`. For example:
```
./docs/scripts/update_cassettes.sh docs/docs/how_to/binding.ipynb
```
Requires:
1. monorepo dev and test dependencies installed;
2. env vars required by notebook are set.

Note: How-to guides are not currently run in [scheduled
job](https://github.com/langchain-ai/langchain/actions/workflows/run_notebooks.yml).
Will add cassettes for more how-to guides in subsequent PRs before
adding them to scheduled job.
2024-10-16 13:46:49 -04:00
Artur Barseghyan
88d71f6986 docs: Cosmetic documentation fix. Update llm_chain.ipynb. (#27394)
ATM [LLM chain
docs](https://python.langchain.com/docs/tutorials/llm_chain/#server)
say:

```
# 3. Create parser
parser = StrOutputParser()

# 4. Create chain
chain = prompt_template | model | parser


# 4. App definition
app = FastAPI(
  title="LangChain Server",
  version="1.0",
  description="A simple API server using LangChain's Runnable interfaces",
)

# 5. Adding chain route
add_routes(
    app,
    chain,
    path="/chain",
)
```

I corrected it to:


```
# 3. Create parser
parser = StrOutputParser()

# 4. Create chain
chain = prompt_template | model | parser

# 5. App definition
app = FastAPI(
  title="LangChain Server",
  version="1.0",
  description="A simple API server using LangChain's Runnable interfaces",
)

# 6. Adding chain route
add_routes(
    app,
    chain,
    path="/chain",
)
```
2024-10-16 17:42:52 +00:00
Bagatur
a4392b070d core[patch]: add convert_to_openai_messages util (#27263)
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-10-16 17:10:10 +00:00
sByteman
31e7664afd community[minor]: add proxy support to RecursiveUrlLoader (#27364)
**Description**
This PR introduces the proxies parameter to the RecursiveUrlLoader
class, allowing the user to specify proxy servers for requests. This
update enables crawling through proxy servers, providing enhanced
flexibility for network configurations.
The key changes include:
  1.Added an optional proxies parameter to the constructor (__init__).
2.Updated the documentation to explain the proxies parameter usage with
an example.
3.Modified the _get_child_links_recursive method to pass the proxies
parameter to the requests.get function.



**Sample Usage**

```python
from bs4 import BeautifulSoup as Soup
from langchain_community.document_loaders.recursive_url_loader import RecursiveUrlLoader

proxies = {
    "http": "http://localhost:1080",
    "https": "http://localhost:1080",
}
url = "https://python.langchain.com/docs/concepts/#langchain-expression-language-lcel"
loader = RecursiveUrlLoader(
    url=url, max_depth=1, extractor=lambda x: Soup(x, "html.parser").text,proxies=proxies
)
docs = loader.load()
```

---------

Co-authored-by: root <root@thb>
2024-10-16 16:29:59 +00:00
Leonid Ganeline
3165415369 docs: integrations updates 21 (#27380)
Added missed provider pages. Added descriptions and links. Fixed
inconsistency in text formatting.

---------

Co-authored-by: Erick Friis <erickfriis@gmail.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-10-16 02:41:06 +00:00
Mateusz Szewczyk
591a3db4fb docs: Update IBM ChatWatsonx documentation (#27358)
Thank you for contributing to LangChain!

We would like update IBM ChatWatsonx documentation in LangChain
documentation

Changes:
- Added support for `JSON mode`
- Added support for `Image Input`
- Added support for `Logprobs`

Chat Standard tests ->
https://github.com/langchain-ai/langchain-ibm/blob/main/libs/ibm/tests/integration_tests/test_chat_models_standard.py

Integration_tests job  ->
https://github.com/langchain-ai/langchain-ibm/actions/runs/11327509188

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-10-16 02:27:56 +00:00