Commit Graph

3242 Commits

Author SHA1 Message Date
Harrison Chase
a9126073b6 cr 2023-07-19 21:01:27 -07:00
Harrison Chase
6fe73854f3 cr 2023-07-19 20:12:11 -07:00
Harrison Chase
f824b4cecc cr 2023-07-19 20:10:16 -07:00
Harrison Chase
f5d62be724 cr 2023-07-19 20:08:24 -07:00
Harrison Chase
2ddbca8c7b cr 2023-07-19 20:03:55 -07:00
Harrison Chase
d034a9f477 cr 2023-07-19 19:57:58 -07:00
Harrison Chase
e8465aaa15 cr 2023-07-19 19:30:30 -07:00
Harrison Chase
785c049d34 cr 2023-07-19 19:21:18 -07:00
Harrison Chase
afd928bac4 cr 2023-07-19 19:18:10 -07:00
Harrison Chase
8a5dad8898 cr 2023-07-19 19:11:47 -07:00
Harrison Chase
f1d0494cfd cr 2023-07-19 18:13:43 -07:00
Harrison Chase
eb3756d728 add experimental package 2023-07-19 18:12:44 -07:00
Harrison Chase
13a36f2c48 cr 2023-07-19 15:53:53 -07:00
Harrison Chase
813cf10abf cr 2023-07-19 15:43:45 -07:00
Harrison Chase
ec8ab91034 cr 2023-07-19 15:40:01 -07:00
Harrison Chase
6761f9919f cr 2023-07-19 15:38:18 -07:00
Harrison Chase
724173c580 cr 2023-07-19 15:37:34 -07:00
Harrison Chase
507b313ed2 cr 2023-07-19 15:34:50 -07:00
Harrison Chase
543af85647 cr 2023-07-19 15:31:55 -07:00
Bagatur
5d021c0962 nb fix (#7962) 2023-07-19 15:27:43 -07:00
Julien Salinas
3adab5e5be Integrate NLP Cloud embeddings endpoint (#7931)
Add embeddings for [NLPCloud](https://docs.nlpcloud.com/#embeddings).

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Lance Martin <lance@langchain.dev>
2023-07-19 15:27:34 -07:00
Harrison Chase
37ab378ea1 cr 2023-07-19 15:25:28 -07:00
Harrison Chase
265a95d3a9 cr 2023-07-19 15:23:57 -07:00
Harrison Chase
02eed9d707 cr 2023-07-19 15:09:25 -07:00
Harrison Chase
bba5a5e5e4 cr 2023-07-19 14:28:03 -07:00
Harrison Chase
058cca8357 cr 2023-07-19 14:23:20 -07:00
Harrison Chase
b090453110 cr 2023-07-19 14:22:01 -07:00
Harrison Chase
ab39a2faed Merge branch 'master' into harrison/experimental 2023-07-19 14:20:45 -07:00
Harrison Chase
4287c72873 cr 2023-07-19 14:20:02 -07:00
Harrison Chase
1b66b8cd06 cr 2023-07-19 14:18:31 -07:00
Harrison Chase
f8fbd5fcfc cr 2023-07-19 14:16:03 -07:00
Harrison Chase
3e41142408 cr 2023-07-19 14:15:45 -07:00
Bagatur
854a2be0ca Add debugging guide (#7956) 2023-07-19 14:15:11 -07:00
Harrison Chase
e1499748d8 cr 2023-07-19 14:09:09 -07:00
Harrison Chase
4f6597f5cf cr 2023-07-19 14:08:15 -07:00
Harrison Chase
c0e17b4c01 cr 2023-07-19 14:06:48 -07:00
Harrison Chase
e8505ac0a0 cr 2023-07-19 14:03:02 -07:00
Harrison Chase
eb411f91b5 cr 2023-07-19 13:57:25 -07:00
Harrison Chase
b1d5fc40a7 set up experimental 2023-07-19 13:49:41 -07:00
Brendan Collins
9aef79c2e3 Add Geopandas.GeoDataFrame Document Loader (#3817)
Work in Progress.
WIP
Not ready...

Adds Document Loader support for
[Geopandas.GeoDataFrames](https://geopandas.org/)

Example:
- [x] stub out `GeoDataFrameLoader` class
- [x] stub out integration tests
- [ ] Experiment with different geometry text representations
- [ ] Verify CRS is successfully added in metadata
- [ ] Test effectiveness of searches on geometries
- [ ] Test with different geometry types (point, line, polygon with
multi-variants).
- [ ] Add documentation

---------

Co-authored-by: Lance Martin <lance@langchain.dev>
Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Lance Martin <122662504+rlancemartin@users.noreply.github.com>
2023-07-19 12:14:41 -07:00
Lance Martin
dfc533aa74 Add llama-v2 to local document QA (#7952) 2023-07-19 11:15:47 -07:00
Bagatur
d9b5bcd691 bump (#7948) v0.0.237 2023-07-19 10:23:21 -07:00
Bagatur
f97535b33e fix (#7947) 2023-07-19 10:23:10 -07:00
Adilkhan Sarsen
7bb843477f Removed kwargs from add_texts (#7595)
Removing **kwargs argument from add_texts method in DeepLake vectorstore
as it confuses users and doesn't fail when user is typing incorrect
parameters.

Also added small test to ensure the change is applies correctly.

Guys could pls take a look: @rlancemartin, @eyurtsev, this is a small
PR.

Thx so much!
2023-07-19 09:23:49 -07:00
Bagatur
4d8b48bdb3 bump 236 (#7938) v0.0.236 2023-07-19 07:51:40 -07:00
Harutaka Kawamura
f6839a8682 Add integration for MLflow AI Gateway (#7113)
<!-- Thank you for contributing to LangChain!

Replace this 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!

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.

Maintainer responsibilities:
  - General / Misc / if you don't know who to tag: @baskaryan
  - DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev
  - Models / Prompts: @hwchase17, @baskaryan
  - Memory: @hwchase17
  - Agents / Tools / Toolkits: @hinthornw
  - Tracing / Callbacks: @agola11
  - Async: @agola11

If no one reviews your PR within a few days, feel free to @-mention the
same people again.

See contribution guidelines for more information on how to write/run
tests, lint, etc:
https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
 -->


- Adds integration for MLflow AI Gateway (this will be shipped in MLflow
2.5 this week).


Manual testing:

```sh
# Move to mlflow repo
cd /path/to/mlflow

# install langchain
pip install git+https://github.com/harupy/langchain.git@gateway-integration

# launch gateway service
mlflow gateway start --config-path examples/gateway/openai/config.yaml

# Then, run the examples in this PR
```
2023-07-19 07:40:55 -07:00
David Preti
6792a3557d Update openai.py compatibility with azure 2023-07-01-preview (#7937)
Fixed missing "content" field in azure. 
Added a check for "content" in _dict (missing for azure
api=2023-07-01-preview)
@baskaryan

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-07-19 07:31:18 -07:00
王斌(Bin Wang)
b65102bdb2 fix: pgvector search_type of similarity_score_threshold not working (#7771)
- Description: VectorStoreRetriever->similarity_score_threshold with
search_type of "similarity_score_threshold" not working with the
following two minor issues,
- Issue: 1. In line 237 of `vectorstores/base.py`, "score_threshold" is
passed to `_similarity_search_with_relevance_scores` as in the kwargs,
while score_threshold is not a valid argument of this method. As a fix,
before calling `_similarity_search_with_relevance_scores`,
score_threshold is popped from kwargs. 2. In line 596 to 607 of
`vectorstores/pgvector.py`, it's checking the distance_strategy against
the string in Enum. However, self.distance_strategy will get the
property of distance_strategy from line 316, where the callable function
is passed. To solve this issue, self.distance_strategy is changed to
self._distance_strategy to avoid calling the property method.,
  - Dependencies: No,
  - Tag maintainer: @rlancemartin, @eyurtsev,
  - Twitter handle: No

---------

Co-authored-by: Bin Wang <bin@arcanum.ai>
2023-07-19 07:20:52 -07:00
William FH
9d7e57f5c0 Docs Nit (#7918) 2023-07-18 21:47:28 -07:00
Wilson Leao Neto
8bb33f2296 Exposes Kendra result item DocumentAttributes in the document metadata (#7781)
- Description: exposes the ResultItem DocumentAttributes as document
metadata with key 'document_attributes' and refactors
AmazonKendraRetriever by providing a ResultItem base class in order to
avoid duplicate code;
- Tag maintainer: @3coins @hupe1980 @dev2049 @baskaryan
- Twitter handle: wilsonleao

### Why?
Some use cases depend on specific document attributes returned by the
retriever in order to improve the quality of the overall completion and
adjust what will be displayed to the user. For the sake of consistency,
we need to expose the DocumentAttributes as document metadata so we are
sure that we are using the values returned by the kendra request issued
by langchain.

I would appreciate your review @3coins @hupe1980 @dev2049. Thank you in
advance!

### References
- [Amazon Kendra
DocumentAttribute](https://docs.aws.amazon.com/kendra/latest/APIReference/API_DocumentAttribute.html)
- [Amazon Kendra
DocumentAttributeValue](https://docs.aws.amazon.com/kendra/latest/APIReference/API_DocumentAttributeValue.html)

---------

Co-authored-by: Piyush Jain <piyushjain@duck.com>
2023-07-18 18:46:38 -07:00