Commit Graph

5520 Commits (60d009f75a3cab23085e53a5413d9125474a840f)
 

Author SHA1 Message Date
Eugene Yurtsev 60d009f75a
Add security note to API chain (#12452)
Add security note
11 months ago
Matvey Arye 11505f95d3
Improve handling of empty queries for timescale vector (#12393)
**Description:** Improve handling of empty queries in timescale-vector.
For timescale-vector it is more efficient to get a None embedding when
the embedding has no semantic meaning. It allows timescale-vector to
perform more optimizations. Thus, when the query is empty, use a None
embedding.

 Also pass down constructor arguments to the timescale vector client.

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
11 months ago
Erick Friis 38cee5fae0
cli updates 2 (#12447)
- extras group
- readme
- another readme

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
11 months ago
Lance Martin 3afa68e30e
Update AWS Bedrock README.md (#12451) 11 months ago
Lance Martin 5c564e62e1
AWS Bedrock RAG template (#12450) 11 months ago
William FH 5d40e36c75
Trace if run tree set (#12444)
This code path is hit in the following case:
- Start in langchain code and manually provide a tracer
- Handoff to the traceable
- Hand back to langchain code.

Which happens for evaluating `@traceable` functions unfortunately
11 months ago
Bagatur c2a0a6b6df
make doc utils public (#12394) 11 months ago
Henter d6888a90d0
Fix the missing temperature parameter for Baichuan-AI chat_model (#12420)
**Description:** the missing `temperature` parameter for Baichuan-AI
chat_model

Baichuan-AI api doc: https://platform.baichuan-ai.com/docs/api
11 months ago
Erick Friis 6908634428
cli updates oct27 (#12436) 11 months ago
Uxywannasleep 3fd9f2752f
Fix Typo in clickhouse.ipynb file (#12429) 11 months ago
HwangJohn d38c8369b3
added rrf argument in ApproxRetrievalStrategy class __init__() (#11987)
- **Description: To handle the hybrid search with RRF(Reciprocal Rank
Fusion) in the Elasticsearch, rrf argument was added for adjusting
'rank_constant' and 'window_size' to combine multiple result sets with
different relevance indicators into a single result set. (ref:
https://www.elastic.co/kr/blog/whats-new-elastic-enterprise-search-8-9-0),
  - **Issue:** the issue # it fixes (if applicable),
  - **Dependencies:** No dependencies changed,
  - **Tag maintainer:** @baskaryan,

Nice to meet you,
I'm a newbie for contributions and it's my first PR.

I only changed the langchain/vectorstores/elasticsearch.py file.
I did make format&lint 
I got this message,
```shell
make lint_diff  
./scripts/check_pydantic.sh .
./scripts/check_imports.sh
poetry run ruff .
[ "langchain/vectorstores/elasticsearch.py" = "" ] || poetry run black langchain/vectorstores/elasticsearch.py --check
All done!  🍰 
1 file would be left unchanged.
[ "langchain/vectorstores/elasticsearch.py" = "" ] || poetry run mypy langchain/vectorstores/elasticsearch.py
langchain/__init__.py: error: Source file found twice under different module names: "mvp.nlp.langchain.libs.langchain.langchain" and "langchain"
Found 1 error in 1 file (errors prevented further checking)
make: *** [lint_diff] Error 2
```

Thank you

---------

Co-authored-by: 황중원 <jwhwang@amorepacific.com>
11 months ago
Roman Vasilyev 2c58dca5f0
optional reusable connection (#12051)
My postgres out of connections after continuous PGVector usage, and the
reason because it constantly creates new connections, so adding a
reusable pre established connection seems like solves an issue

---------

Co-authored-by: Roman Vasilyev <rvasilyev@mozilla.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
11 months ago
Ennio Pastore 48fde2004f
Update long_context_reorder.py (#12422)
The function comment was confusing and inaccurate
11 months ago
Bagatur a8c68d4ffa
Type LLMChain.llm as runnable (#12385) 11 months ago
Prakul 224ec0cfd3
Mongo db $vector search doc update (#12404)
**Description:** 
Updates the documentation for MongoDB Atlas Vector Search
11 months ago
Bagatur d12b88557a
Bagatur/bump 325 (#12440) 11 months ago
Eugene Yurtsev cadfce295f
Deprecate PythonRepl tools and Pandas/Xorbits/Spark DataFrame/Python/CSV agents (#12427)
See discussion here:
https://github.com/langchain-ai/langchain/discussions/11680

The code is available for usage from langchain_experimental. The reason
for the deprecation is that the agents are relying on a Python REPL. The
code can only be run safely with appropriate sandboxing.

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
11 months ago
Lance Martin 68e12d34a9
Add invoke example to LLaMA2 function template notebook (#12437) 11 months ago
Harrison Chase 0ca539eb85
Clean up deprecated agents and update __init__ in experimental (#12231)
Update init paths in experimental
11 months ago
Lance Martin 05bbf943f2
LLaMA2 with JSON schema support template (#12435) 11 months ago
Holt Skinner 134f085824
feat: Add Google Speech to Text API Document Loader (#12298)
- Add Document Loader for Google Speech to Text
  - Similar Structure to [Assembly AI Document Loader][1]

[1]:
https://python.langchain.com/docs/integrations/document_loaders/assemblyai
11 months ago
David Duong 52c194ec3a
Fix templates typos (#12428) 11 months ago
Massimiliano Pronesti c8195769f2
fix(openai-callback): completion count logic (#12383)
The changes introduced in #12267 and #12190 broke the cost computation
of the `completion` tokens for fine-tuned models because of the early
return. This PR aims at fixing this.
@baskaryan.
11 months ago
Stefan Langenbach b22da81af8
Mask API key for Aleph Alpha LLM (#12377)
- **Description:** Add masking of API Key for Aleph Alpha LLM when
printed.
- **Issue**: #12165
- **Dependencies:** None
- **Tag maintainer:** @eyurtsev

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
11 months ago
Lance Martin d6acb3ed7e
Clean-up template READMEs (#12403)
Normalize, and update notebooks.
11 months ago
William FH 4254028c52
Str Evaluator Mapper (#12401) 11 months ago
William FH fcad1d2965
Add space (#12395) 11 months ago
William FH 922d7910ef
Wfh/json schema evaluation (#12389)
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
11 months ago
Erick Friis afcc12d99e
Templates CI (#12313)
Adds a `langchain-location` param to lint, so we can properly locate it.

Regular langchain and experimental lint steps are passing, so default
value seems to be working.
11 months ago
Christian Kasim Loan a35445c65f
johnsnowlabs embeddings support (#11271)
- **Description:** Introducing the
[JohnSnowLabsEmbeddings](https://www.johnsnowlabs.com/)
  - **Dependencies:** johnsnowlabs
  - **Tag maintainer:** @C-K-Loan
- **Twitter handle:** https://twitter.com/JohnSnowLabs
https://twitter.com/ChristianKasimL

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
11 months ago
SteveLiao c08b622b2d
Add HTML Title and Page Language into metadata for AsyncHtmlLoader (#11326)
**Description:** 
Revise `libs/langchain/langchain/document_loaders/async_html.py` to
store the HTML Title and Page Language in the `metadata` of
`AsyncHtmlLoader`.
11 months ago
Erick Friis 4b16601d33
Format Templates (#12396) 11 months ago
Shorthills AI 25c98dbba9
Fixed some grammatical and Exception types issues (#12015)
Fixed some grammatical issues and Exception types.

@baskaryan , @eyurtsev

---------

Co-authored-by: Sanskar Tanwar <142409040+SanskarTanwarShorthillsAI@users.noreply.github.com>
Co-authored-by: UpneetShorthillsAI <144228282+UpneetShorthillsAI@users.noreply.github.com>
Co-authored-by: HarshGuptaShorthillsAI <144897987+HarshGuptaShorthillsAI@users.noreply.github.com>
Co-authored-by: AdityaKalraShorthillsAI <143726711+AdityaKalraShorthillsAI@users.noreply.github.com>
Co-authored-by: SakshiShorthillsAI <144228183+SakshiShorthillsAI@users.noreply.github.com>
11 months ago
William FH 923696b664
Wfh/json edit dist (#12361)
Compare predicted json to reference. First canonicalize (sort keys, rm
whitespace separators), then return normalized string edit distance.

Not a silver bullet but maybe an easy way to capture structure
differences in a less flakey way

---------

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
11 months ago
Harrison Chase 56ee56736b
add template for hyde (#12390) 11 months ago
Erick Friis 4db8d82c55
CLI CI 2 (#12387)
Will run all CI because of _test change, but future PRs against CLI will
only trigger the new CLI one

Has a bunch of file changes related to formatting/linting.

No mypy yet - coming soon
11 months ago
Tyler Hutcherson 231d553824
Update broken redis tests (#12371)
Update broken redis tests -- tiny PR :) 
- **Description:** Fixes Redis tests on master (look like it was broken
by https://github.com/langchain-ai/langchain/pull/11257)
  - **Issue:** None,
  - **Dependencies:** No
  - **Tag maintainer:** @baskaryan @Spartee 
  - **Twitter handle:** N/A

Co-authored-by: Sam Partee <sam.partee@redis.com>
11 months ago
Lance Martin b8af5b0a8e
Minor updates to ReRank template (#12388) 11 months ago
Bagatur 7cadf00570
better lint triggering (#12376) 11 months ago
Erick Friis 03e79e62c2
cli fix (#12380) 11 months ago
Lance Martin 237026c060
Cohere re-rank template (#12378) 11 months ago
Bagatur 76230d2c08
fireworks scheduled integration tests (#12373) 11 months ago
Josh Phillips 01c5cd365b
Fix SupbaseVectoreStore write operation timeout (#12318)
**Description**
This small change will make chunk_size a configurable parameter for
loading documents into a Supabase database.

**Issue**
https://github.com/langchain-ai/langchain/issues/11422

**Dependencies**
No chanages

**Twitter**
@ j1philli

**Reminder**
If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.

---------

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
11 months ago
Bagatur b10cefb160
lint fix: rm init (#12374) 11 months ago
William FH f65067b1da
Mention other function calling/grammar support (#12369)
In our extraction doc
11 months ago
Chris Lucas e88fdbba29
Fix langsmith walkthrough doc dataset (#12027) 11 months ago
Jacob Lee 7e5e5e87d8
Adds linter in templates (#12321)
Did not actually run/fix errors yet @efriis
11 months ago
Harrison Chase b43996e553
Harrison/improve cli (#12368) 11 months ago
Harrison Chase 9ce38726a2
fix some stuff (#12292)
Co-authored-by: Erick Friis <erick@langchain.dev>
11 months ago
Cynthia Yang 6ce276e099
Support Fireworks batching (#8) (#12052)
Description

* Add _generate and _agenerate to support Fireworks batching.
* Add stop words test cases
* Opt out retry mechanism

Issue - Not applicable
Dependencies - None
Tag maintainer - @baskaryan
11 months ago