Commit Graph

3659 Commits

Author SHA1 Message Date
github-user-en
7a829a2bb8 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.
2024-06-20 13:52:14 -07:00
Brace Sproul
4a1f397f02 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
2024-06-20 13:52:14 -07:00
Eugene Yurtsev
daec5e8564 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)
2024-06-20 13:52:14 -07:00
Bagatur
2764e0aa90 docs: link runnable api (#21783) 2024-06-20 13:52:14 -07:00
Bagatur
cd5a1f8371 docs: intro nit (#21785) 2024-06-20 13:52:14 -07:00
Bagatur
15e7ae00e2 docs: update chat feat table (#21778) 2024-06-20 13:52:14 -07:00
Erick Friis
2a631826a5 docs: dont rewrite ipynb links that have double slash (#21775) 2024-06-20 13:52:14 -07:00
Eugene Yurtsev
728507ba76 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>
2024-06-20 13:52:14 -07:00
Bagatur
092340f61d anthropic[patch]: Release 0.1.13, tool_choice support (#21773) 2024-06-20 13:52:14 -07:00
Stefano Lottini
63108ebe25 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>
2024-06-20 13:52:14 -07:00
fzowl
ef7353a138 docs: new voyageai text_embeddings model: voyage-large-2-instruct (#21706) 2024-06-20 13:52:14 -07:00
Bagatur
f087bcd0be docs: datacamp course (#21767) 2024-06-20 13:52:13 -07:00
Ethan Yang
23647b44e0 community: update openvino doc with streaming support (#21519)
Co-authored-by: Chester Curme <chester.curme@gmail.com>
2024-06-20 13:52:13 -07:00
Eugene Yurtsev
f01b9225b6 How to: Streaming (#21715)
Update the how to guide on streaming

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
2024-06-20 13:52:13 -07:00
Michael Ozery
e1cf4225de docs: sql_qa.ipynb tutorial update (#21756)
1. Updated deprecated method usage.
2. Added LangGraph required installation in tutorial.

X: MichaelOzery
2024-06-20 13:52:13 -07:00
Mish Ushakov
54a56b91a1 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/
2024-06-20 13:52:13 -07:00
Ikko Eltociear Ashimine
b229468836 docs: update sql_large_db.ipynb (#21765)
mispelling -> misspelling
2024-06-20 13:52:13 -07:00
William FH
46c1b56b09 Finish agent migration doc (#21731) 2024-06-20 13:52:13 -07:00
Cheese
732a4bc329 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>
2024-06-20 13:52:13 -07:00
yoogle
2a43e4ba78 docs: fix monorepo typo (#21761)
### Description
fix monorepo typo. `monorep` -> `monorepo`
2024-06-20 13:52:13 -07:00
Bagatur
1d62cba406 docs: aca-ds nit (#21759) 2024-06-20 13:52:13 -07:00
Bagatur
658a87c50e docs: add aca-ds (#21746) 2024-06-20 13:52:13 -07:00
junefish
85dc31f169 docs: Update Pinecone example notebook with embedded widget (#21719)
---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-06-20 13:52:13 -07:00
Erick Friis
a122dc462e docs: fix installation link (#21728) 2024-06-20 13:52:13 -07:00
Harrison Chase
b845f495cf move installation (#21711) 2024-06-20 13:52:13 -07:00
Bagatur
a68ba28157 docs: add feedback link to 0.2 banner (#21600) 2024-06-20 13:52:13 -07:00
ccurme
d439174bad docs: add tutorial for vector stores and retrievers (#21683)
also update how-to guide for parent document retriever
2024-06-20 13:52:13 -07:00
Bagatur
92ed9790d4 docs: openai bind tools nit (#21692) 2024-06-20 13:52:12 -07:00
Erick Friis
f97bbf4794 docs: disable contextual search (#21691) 2024-06-20 13:52:12 -07:00
Erick Friis
d5a9e91bdf infra: remove prints from notebook build (#21688) 2024-06-20 13:52:12 -07:00
Erick Friis
024c11ff9c docs: v0.2 search index (#21619) 2024-05-14 15:37:42 -07:00
Bagatur
241a6e43a5 docs: update structured how to (#21679) 2024-05-14 22:19:51 +00:00
ccurme
12b599c47f docs: add how-to on multi-modal tool calling (#21667)
Can move this to a dedicated multi-modal section if desired.
2024-05-14 12:26:25 -04:00
ccurme
3390dc2266 docs: style nits (#21666) 2024-05-14 10:18:13 -04:00
ccurme
2463c8060c docs: how-to on adding scores to retriever results (#21626) 2024-05-14 09:41:36 -04:00
William FH
714cba96a8 [docs] Update langgraph migration guide (#21644)
- add links to references where appropriate
- use the create_react_agent
- Fix the timeout recommendation
2024-05-14 06:13:17 +00:00
Erick Friis
5144c94603 docs: add 0.2 search notice (#21653) 2024-05-14 04:00:18 +00:00
Erick Friis
2a984e8e3f docs: huggingface package (#21645) 2024-05-14 03:17:40 +00:00
Anush
cd1879f5e7 docs: Qdrant partner package reference (#21649)
## Description:
As the title goes.
2024-05-13 19:51:57 -07:00
Anush
edd68e4ad4 qdrant: init package (#21146)
## Description

This PR introduces the new `langchain-qdrant` partner package, intending
to deprecate the community package.

## Changes

- Moved the Qdrant vector store implementation `/libs/partners/qdrant`
with integration tests.
- The conditional imports of the client library are now regular with
minor implementation improvements.
- Added a deprecation warning to
`langchain_community.vectorstores.qdrant.Qdrant`.
- Replaced references/imports from `langchain_community` with either
`langchain_core` or by moving the definitions to the `langchain_qdrant`
package itself.
- Updated the Qdrant vector store documentation to reflect the changes.

## Testing
- `QDRANT_URL` and
[`QDRANT_API_KEY`](583e36bf6b)
env values need to be set to [run integration
tests](d608c93d1f)
in the [cloud](https://cloud.qdrant.tech).
- If a Qdrant instance is running at `http://localhost:6333`, the
integration tests will use it too.
- By default, tests use an
[`in-memory`](https://github.com/qdrant/qdrant-client?tab=readme-ov-file#local-mode)
instance(Not comprehensive).

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
Co-authored-by: Erick Friis <erickfriis@gmail.com>
2024-05-13 18:20:03 -07:00
Erick Friis
fe8c9d621a docs: ignore nb echo:false blocks (#21624)
not working currently
2024-05-13 17:18:26 -07:00
Prashanth Rao
63c3a0e56c [community][graph]: Update KuzuQAChain and docs (#21218)
This PR makes some small updates for `KuzuQAChain` for graph QA.

- Updated Cypher generation prompt (we now support `WHERE EXISTS`) and
generalize it more
- Support different LLMs for Cypher generation and QA
- Update docs and examples
2024-05-13 17:17:14 -07:00
Bagatur
752b1e85f8 docs: gh feedback link (#21606)
Co-authored-by: bracesproul <braceasproul@gmail.com>
2024-05-14 00:11:37 +00:00
Bagatur
506df439eb docs: how to index nits (#21623) 2024-05-13 23:52:50 +00:00
Bagatur
b514a479c0 docs: standardize capitalization (#21641) 2024-05-13 16:25:51 -07:00
Bagatur
89aae3e043 docs: add Techniques to Concepts (#21636)
- Adds Techniques section
- Moves function calling, retrieval types to Techniques
- Removes Installation section (not conceptual)
- Reorders a few things (chat models before llms, package descriptions
before diagram)
- Add text splitter types to Techniques
2024-05-13 16:06:16 -07:00
Bagatur
526ba235f3 docs: fix prereq links (#21630) 2024-05-13 15:40:53 -07:00
Erick Friis
0541e06e21 infra: 0.2 docs 404 page (#21634) 2024-05-13 22:11:28 +00:00
Erick Friis
e861b5bcb7 infra: fix api ref link generation (#21631) 2024-05-13 14:52:26 -07:00
Jofthomas
afd85b60fc huggingface: init package (#21097)
First Pr for the langchain_huggingface partner Package

- Moved some of the hugging face related class from `community` to the
new `partner package`

Still needed :
- Documentation
- Tests
- Support for the new apply_chat_template in `ChatHuggingFace`
- Confirm choice of class to support for embeddings witht he
sentence-transformer team.

cc : @efriis

---------

Co-authored-by: Cyril Kondratenko <kkn1993@gmail.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-05-13 20:53:15 +00:00