Commit Graph

3687 Commits (master)

Author SHA1 Message Date
Jacob Lee 242eeb537f
docs[patch]: Adds callback docs (#21889)
@efriis @hwchase17
17 hours ago
Jacob Lee da4fef8131
docs[patch]: Update 0.2 banner copy (#21888)
@nfcampos
22 hours ago
Eugene Yurtsev 61ebe7991c
docs: how to remove conversion to openai function from index (#21836)
- bind_tools interface is a better alternative.
- openai doesn't use functions but tools in its API now.
- the underlying content appears in some redirects, so will need to
investigate if we can remove.
3 days ago
Eugene Yurtsev 0812723789
docs: how to tools human in the loop (#21858)
Update information in how to guide tools human in the loop.
3 days ago
Eugene Yurtsev 875230d5bc
docs: how-to index page fix minor typo (#21859)
Fix typo
3 days ago
Bagatur 8b3c5f93f5
docs: lcel how to and cheatsheet (#21851) 3 days ago
Erick Friis c3caec5aaf
docs: update announcement bar (#21854) 3 days ago
Jacob Lee 0180716a95
docs[patch]: Remove padding from first sidebar link (#21852)
CC @efriis
3 days ago
Erick Friis 9a39f92aba
docs: v0.2 version sidebar (#21844)
![image](https://github.com/langchain-ai/langchain/assets/9557659/189f2e04-0c08-4395-b729-f48982c6f53b)
3 days ago
Max Jakob e6b7a1769b
docs: update Elasticsearch strategy names (#21530)
Update documentation with the [new names for retrieval
strategies](https://github.com/langchain-ai/langchain-elastic/pull/22)

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
3 days ago
Erick Friis cdc8e2d0c2
docs: resolve local links script escape (#21840)
Fixing warnings. Needs to be propagated to 0.1 branch if this works.

![Screenshot 2024-05-17 at 2 34
15 PM](https://github.com/langchain-ai/langchain/assets/9557659/e6ac95a9-5686-4747-9ab8-4cb49942dc8d)
3 days ago
Erick Friis d02380c504
docs: remove postgres from docs build (#21847) 3 days ago
Erick Friis d8f89a5e9b
docs: fix vercel core dep 2 (#21839) 3 days ago
Erick Friis 5285336cb1
docs: fix vercel core dep (#21837) 3 days ago
Eugene Yurtsev 2656bfe941
docs: how to guide tool calling using prompts (#21827)
Update tool calling using prompts.

- Add required concepts
- Update names of tool invoking function.
- Add doc-string to function, and add information about `config` (which
users often forget)
- Remove steps that show how to use single function only. This makes the
how-to guide a bit shorter and more to the point.
- Add diagram from another how-to guide that shows how the thing works
overall.
3 days ago
Eugene Yurtsev 33dbad02fe
docs: update how-to for built in tools and toolkits (#21828)
Fix some typos
3 days ago
Eugene Yurtsev e3f30b4cde
docs: clean up link to bing search (#21825)
Documentation should be inlined, not linking to medium article.
3 days ago
Eugene Yurtsev 22d9aed508
docs: how to tools, merge built in tools and toolkits (#21824)
* Rename tools to built in tools
* Merge built in tools and toolkits
* Update links from providers
3 days ago
Leonid Ganeline c4508ca7ef
docs: `arXiv` references page (#21450)
Since the LangChain based on many research papers, the LC documentation
has several references to the arXiv papers. It would be beneficial to
create a single page with all referenced papers.
PR:
1. Developed code to search the arXiv references in the LangChain
Documentation and the LangChain code base. Those references are included
in a newly generated documentation page.
2. Page is linked to the Docs menu.

Controversial:
1. The `arxiv_references` page is automatically generated. But this
generation now started only manually. It is not included in the doc
generation scripts. The reason for this is simple. I don't want to
mangle into the current documentation refactoring. If you think, we need
to regenerate this page in each build, let me know. Note: This script
has a dependency on the `arxiv` package.
2. The link for this page in the menu is not obvious.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
3 days ago
Eugene Yurtsev 4ca2149b70
docs: Remove duplicated content from how to tools (#21821)
Content is duplicated, and is covered in how to use chat models.
3 days ago
Matthew Koski e59afe292d
langchain: Fixing import in docs per https://github.com/langchain-ai/langchain/issues/21814 (#21815)
Description: The example in the How-To guide had an import which did not
work. I changed it to use an import from langchain_core.

Issue: https://github.com/langchain-ai/langchain/issues/21814
3 days ago
Jorge Piedrahita Ortiz 700b1c7212
community: sambaverse api update (#21816)
- **Description:** fix sambaverse integration to make it compatible with
sambaverse API update / minor changes in docs
3 days ago
Erick Friis 7976fb1663
docs: cookbook redirect (#21822) 3 days ago
Eugene Yurtsev aa648298ae
docs: minor updates to migration docs (#21819)
Minor aesthetic updates to migration docs
3 days ago
Eugene Yurtsev fc644c0e1c
docs: Update v0.2 information (#21796)
Update information about v0.2 upgrade
3 days ago
Erick Friis 09919c2cd5
docs: version dropdown (#21784) 4 days ago
Chad Juliano 685c13e157
docs: fix errors and table formatting in notebook (#21696)
There are 2 issues fixed here:

* In the notebook pandas dataframes are formatted as HTML in the cells.
On the documentation site the renderer that converts notebooks
incorrectly displays the raw HTML. I can't find any examples of where
this is working and so I am formatting the dataframes as text.

* Some incorrect table names were referenced resulting in errors.
4 days ago
Asaf Joseph Gardin f3289b898c
partners: Revert AI21 Labs docs scan feature (#21699)
Description: Reverted commit #21614

---------

Co-authored-by: Asaf Gardin <asafg@ai21.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
4 days ago
github-user-en ec8d406441
Made a grammatical correction in streaming.ipynb (#21707)
The only change is replacing the word "operators" with "operates," to
make the sentence grammatically correct.

Thank you for contributing to LangChain!

- [x] **PR title**: "docs: Made a grammatical correction in
streaming.ipynb to use the word "operates" instead of the word
"operators""


- [x] **PR message**: 
- **Description:** The use of the word "operators" was incorrect, given
the context and grammar of the sentence. This PR updates the
documentation to use the word "operates" instead of the word
"operators".
    - **Issue:** Makes the documentation more easily understandable.
    - **Dependencies:** -no dependencies-
    - **Twitter handle:** --


- [x] **Add tests and docs**: Since no new integration is being made, no
new tests/example notebooks are required.


- [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/
    - **No formatting changes made to the documentation**

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, hwchase17.
4 days ago
Brace Sproul 6febb283f6
docs[minor]: Hide prev/next buttons on docs in how to / tutorials (#21789)
These buttons don't navigate to the proper prev/next page. Hide in those
pages
4 days ago
Eugene Yurtsev 97a4ae50d2
How To: Custom tools (#21725)
- Remove double implementations of functions. The single input is just
taking up space.
- Added tool specific information for `async + showing invoke vs.
ainvoke.
- Added more general information about about `async` (this should live
in a different place eventually since it's not specific to tools).
- Changed ordering of custom tools (StructuredTool is simpler and should
appear before the inheritance)
- Improved the error handling section (not convinced it should be here
though)
4 days ago
Bagatur 1cf80a5956
docs: link runnable api (#21783) 4 days ago
Bagatur aee3842a21
docs: intro nit (#21785) 4 days ago
Bagatur 4231cf0696
docs: update chat feat table (#21778) 4 days ago
Erick Friis 5e445a7e4e
docs: dont rewrite ipynb links that have double slash (#21775) 4 days ago
Eugene Yurtsev e3a03b324d
docs: concepts -- add information about tool calling models, update tools section (#21760)
- Add information about naitve tool calling capabilities
- Add information about standard langchain interface for tool calling
- Update description for tools

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
4 days ago
Bagatur 6416d16d39
anthropic[patch]: Release 0.1.13, tool_choice support (#21773) 4 days ago
Stefano Lottini 040597e832
community: init signature revision for Cassandra LLM cache classes + small maintenance (#17765)
This PR improves on the `CassandraCache` and `CassandraSemanticCache`
classes, mainly in the constructor signature, and also introduces
several minor improvements around these classes.

### Init signature

A (sigh) breaking change is tentatively introduced to the constructor.
To me, the advantages outweigh the possible discomfort: the new syntax
places the DB-connection objects `session` and `keyspace` later in the
param list, so that they can be given a default value. This is what
enables the pattern of _not_ specifying them, provided one has
previously initialized the Cassandra connection through the versatile
utility method `cassio.init(...)`.

In this way, a much less unwieldy instantiation can be done, such as
`CassandraCache()` and `CassandraSemanticCache(embedding=xyz)`,
everything else falling back to defaults.

A downside is that, compared to the earlier signature, this might turn
out to be breaking for those doing positional instantiation. As a way to
mitigate this problem, this PR typechecks its first argument trying to
detect the legacy usage.
(And to make this point less tricky in the future, most arguments are
left to be keyword-only).

If this is considered too harsh, I'd like guidance on how to further
smoothen this transition. **Our plan is to make the pattern of optional
session/keyspace a standard across all Cassandra classes**, so that a
repeatable strategy would be ideal. A possibility would be to keep
positional arguments for legacy reasons but issue a deprecation warning
if any of them is actually used, to later remove them with 0.2 - please
advise on this point.

### Other changes

- class docstrings: enriched, completely moved to class level, added
note on `cassio.init(...)` pattern, added tiny sample usage code.
- semantic cache: revised terminology to never mention "distance" (it is
in fact a similarity!). Kept the legacy constructor param with a
deprecation warning if used.
- `llm_caching` notebook: uniform flow with the Cassandra and Astra DB
separate cases; better and Cassandra-first description; all imports made
explicit and from community where appropriate.
- cache integration tests moved to community (incl. the imported tools),
env var bugfix for `CASSANDRA_CONTACT_POINTS`.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
4 days ago
fzowl 8db4a14648
docs: new voyageai text_embeddings model: voyage-large-2-instruct (#21706) 4 days ago
Bagatur 901e09aa30
docs: datacamp course (#21767) 4 days ago
Ethan Yang e44b448ec3
community: update openvino doc with streaming support (#21519)
Co-authored-by: Chester Curme <chester.curme@gmail.com>
4 days ago
Eugene Yurtsev 7022260bc5
How to: Streaming (#21715)
Update the how to guide on streaming

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
4 days ago
Michael Ozery dda5a9c97a
docs: sql_qa.ipynb tutorial update (#21756)
1. Updated deprecated method usage.
2. Added LangGraph required installation in tutorial.

X: MichaelOzery
4 days ago
Mish Ushakov d77e60a7f4
community: updated Browserbase loader (#21757)
Thank you for contributing to LangChain!

- [x] **PR title**: "community: updated Browserbase loader"

- [x] **PR message**:
    Updates the Browserbase loader with more options and improved docs.

- [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/
4 days ago
Ikko Eltociear Ashimine 1e6517ba73
docs: update sql_large_db.ipynb (#21765)
mispelling -> misspelling
4 days ago
William FH 8498b41cda
Finish agent migration doc (#21731) 4 days ago
Cheese 0ead09f84d
community: Implement `bind_tools` for ChatTongyi (#20725)
## Description

Implement `bind_tools` in ChatTongyi. Usage example:

```py
from langchain_core.tools import tool
from langchain_community.chat_models.tongyi import ChatTongyi

@tool
def multiply(first_int: int, second_int: int) -> int:
    """Multiply two integers together."""
    return first_int * second_int

llm = ChatTongyi(model="qwen-turbo")

llm_with_tools = llm.bind_tools([multiply])

msg = llm_with_tools.invoke("What's 5 times forty two")

print(msg)
```

Streaming is also supported.

## Dependencies

No Dependency is required for this change.

---------

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Co-authored-by: Chester Curme <chester.curme@gmail.com>
4 days ago
yoogle b216a1dddb
docs: fix monorepo typo (#21761)
### Description
fix monorepo typo. `monorep` -> `monorepo`
4 days ago
Bagatur 347166874f
docs: aca-ds nit (#21759) 4 days ago
Bagatur 867adbf27b
docs: add aca-ds (#21746) 5 days ago